Reading data from the neofox – Ocean Optics NeoFox Engineering Note User Manual
Page 4
NeoFox Communication Interfaces
4 013-20000-010-04-201211
Addr Type
Name
Description
0
uchar
Stx
Start of transmission character. Set to 0x03.
1
uchar
PacketType
Set to 0xC8
2
ushort FrameSize
Set to 20 (0x14).
4
ulong
CmdNumber
Reserved. Set to 0.
8
ulong
ParamType
Type code for the parameter that is to be set.
12
n/a
ParamValue
Value for the parameter to be set. Can be a float or integer type.
16
uchar
Reserved1
Reserved. Set to 0.
17
uchar
Reserved2
Reserved. Set to 0.
18
uchar
Checksum
Set to the aggregate sum of all previous bytes modulus 256.
19
uchar
Eof
End of transmission character. Set to 0x04.
Reading Data from the NeoFox
The NeoFox streams a “data dump” of all its publicly exposed parameters after each sample. This occurs
approximately once every tenth of a second. The location of each particular value within this stream is given in
the table at the end of this document. The data stream is structured as follows.
Addr
Type
Name
Description
0
uchar
Stx
Start of transmission character. Set to 0x03.
1
uchar
PacketType
Set to 0xDC
2
ushort FrameSize
Set to 5036 (0x13AC)
4
uchar
FrameCount Number of frames uploaded since the device powered on. This
rolls over after 255. It can be used to determine whether any
frames have been missed.
5
uchar
ProtocolRev The value of the Data Copy Type parameter. The structure is a
"type 1" structure (the default communication structure for
NeoFox). Therefore, this value will be 0x01. See
for more information on alternative data structures.
6
uchar
Reserved1
Reserved. Do not depend on this value.
7
uchar
Reserved2
Reserved. Do not depend on this value.
8
…
927
n/a
Data
Parameters are stored in this region of the structure. See the table
at the end of this document for variable-specific documentation
and addresses.
928
…
2979
struct
SensorBlue
Blue sensor waveform raw data. This contains the data that can
be seen in the “sensor waveform window” in the NeoFox Viewer.
2980
struct
SensorRed
Red sensor waveform raw data. This contains the data that can