Can Pdu Generator Module

class mtf.network_port.iso_tp.custom_can_tp.can_pdu_generator.CanPduGenerator
__init__(message, config: IsoTpConfig)
is_signle_frame() bool

Check if the message can be transmitted in a single frame (SF).

Returns:

bool: True if the message can be transmitted in a single frame, False otherwise.

generate_single_frame() List[int]

Generate a Single Frame (SF) for the message.

Returns:

FramePayload: The Single Frame payload or an empty list if a Single Frame cannot be generated.

generate_all_pdus()

Generate all Protocol Data Units (PDUs) needed to transmit the message.

Returns:

List[FramePayload]: List of PDUs to transmit the message, including First Frames and Consecutive Frames.