Control bytes

<< 点击显示目录 >>

主页  振动监测 > X20CM4800X  > Register description  > Flatstream communication  > Registers for Flatstream mode  > Flatstream operation  >

Control bytes

X20CM4800X - Data sheet V1.04

In addition to the payload data, the Tx and Rx bytes also transfer the necessary control bytes. These control bytes contain additional information about the data stream so that the receiver can reconstruct the original message from the transferred segments.

Bit structure of a control byte

Bit

Description

Value

Information

0 - 5

SegmentLength

0 - 63

Size of the subsequent segment in bytes (default: Max. MTU size - 1)

6

nextCBPos

0

Next control byte at the beginning of the next MTU

1

Next control byte directly after the end of the current segment

7

MessageEndBit

0

Message continues after the subsequent segment

1

Message ended by the subsequent segment

SegmentLength

The segment length lets the receiver know the length of the coming segment. If the set segment length is insufficient for a message, then the information must be distributed over several segments. In these cases, the actual end of the message is detected using bit 7 of the control byte.

Information:

The control byte is not included in the calculation to determine the segment length. The segment length is only derived from the bytes of payload data.

nextCBPos

This bit indicates the position where the next control byte is to be expected. This information is especially important when using option "MultiSegmentMTU".

When using Flatstream communication with multi-segment MTUs, the next control byte is no longer expected in the first Rx byte of the subsequent MTU, but transferred directly after the current segment.

MessageEndBit

"MessageEndBit" is set if the subsequent segment completes a message. The message has then been completely transferred and is ready for further processing.

Information:

In the output direction, this bit must also be set if one individual segment is enough to hold the entire message. The module will only process a message internally if this identifier is detected.

The size of the message being transferred can be calculated by adding all of the message's segment lengths together.

Flatstream formula for calculating message length:

Message [bytes] = Segment lengths (all CBs without ME) + Segment length (of the first CB with ME)

CB

Control byte

ME

MessageEndBit