X20 system modules • Digital signal processing modules • X20DS1828
X20 system User's Manual 3.10
1383
First, the messages must be split into segments. As in the default configuration, it is important for each sequence
to begin with a control byte. The free bits in the MTU at the end of a message are filled with data from the following
message, however. With this option, the "nextCBPos" bit is always set if payload data is sent after the control byte.
MTU = 7 bytes → Max. segment length = 6 bytes
•
Message 1 (7 bytes)
➯
First segment = Control byte + 6 bytes of data (MTU full)
➯
Second segment = Control byte + 1 byte of data (MTU still has 5 open bytes)
•
Message 2 (2 bytes)
➯
First segment = Control byte + 2 bytes of data (MTU still has 2 open bytes)
•
Message 3 (9 bytes)
➯
First segment = Control byte + 1 byte of data (MTU full)
➯
Second segment = Control byte + 6 bytes of data (MTU full)
➯
Third segment = Control byte + 2 bytes of data (MTU still has 4 open bytes)
•
No more messages
➯
C0 control byte
A unique control byte must be generated for each segment. In addition, the C0 control byte is generated to keep
communication on standby.
C1 (control byte 1)
C2 (control byte 2)
C3 (control byte 3)
- SegmentLength (6)
=
6 - SegmentLength (1)
=
1 - SegmentLength (2)
=
2
- nextCBPos (1)
=
64 - nextCBPos (1)
=
64 - nextCBPos (1)
=
64
- MessageEndBit (0)
=
0 - MessageEndBit (1)
=
128 - MessageEndBit (1)
=
128
Control byte
Σ
70 Control byte
Σ
193 Control byte
Σ
194
Table 432: FlatStream determination of the control bytes for the MultiSegmentMTU example (part 1)
Warning!
The second sequence must have been completely processed before it can be acknowledged with Se-
quenceAck. In this example, there are three different segments within the second sequence, i.e. the
program must include enough receive arrays to handle this situation.
C4 (control byte 4)
C5 (control byte 5)
C6 (control byte 6)
- SegmentLength (1)
=
1 - SegmentLength (6)
=
6 - SegmentLength (2)
=
2
- nextCBPos (6)
=
6 - nextCBPos (1)
=
64 - nextCBPos (1)
=
64
- MessageEndBit (0)
=
0 - MessageEndBit (1)
=
0 - MessageEndBit (1)
=
128
Control byte
Σ
7 Control byte
Σ
70 Control byte
Σ
194
Table 433: FlatStream determination of the control bytes for the MultiSegmentMTU example (part 2)