LinTransmitter
- class mtf.network_port.bus_transmitter.LinTransmitter
This class implements functionality for frames transmission over a LIN bus.
- transmitter = <mtf.libs.mtf_pybinder.mtf_lin_transmitter object>
- classmethod transmit_frame(channel_name: str, frame_id: int, payload: List)
Transmits the given LIN frame on a specific channel.
- Args:
channel_name (str): The name of the LIN channel to transmit the frame over. frame_id (int): The ID of the LIN frame to transmit. payload (FramePayload): The payload of the LIN frame to transmit.
- Returns:
bool: True on success; False otherwise.
- classmethod wake_up_lin_bus(channel_name: str)
Wakes up the given LIN bus on the associated channel (Async Wake up sending).
- Args:
channel_name (str): The LIN bus to wake up.
- Returns:
bool: True if the LIN bus wakes up successfully; False otherwise.
- classmethod get_state(channel_name: str)
Gets the current LIN bus state on the associated channel.
- Args:
channel_name (str): The LIN bus to check.
- Returns:
LinBusState: The current LIN bus state.
Note:
Note
Possible LIN bus states are:
Init : node is initiated.
Operational : node is awake.
Sleep : node in sleep mode.