FlexrayTransmitter
- class mtf.network_port.bus_transmitter.FlexrayTransmitter
This class implements functionality for frames transmission over a FlexRay bus.
- transmitter = <mtf.libs.mtf_pybinder.mtf_flexray_transmitter object>
- classmethod transmit_frame(channel_name: str, frame_id: str, payload: ~typing.List, communication_channel: ~mtf.enum_types.FRCommunicationChannel = <FRCommunicationChannel.A: 0>, transmission_mode: ~mtf.enum_types.TransmissionMode = TransmissionMode.SingleShot)
Transmits the given FlexRay frame.
- Args:
channel_name (str): The name of the Flexray channel to transmit the frame over. frame_id (str): The ID of the Flexray frame to transmit. payload (FramePayload): The payload of the FlexRay frame to transmit. communication_channel (FRCommunicationChannel): The specific FlexRay communication channel (A or B).
Defaults to FRCommunicationChannel.ChannelA.
transmission_mode (TransmissionMode): Continuous or SingleShot.
- Returns:
bool: True on success; False otherwise.
- classmethod stop_transmit(channel_name: str, frame_id: str | int, communication_channel: ~mtf.enum_types.FRCommunicationChannel = <FRCommunicationChannel.A: 0>)
Stops the continuous transmission of the given frame on a specific communication channel.
- Args:
channel_name (str): The name of the Flexray channel to stop transmitting the frame over. frame_id (Union[str, int]): The ID of the Flexray frame. communication_channel (FRCommunicationChannel): The specific FlexRay communication channel (A or B).
Defaults to FRCommunicationChannel.ChannelA.
- Returns:
bool: True if the transmission was successfully stopped; False otherwise.
- classmethod activate_wake_up(channel_name: str, do_wake_up: bool)
Activates wake up for the given channel.
- Args:
channel_name (str): The channel name. do_wake_up (bool): Whether to automatically wake the FLEXRAY bus up when sleeping.
- Returns:
bool: True on success; False otherwise.
- classmethod start_fr_communication(channel_name: str, do_wake_up: bool)
Starts the FlexRay communication for the given channel.
- Args:
channel_name (str): The channel name. do_wake_up (bool): Whether to automatically wake the bus up when sleeping.
- Returns:
bool: True if the FlexRay communication started successfully; False otherwise.
- classmethod stop_fr_communication(channel_name: str)
Stops communication for the given FlexRay bus.
- Args:
channel_name (str): The name of the FlexRay bus to stop.
- Returns:
bool: True on success; False otherwise.
Note:
Note
This method stops the sync messages from being transmitted.