Header – Ocean Optics Ventana User Manual
Page 9
Ventana Data Sheet
891-00000-200-05-201305
9
2. An optional payload
3. A 16-byte checksum block
4. A four byte footer
The header, checksum, and footer are 64 bytes total. For simple messages, the command or response
is embedded in the header so only a single packet is required. For more complex messages, the header
and footer add a single USB packet as overhead to the transfer.
Header
The message header is structured as follows:
Offset
(Bytes)
Field
Size
(Bytes)
Valid Values
Notes
0
Start Bytes
2
0xC1C0
Chosen for the following reasons:
High bits set, so not likely to occur in ADC data
less than 16 bits wide or message type fields
When concatenated with the tail of a previous
message, creates a distinct sequence
Note:
Do not reverse this byte order.
2
Protocol
Version
2
0x0000 –
0xFFFF
Initially set to 0x1000. The host should only send
messages known to be supported in the reported
version of the protocol. Subsets of this protocol may
be specified for other devices using a version less
than 0x1000. The device may reject messages with a
specified protocol it does not recognize.
4
Flags
2
0x0000 –
0xFFFF
Bits in this flag are assigned as follows:
Bit 0: response to earlier request (message type is set
equal to request type). Set by device.
Bit 1: acknowledgment (ACK) if previous message
included request for ACK. Set by device.
Bit 2: acknowledgment (ACK) requested. Set by Host.
Bit 3: negative acknowledgment (NACK). May be sent if
previously sent message type is unknown or otherwise
invalid. Message type and regarding fields will be set to
the type that caused the error. Set by device. Error
Number field contains reason for NACK.
Bit 4: exception occurred. Indicates that although the
message itself was valid, the device encountered a
hardware problem that may have invalidated the result.
Error Number will be set to explain, if possible. Set by
device.
Bit 5: The message protocol used by the caller is
deprecated. If set, an older version of the protocol has
been detected (version less than 0.1100). Set by the
device.
6
Error
Number
2
0x0000 –
0xFFFF
Only set by the device. Indicates whether the previous
request was successful. Only set to be non-zero if at
least one of the following flags is set: NACK or
exception. Only one value can be set, even if multiple
errors were detected. Values: