EasyManua.ls Logo

Bristol 871A - Page 35

Bristol 871A
78 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Model 871A User’s Manual MAKING MEASUREMENTS
Bristol Instruments, Inc. 35
Encoding
Each measurement begins with the special byte 0x7E (the “start token”). To make it easy
to identify the beginning of a measurement, the data is formatted so that this byte only
ever occurs at the beginning of a measurement packet.
The encoding scheme is as follows:
Every occurrence of 0x7E in the measurement data is replaced with the two-byte
sequence 0x7D 0x5E. (The second byte is 0x7E XOR 0x20.)
Every occurrence of 0x7D in the measurement data is replaced with the two-byte
sequence 0x7D 0x5D. (The second byte is 0x7D XOR 0x20.)
Every other byte is encoded as itself.
The decoding process is as follows.
If the byte 0x7E is received, then the next byte will be the first byte of the
measurement packet.
If the byte 0x7D is received, then the next byte should be XORed with 0x20 and then
included in the decoded result. (The 0x7D byte should not be included in the result).
If any other byte is received, then it should be included as-is in the decoded result.
The contents of the four measurement fields are given in little-endian order. Excluding the
start token, each measurement packet is twenty bytes long after decoding.

Related product manuals