Lin Frame Module

class mtf.network_port.frames.lin_frame.LinFrameTransmitter
__init__(bus_name: str, frame_id: int) None
raise_exception(*args, **kwargs)
class mtf.network_port.frames.lin_frame.LinFrame
__init__(channel_name: str, frame_id: str)

Initializes a Frame instance with the given couple (channel_name, frame_id).

Args:

channel_name (str): The name of the channel. frame_id (str): The ID of the frame.

property listener: LinFrameListener
property transmitter: LinFrameTransmitter
static __new__(cls, channel_name: str, frame_id: str, *args, **kwargs)

Overrides the __new__ method to ensure only one instance of Frame class is created for each (channel_name, frame_id) pair.

Args:

channel_name (str): The name of the channel. frame_id (str): The ID of the frame

Returns:

Frame: The Frame instance associated with the (channel_name, frame_id) pair.

property channel_name: str

Retrieves the name of the channel.

Returns:

str: The name of the channel.

classmethod clear_registered_frames()

Clears the instances dictionary of registered frames.

property frame_id: str

Retrieves the ID of the frame.

Returns:

str: The ID of the frame.

property frame_name: str

Retrieves the name of the frame.

Returns:

str: The name of the frame.

get_last_received_frame() List

Retrieves the last received frame payload.

Returns:

FramePayload: The payload of the last received frame.

get_pdu(pdu_name: str) Pdu

Retrieves a Pdu object associated with the given pdu_name.

Args:

pdu_name: The name of the pdu.

Returns:

Signal: The Pdu object associated with the pdu_name.

start_transmission_frame() bool

Starts the transmission of the frame.

Returns:

bool: True if the transmission is successfully started, False otherwise.

stop_transmission_frame() bool

Stops the transmission of the frame.

Returns:

bool: True if the transmission is successfully stopped, False otherwise.