3DM
®
-GX5-35
DCP Manual
Below is an example of a packet payload with two fields (gyro vector and mag vector). Note the
payload length byte of
0x1C
which is the sum of the two field length bytes
0x0E
+
0x0E
:
Header
Packet Payload (2 Fields)
Checksum
SYNC1
“u”
SYNC2
“e”
Descriptor
Set byte
Payload
Length
byte
Field 1
Length
Field 1
Descriptor
Field 1 Data
Field 2
Length
Field 2
Descriptor
Field 2
Data
MSB
LSB
0x75
0x65
0x80
0x1C
0x0E
0x05
0x3E 7A 63 A0
0xBB 8E 3B 29
0x7F E5 BF 7F
0x0E
0x06
0x3E 7A 63 A0
0xBB 8E 3B 29
0x7F E5 BF 7F
0xE0
0xC6
2.2
Command Overview
The basic command sequence begins with the host sending a command to the device. A command
packet contains a field with the command value and any command arguments.
The device responds by sending a reply packet. The reply contains at minimum an ACK/NACK field. If
any additional data is included in a reply, it appears as a second field in the packet.
2.2.1
Example “Ping” Command Packet
Below is an example of a “Ping” command packet from the Base command set. A “Ping” command
has no arguments. Its function is to determine if a device is present and responsive:
Header
Packet Payload
Checksum
SYNC1 “u
SYNC2 “e”
Descriptor
Set byte
Payload Length
byte
Field
Byte
Length
Field
Descriptor
Byte
Field Data
MSB
LSB
0x75
0x65
0x01
0x02
0x02
0x01
N/A
0xE0
0xC6
Copy-Paste version of command: “7565 0102 0201 E0C6”
The packet header has the “ue” starting sync bytes characteristic of all
. The descriptor
set byte (0x01) identifies the payload as being from the Base command set. The length of the
payload portion is 2 bytes. The payload portion of the packet consists of one field. The field starts
with the length of the field which is followed by the descriptor byte (0x01) of the field. The field
descriptor value is the command value. Here the descriptor identifies the command as the “Ping”
command from the Base command descriptor set. There are no parameters associated with the
ping command, so the field data is empty. The checksum is a two byte
(see the
for instructions on how to compute a Fletcher two byte checksum).
10