beautypg.com

Operation with v2xe protocol, Datagram structure, 5operation with v2xe protocol – PNI CompassPoint V2Xe User Manual

Page 10: 1 datagram structure

background image

V2Xe User Manual

– May 2012

Page 8

5

Operation with V2Xe Protocol

The following section describes the data structure and the commands used to communicate with

the V2Xe over its SPI interface.

5.1

Datagram Structure

The datagram structure for a basic message is given below:

Example: the command for kStartCal would be as specified below.

The datagram for a message with data is given below. This is a variable length message

depending on the number of parameters.

Example: the command for kSetDataComponents with parameters kHeading and

kMagnitude is specified below.

Sync Flag

0xAA

Byte 1

Frame Type

0x03

Byte 2

(kSetData

Components)

Param Count

0x02

Byte 3

Param 1

0x05

Param 2

0x06

Terminator

0x00

Byte 4

(kHeading)

Byte 5

(kMagnitude)

Byte 6

Sync Flag

0xAA

Byte 2

Frame Type

0xXX

Byte 1

Byte 3

Optional Data Field

0xXX, 0xXX,…

Byte 4

Terminator

0x00

Sync Flag

0xAA

Byte 2

(kStartCal)

Frame Type

0x0A

Byte 1

Byte 3

Terminator

0x00

Sync Flag

0xAA

Byte 2

Frame Type

0xXX

Byte 1

Byte 3

Terminator

0x00