FlexrayTransmitter
- class mtf.network_port.bus_transmitter.FlexrayTransmitter
Manage data transmission specifically on 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 a Flexray frame on the specified channel
- Args:
channel_name (str): The name of the Flexray channel to transmit the frame on frame_id (int): The ID of the Flexray frame to transmit payload (FramePayload): The payload of the CAN frame to transmit communication_channel (FRCommunicationChannel) transmission_mode (TransmissionMode)
- Returns:
bool: True if succeeded
- classmethod stop_transmit(channel_name: str, frame_id: str | int, communication_channel: ~mtf.enum_types.FRCommunicationChannel = <FRCommunicationChannel.A: 0>)
- Stops the continuous transmission of a frame on a specified communication channel
- Args:
channel_name (str): The name of the Flexray channel to transmit the frame on frame_id (Union[str, int]): The ID of the Flexray frame to transmit communication_channel (FRCommunicationChannel): The specific FlexRay communication
channel where the transmission should be stopped
- Returns:
bool: True if the transmission was successfully stopped, False otherwise
- classmethod activate_wake_up(channel_name: str, do_wake_up: bool)
Activate wake up for a given channel args:
channel_name (str): The channel name do_wake_up (bool) Whether to wake up the FLEXRAY bus when the bus sleeps automatically
- Returns:
bool: True if the FLEXRAY bus wakes up successfully, False otherwise.