ComFrame
- class mtf.libs.mtf_pybinder.ComFrame
Com frame class
- __init__(*args, **kwargs)
- __new__(**kwargs)
- apply_faulty(self: mtf.libs.mtf_pybinder.ComFrame, faulty_type: mtf.libs.mtf_pybinder.FrameFaultyType, on_off: bool) mtf.libs.mtf_pybinder.Result
Injects faulty changes on the frame. The faulty type determines the type of fault to be applied, and the on_off argument controls whether the fault is activated or deactivated. Set on_off to true to activate the fault, and false to deactivate it.
- cancel_undefined_cycle(self: mtf.libs.mtf_pybinder.ComFrame) bool
Cancel the undefined cycle by stopping new unconfigured cyclic transmissions and restoring the old configured cycle if the entity is cyclic.
- decode(*args, **kwargs)
Overloaded function.
decode(self: mtf.libs.mtf_pybinder.ComFrame, payload: list[int], decoding_attribute: mtf::com::network::signal_based::SignalsEncodingDecodingAttribute) -> dict[str, Union[int, int, float, list[int], str]]
Decode payload into (signal name:signal value) pairs
decode(self: mtf.libs.mtf_pybinder.ComFrame, payload: list[int]) -> dict[str, mtf::core::VectorValue<unsigned char>]
Decode payload into (PDU name:PDU payload) pairs
- encode(self: mtf.libs.mtf_pybinder.ComFrame, 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 Frame payload
- get_all_pdus(self: mtf.libs.mtf_pybinder.ComFrame) list[mtf.libs.mtf_pybinder.ComPdu]
Retrieve all PDU contained PDUs in this frame
- get_last_received_value(self: mtf.libs.mtf_pybinder.ComFrame) mtf.libs.mtf_pybinder.MtfDataFrameEvent
Retrieve the last received value of this frame.
- get_pdu_by_name(self: mtf.libs.mtf_pybinder.ComFrame, pdu_name: str) mtf.libs.mtf_pybinder.ComPdu
Retrieve a PDU contained in this frame by name.
- get_receivers_names(self: mtf.libs.mtf_pybinder.ComFrame) set[str]
Retrieve the list of the frame receivers Ecus.
- get_senders_names(self: mtf.libs.mtf_pybinder.ComFrame) set[str]
Retrieve the list of the frame senders Ecus.
- get_signal_by_name(self: mtf.libs.mtf_pybinder.ComFrame, signal_name: str) mtf.libs.mtf_pybinder.ComSignal
Retrieve a signal contained in this frame by name.
- property id
Retrieve the frame identifier.
- property is_started
Check if the transmission of the frame is started.
- property receivers
Get Frame receivers
- property short_name
Retrieve the frame short name.
- start_transmission(self: mtf.libs.mtf_pybinder.ComFrame) bool
Start transmission of this frame.
- stop_transmission(self: mtf.libs.mtf_pybinder.ComFrame) bool
Stop transmission of this frame.
- transmit(self: mtf.libs.mtf_pybinder.ComFrame, payload: list[int], do_force: bool) mtf.libs.mtf_pybinder.Result
Transmit Frame. “do_force” select if the contained frame transmission request will be forced or will be based on the configured triggering conditions.
- try_switch_to_undefined_cycle(self: mtf.libs.mtf_pybinder.ComFrame, 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 frame is not cyclic, it will start its transmission cyclically with the specified cycle. Please use it carefully!, if it is called for many frames in the same channel, it may lead to micro bursts as it is out of the transmisson requests scheduling!! Returns False if the frame is not started or does not support this feature, otherwise True.
- property type
Retrieve the frame type.