Npdu Transmitter Module

class mtf.network_port.npdu_transmitter.NpduTransmitter

Handles the transmission of NPDUs

__init__()
send_npdu(tunnel_name, frame, trg_mode=0)

Sends an NPDU through the specified tunnel.

Args:

tunnel_name (str): The name of the tunnel through which the NPDU is sent. frame (str): The network frame to be transmitted. trg_mode (int, optional): The trigger mode for sending the NPDU. Defaults to 0.

send_npdus(tunnel_name, frames)

Sends an NPDUs through the specified tunnel.

Args:

tunnel_name (str): The name of the tunnel through which the NPDU is sent. frames (list[str]): The network frame to be transmitted.

start_npdu_transmission(ecu_name, npdu_id)

Transmit multiple pdus within a npdu packet

Note

No need for tunnel configuration. Each NpduElement has the following attributes: * pdu_id * pdu_index * payload * direction * tci (VlanTci object, optional)

Parameters:
  • ecu_name – ecu name(From databex)

  • npdu_id – Npdu identifier.

Returns:

True if the transmission is started or already started. False otherwise.

stop_npdu_transmission(ecu_name, npdu_id)

Stop transmission of pdus within a npdu packet.

Note

No need for tunnel configuration. Each NpduElement has the following attributes: * pdu_id * pdu_index * payload * direction * tci (VlanTci object, optional)

Parameters:
  • ecu_name – ecu name (From databex)

  • npdu_id – Npdu identifier.

Returns:

True if the transmission is stopped. False otherwise.