Data interfaces
135
850-164692 / Rev.B
Data encapsulation
A standard encapsulation scheme is used for all data files. Each
datagram is preceded by a 4 byte length tag stating the datagram
length in bytes. An identical length tag is appended at the end of
the datagram.
long Length;
struct DatagramHeader
{
long DatagramType;
struct {
long LowDateTime;
long HighDateTime;
} DateTime;
};
- -
< datagram content >
- -
long Length;
All datagrams use the same header. The datagram type field
identifies the type of datagram. ASCII quadruples are used to
ease human interpretation and long term maintenance; three
characters identify the datagram type and one character
identifies the version of the datagram. The DateTime structure
contains a 64-bit integer value stating the number of
100-nanosecond intervals since January 1, 1601. This is the
internal ”filetime” used by the Windows NT operating system.
The data part of the datagram contains any number of bytes, and
its content is highly datagram dependent.
Common computers fall into two categories: Intel based
computers write a multibyte number to file starting with the
LSB (Least Significant Byte). HP, Sun and Motorola do the
opposite. They write the MSB (Most Significant Byte) to file
first. The byte order of the length tags and all binary fields
within a datagram is always identical to the native byte order of
the computer that writes the data file. It is the responsibility of
the software that reads the file to perform byte swapping of all
multibyte numbers within a datagram if required. Byte
swapping is required whenever there is an apparent mismatch
between the head and the tail length tags. Hence, the two length
tags may be used to identify the byte order of the complete
datagram.
The Intel processors allow a multibyte number to be located at
any RAM address. However, this may be different on other
processors; a short (2 byte) must be located at an even address, a
long (4 byte) and a float (4 byte) must be located at addresses
dividable by four. Hence, the numeric fields within a datagram
is specified with this in mind.
Summary of Contents for ER60
Page 2: ......
Page 3: ...850 164692 ER60 Scientific echo sounder Operator manual...
Page 181: ......