Symeo LPR
®
-System
LPR
®
-2DB
Product Documentation
Symeo
2D Protocol
Copyright © Symeo 2012
Page 109 of 132
protocol by
0x7d
0x7d 0x5d
0x7e
0x7d 0x5e
0x7f
0x7d 0x5f
Figure 59
– Substitution rules for byte stuffing
Each time one of the three exclusive symbols occurs in the data packet it is replaced by two
other symbols. In the worst case the whole data packet consists of exclusive symbols. In this
case the length of the data packet is doubled.
The byte stuffing makes sure that the receiver can identify the
BINARY-START
field
definitively, even if the payload data contains the reserved symbol.
Decoding the byte stuffing at the receiver side can be implemented as following:
When reading symbol
0x7d
, discard this symbol and combine the next symbol via XOR-
function with
0x20
, which will restore the original symbol.
The byte stuffing can only be used for the binary format of the 2D protocol. It is activated per
default. If you want to disable byte stuffing you have to enter in the configuration file the
following line:
[DisableBytestuffing] 1
10.2.3 General Structure
The structure of the data packet of the 2D protocol is identified in the configuration file. For
one configuration all data packets have the same length and the same structure. In the
configuration file you identify the desired data fields. Figure 60 shows the structure of the
data packet for the standard configuration.
Data field
START
POSITION
END
Figure 60 - General structure of data packet with standard configuration
If required additional data fields can be activated. The sequence of the activated data fields
is fixed and cannot be changed. Figure 61 shows the structure of the data packet with all
activated data fields.
Data field
START