beautypg.com

Operation with pni binary protocol, Datagram structure, Table 7-1: configuration – PNI CompassPoint Prime User Manual

Page 36: Figure 7-1: datagram structure, On 7, 7operation with pni binary protocol, 1 datagram structure

background image

PNI Sensor Corporation

DOC# 1014177 r08

Prime User Manual

– July 2011

Page 30

7

Operation with PNI Binary Protocol

The Prime utilizes a binary protocol that is transmitted over an RS232 interface. The

configuration parameters should be set as follows:

Table 7-1: Configuration

Parameter

Value

Number of Data Bits

8

Start Bits

1

Stop Bits

1

Parity

none

7.1

Datagram Structure

The data structure is shown below:

ByteCount

(UInt16)

Packet Frame

(1 - 4092 UInt8)

CRC-16
(UInt16)

Payload

(1 - 4091 UInt8)

Frame

ID

(UInt8)

Figure 7-1: Datagram Structure

The ByteCount is the total number of bytes in the packet including the CRC-16 (checksum).

CRC-16 is calculated starting from the ByteCount to the last byte of the Packet Frame (see

included C function at end of document). The ByteCount and CRC-16 are always

transmitted in Big Endian.