NPdu

class mtf.libs.mtf_pybinder.NPdu

data structure for a NPdu

ClearHistory(self: mtf.libs.mtf_pybinder.NPdu) None

Clear history of the listener queue.

GetHistory(self: mtf.libs.mtf_pybinder.NPdu) list[mtf.libs.mtf_pybinder.ComNpdElement]

Get history of the listener queue.

StartListening(self: mtf.libs.mtf_pybinder.NPdu, callback: Callable | None = None, tecmp_filter: mtf.libs.mtf_pybinder.mtf_tecmp_filter | None = None) bool

Start the NPDU listener, The pycallback should have as arg (ecu_name: str,npdu_element:mtf_npdu_element,timestamp: int)

StopListening(self: mtf.libs.mtf_pybinder.NPdu) bool

Stop the NPDU listener.

__init__(*args, **kwargs)
__new__(**kwargs)
cancel_undefined_cycle(self: mtf.libs.mtf_pybinder.NPdu) bool

Cancel the undefined cycle by stopping new unconfigured cyclic transmissions and restoring the old configured cycle if the entity is cyclic.

property dst_endpoint
get_all_pdus(self: mtf.libs.mtf_pybinder.NPdu) list[mtf.libs.mtf_pybinder.ComPdu]

Retrieve all contained PDUs in this NPdu

get_pdu_by_name(self: mtf.libs.mtf_pybinder.NPdu, arg0: str) mtf.libs.mtf_pybinder.ComPdu

Retrieve a contained PDU in this NPdu by name.

property id

NPdu id

property is_multiplexed

Provide PDU Multiplexing status over this NPdu

property is_started

Check if the transmission of the npdu is started.

property name

NPdu name

property pdu

Provides the NPdu’s pdu instance. Returns a valid instance only if PDU Multiplexing does not exists over this NPdu.

property receivers

Get NPdu receivers

property receivers_ecus

Get NPdu receivers Ecus

property src_endpoint
start_transmission(self: mtf.libs.mtf_pybinder.NPdu) bool

Start transmission of this npdu.

stop_transmission(self: mtf.libs.mtf_pybinder.NPdu) bool

Stop transmission of this npdu.

transmit(self: mtf.libs.mtf_pybinder.NPdu, payload: list, force: bool) mtf.libs.mtf_pybinder.Result

Transmit the NPdu with the given payload (Paylod length should respect the database) set force to True in order to force the transmission i.e ignore triggering conditions

try_switch_to_undefined_cycle(self: mtf.libs.mtf_pybinder.NPdu, new_cycle: int, repetition: int = 2147483647) bool

Attempt to switch the existing cycle to a new one (in milliseconds) for a specified number of times. If the default value of “repetition” is used, it will be changed until calling “cancel_undefined_cycle”. If the NPdu is no cyclic, it will start its transmission cyclically with the specified cycle. Returns False if the NPdu is not started, otherwise True.