CanFdTransmitter
- class mtf.network_port.bus_transmitter.CanFdTransmitter
Manage data transmission specifically on a CANFD bus
- classmethod transmit_frame(channel_name: str, frame_id: int, payload: List, bit_rate_switch=True)
Transmits a CANFD frame on the specified channel.
- Args:
channel_name (str): The name of the CANFD channel to transmit the frame on. frame_id (int): The ID of the CANFD frame to transmit. payload (FramePayload): The payload of the CAN frame to transmit. bit_rate_switch (bool, optional): Whether to use the bit rate switch (BRS) feature
True -> BRS.ON False -> BRS.OFF Defaults to False.
- Returns:
bool: True if succeeded
- classmethod start_transmit_cyclic_frame(channel_name: str, frame_id: int, payload: List, cycle: int)
Initiates the cyclic transmission of a CANFD frame on a specific channel Args:
channel_name (str): The channel name frame_id (int): The ID of the CANFD frame payload (FramePayload): The payload of the CANFD frame to transmit cycle (int): Cycle duration
- Return:
bool: The method returns True if the cyclic transmission was started successfully, or False if it failed
- classmethod stop_transmit_cyclic_frame(channel_name: str, frame_id: int)
Stops the cyclic transmission of a CANFD frame Args:
channel_name (str): The channel name frame_id (int): The ID of the CANFD frame
- Return:
bool: True if the cyclic transmission was successfully stopped, False otherwise
- transmitter = <mtf.libs.mtf_pybinder.mtf_can_transmitter object>