Data representation – Seaward ClareHAL User Manual

Page 135

Advertising
background image

134

2. Data Representation


Integer values

Commands or responses that require a single, discrete, integer value,
may provide the value as between 1 and 4 bytes, encoded as between
2 and 8 ASCII hex characters. As has already been discussed, multi-
byte values are encoded and transmitted in big-endian order.

NB: This does not include values that are part of structures! These are
always encoded at an exact length.

String values

Many commands require string data. Often these commands expect
more than one string, or possibly a variable number of strings. When
transmitting strings, the string data is encoded as ASCII hex, just as for
all other data. A null terminator must be encoded (as two ASCII ‘0’
characters) between strings, but not after the final string. Thus sending
no data counts as a single string of zero length, whereas sending a
single null terminator byte counts as two zero length strings.

Although it is possible to send very long strings, and/or a great number
of strings, the tester will always validate the received strings to ensure
they are not too long, or that there are not to many. Strings that contain
control codes will usually be rejected.

Floating point values

Floating point values are always 4 bytes in length, encoded as 8 ASCII
hex digits. The tester uses IEEE encoding for floating point numbers.
As has already been discussed, multi-byte values are encoded and
transmitted in big-endian order.

Your HAL tester

Advertising
This manual is related to the following products: