Segmentation

Message Segmentation

To transmit a diagnostic message, its information (payload and addressing) must be unambiguously encoded into one or more segments (these segments are called UDS Packets by this documentation) that are specific for bus used.

Note

Segmentation process is specific for each bus due to various topologies supported by each bus, various communication models (e.g. Master/Slave) enforced by them, etc.

Segmentation on CAN

Unsegmented message transmission

When mentioning unsegmented message transmission, we mean a case when an entire Diagnostic Message can be fully transmitted by a single packet. Single Frame (CAN Packet) is the only type of CAN Packets that can be used in the described scenario.

Unsegmented Message on CAN

Transmission of an unsegmented Diagnostic Message on CAN bus.

A sender transmits a Single Frame (CAN Packet) that contains an entire Diagnostic Message.

Segmented message transmission

When a Diagnostic Message to be transmitted on CAN contains payload which size is greater than a Single Frame capacity, then the message payload must be divided and transmitted by many CAN packets. The first packet to carry such messages is First Frame (CAN Packet) and its transmission is followed by Consecutive Frames (CAN Packets). A receiver controls the stream of incoming Consecutive Frames by sending Flow Control (CAN Packet) after First Frame and each complete transmission of Consecutive Frames block.

Note

The size of Consecutive Frames block is determined by Block Size parameter which value is carried by Flow Control.

Note

The minimum time between two Consecutive Frames is determined by Separation Time Minimum parameter which value is carried by Flow Control.

Segmented Message on CAN

Transmission of a segmented Diagnostic Message on CAN bus.

A sender initiates Diagnostic Message transmission with a First Frame (CAN Packet) Then, a receiver controls the stream of incoming Consecutive Frames (CAN Packets) by transmitting Flow Controls (CAN Packets).

See also

Only the typical use case of Flow Control was described here. Check Flow Status parameter and meaning of its values to study less likely scenarios.

Packets Desegmentation

Desegmentation is an unambiguous operation which is the reverse process to a message segmentation. It transforms one or more UDS packets into a diagnostic message.

Note

There are many ways to segment a diagnostic message into CAN packets, but there is always only one correct way to perform desegmentation and decode a diagnostic message out of CAN Packets.