Frame Module

class mtf.network_port.frames.frame.FrameTransmitter
__init__(bus_name: str, frame_id: int) None
raise_exception(*args, **kwargs)
class mtf.network_port.frames.frame.Frame
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.

__init__(channel_name: str, frame_id: str, *args, **kwargs)

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 channel_name: str

Retrieves the name of the channel.

Returns:

str: The name of the channel.

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.

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.

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.

classmethod clear_registered_frames()

Clears the instances dictionary of registered frames.