X90 mobile modules
214
X90 mobile system User's manual V 1.20 - Translation of the original manual
General flow chart
Segment data handling
Synchronization
No
No
No
No
Yes
Yes
Yes
Yes
Yes
Yes
No
No
No
Yes
Yes
No
Yes
No
InputSyncAck = 1?
InputSequenceAck > 0?
InputSyncAck = 1
(InputSequenceCounter –
InputSequenceAck)
AND 0x07 = 1?
MTU_Offset = 0
RemainingSegmentSize = 0?
►
DataSize = InputMTU_Size – MTU_Offset
RemainingSegmentSize >
(InputMTU_Size - MTU_Offset)?
►
DataSize = RemainingSegmentSize
RemainingSegmentSize = 0 AND
(SegmentFlags AND 0x40) = 0?
InputMTU_Size = MTU_Offset?
RemainingSegmentSize = 0 AND
(SegmentFlags AND 0x80) = 0?
► InputSequenceAck =
InputSequenceCounter
►
Mark frame as complete
InputSyncBit = 1?
Start
►
►
►
InputSequenceAck = InputSequenceCounter
RemainingSegmentSize = 0
SegmentFlags = 0
►
►
►
RemainingSegmentSize =
MTU_Data[MTU_Offset] AND 0b0011 1111
SegmentFlags =
MTU_Data[MTU_Offset] AND 0b1100 0000
MTU_Offset = MTU_ 1
►
►
►
Copy segment data, e.g. memcpy(xxx, ADR(MTU_Data[MTU_Offset]), DataSize)
MTU_Offset = MTU_ DataSize
RemainingSegmentSize = RemainingSegmentSize - DataSize
Figure 50: Flow chart for the input direction