beautypg.com

Footer, Message types, Message examples – Ocean Optics Ventana User Manual

Page 12

background image

Ventana Data Sheet

12

891-00000-200-05-201305

If a checksum is used, it will be computed starting with the start byte of the header and continuing
through the last byte of the payload. The length of the checksum and footer will not be included in the
checksum (i.e., for MD5, which includes the total data length as a salt value).

Footer

After the checksum block, a 4-byte footer is provided. The footer has a constant value of
0xC5C4C3C2. Do not reverse the order of the footer.

Message Types

The binary protocol divides up the 4.29 billion possible message types into categories and
subcategories in a hierarchy. The most significant bits represent the more abstract categories, while the
least significant bits represent subcategories and the commands. The 32-bit message type is split into
three blocks, 0xXXX YYY ZZ, as follows:

XXX: top-level category or feature. 4096 of these may exist.

YYY: subcategories within the feature. 4096 of these may exist for each category.

ZZ: specific commands for the subcategory. 255 of these may exist for each subcategory.

The top-level categories (XXX) are initially defined as follows.

0x000: General device characteristics

0x001: Spectrometer feature (control of detector and ADC, pixel calibrations and corrections)

0x002: GPIO feature (configuration and control)

0x003: Strobe features (single and continuous strobe timing)

0x004: Temperature

The subcategories and commands for each of these categories are described in the tables that follow.
Input and output data lengths that can be computed from the header (Bytes Remaining field) are not
shown. All multi-byte integer types will be returned in little-endian format (least significant byte
first). All data will be carried over Endpoint 1or Endpoint 2 IN and OUT unless otherwise stated.

Message Examples

The following is an example of how the Set Integration Time message type (0x001 100 10) can be
constructed based on the information provided in this data sheet:

Header

Byte 0

Byte 1

Byte 2

Byte 3

Byte 4

Byte 5

Byte 6

Byte 7

0xC1

0xC0

0x00

0x10

0x00

0x00

0x00

0x00

Start bytes

Protocol version

Flags

Error number

Byte 8

Byte 9

Byte 10

Byte 11 Byte 12 Byte 13 Byte 14

Byte 15

0x10

0x00

0x11

0x00

x

x

x

x

Message type (0x00110010)

Regarding (user-specified)