Length Field; Frame Data; Checksum Field - Digi XLR PRO User Manual

Radio frequency (rf) module
Hide thumbs Also See for XLR PRO:
Table of Contents

Advertisement

Operate in API mode
In API mode with escaped characters, the length field does not include any escape characters in the
frame and the firmware calculates the checksum with non-escaped data.
Example: escape an API frame
To express the following API non-escaped frame in API operating mode with escaped characters:
Start delimiter Length Frame type
7E
00 0F 17
You must escape the 0x13 byte:
1. Insert a 0x7D.
2. XOR byte 0x13 with 0x20: 13 ⊕ 20 = 33
The following figure shows the resulting frame. Note that the length and checksum are the same as
the non-escaped frame.
Start delimiter Length Frame type
7E
00 0F 17
The length field has a two-byte value that specifies the number of bytes in the frame data field. It does
not include the checksum field.

Length field

The length field is a two-byte value that specifies the number of bytes contained in the frame data
field. It does not include the checksum field.

Frame data

This field contains the information that a device receives or will transmit. The structure of frame data
depends on the purpose of the API frame:
Start delimiter
1
0x7E
Frame type is the API frame type identifier. It determines the type of API frame and indicates
n
how the Data field organizes the information.
Data contains the data itself. This information and its order depend on the what type of frame
n
that the Frame type field defines.
Multi-byte values are sent big-endian.

Checksum field

To test data integrity, a checksum is calculated and verified on non-escaped data.
To calculate: Not including frame delimiters and length, add all bytes keeping only the lowest 8 bits of
the result and subtract the result from 0xFF.
XLR PRO Radio Frequency (RF) Module User Guide
Frame Data
Data
01 00 13 A2 00 40 AD 14 2E FF FE 02 4E 49 6D
Frame Data
Data
01 00 7D 33 A2 00 40 AD 14 2E FF FE 02 4E 49 6D
Length
Frame type
2
3
4
API frame type
MSB
LSB
Frame data
Data
5
6
7
8
9
...
Data
API frame format
Checksum
Checksum
Checksum
n
n+1
Single byte
82

Advertisement

Table of Contents
loading

Table of Contents