ComPdu

class mtf.libs.mtf_pybinder.ComPdu

Com pdu class

__init__(*args, **kwargs)
__new__(**kwargs)
apply_fault_data_id(self: mtf.libs.mtf_pybinder.ComPdu, on_off: bool) None

corrupt data id i.e set a wrong value (original id xor 0xffffffff)

apply_fault_data_length(self: mtf.libs.mtf_pybinder.ComPdu, on_off: bool) None

corrupt data length i.e set a wrong value

corrupt_alive_counter_sequence(self: mtf.libs.mtf_pybinder.ComPdu, on_off: bool, step: int = -1, enable_counter_setting: bool = False, initial_value: int = 0, reset_memory: bool = False) None

Enable/Disable a wrong sequence for the alive counter incrementation with an optional initial counter value to set

corrupt_crc(self: mtf.libs.mtf_pybinder.ComPdu, on_off: bool, reset_memory: bool = False) None

corrupt CRC i.e set a wrong value.

corrupt_data_id_nibble(self: mtf.libs.mtf_pybinder.ComPdu, on_off: bool) None

Set data id nibble with a wrong value.

decode(self: mtf.libs.mtf_pybinder.ComPdu, payload: list[int], decoding_attribute: mtf::com::network::signal_based::SignalsEncodingDecodingAttribute) dict[str, int | int | float | list[int] | str]

Decode payload into (signal name:signal value) pairs

disable_cyclic_sending(self: mtf.libs.mtf_pybinder.ComPdu) None

Disable cyclic sending of this PDU.

disable_event_controlled_sending(self: mtf.libs.mtf_pybinder.ComPdu, on_off: bool) None

Disable event-controlled sending for this PDU.

encode(self: mtf.libs.mtf_pybinder.ComPdu, signals_values: dict[str, Union[int, int, float, list[int], str]], encoding_attribute: mtf::com::network::signal_based::SignalsEncodingDecodingAttribute) list[int]

Encode signals values into PDU payload

get_all_signals(self: mtf.libs.mtf_pybinder.ComPdu) list[mtf.libs.mtf_pybinder.ComSignal]

Retrieve all signals contained in this PDU.

get_cycling_timings(self: mtf.libs.mtf_pybinder.ComPdu) list[mtf.libs.mtf_pybinder.CyclicTiming]

“Get all cyclic timings from the pdu.”

get_last_received_value(self: mtf.libs.mtf_pybinder.ComPdu) list[int]

Retrieve the last received value of this PDU.

get_signal_by_name(self: mtf.libs.mtf_pybinder.ComPdu, signal_name: str) mtf.libs.mtf_pybinder.ComSignal

Retrieve the signal contained in this PDU by name.

halt_alive_counter(self: mtf.libs.mtf_pybinder.ComPdu, on_off: bool) None

Prevent counter incrementation.

property length_in_bytes

Retrieve length in bytes of this PDU.

property listener

Retrieve listener of this PDU.

secoc_use_wrong_freshness(self: mtf.libs.mtf_pybinder.ComPdu, on_off: bool) bool

Use wrong freshness for SecOC.

set_pdu_bits(self: mtf.libs.mtf_pybinder.ComPdu, unused_area: mtf.libs.mtf_pybinder.PduUnusedArea, signal_value: int | list[int]) bool

Encode signals values into PDU payload

property short_name

Retrieve the PDU short name.

transmit(self: mtf.libs.mtf_pybinder.ComPdu, payload: list[int], do_force: bool) mtf.libs.mtf_pybinder.Result

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

update_active_cycle_timing(self: mtf.libs.mtf_pybinder.ComPdu, new_cycle: int) bool

Update the active cycle timing of the PDU. Returns True if the new cycle value exists in the data base and the update was done successfully, otherwise False.