Sample data standard format

Following the deployment header in memory is the deployment data, which will contain both sample data and events, recorded in chronological order. Events are time-stamped records of any notable incidents apart from sample data. Both sample data and events have their own formats; refer to the following sections for details. 

Sample data should always be stored as complete sets of readings, one set comprising one reading from each active channel, all taken at the same time. However, it may be possible under some fault conditions for only a partial sample set to be stored. It is therefore important when parsing data to check for, and be able to identify, event markers at every reading, not just at the assumed start of every sample set. However, partially stored sample sets are extremely rare, and for the remainder of this discussion we will assume for simplicity that all sample sets are complete.

Sample timing

Sample sets are not individually time-stamped; only events contain any explicit date and time information. This avoids 'wasting' memory by time-stamping samples which are regular and predictable, but the date and time must be calculated by counting sample sets from the previous time-stamped event, and applying the programmed parameters for the schedule, such as the measurement period and the burst interval, if applicable: refer to the sampling command for details. At the very least, there should always be one time-stamped event in the deployment; immediately after the header and before the first sample set.

Normal reading values

Each individual reading of the sample data is a signed 32-bit integer in 2's-complement format, in principle giving a range from –2147483648 to +2147483647. However, not all of this range is fully utilized for sample data; in particular, some parts of the range have been assigned for purposes such as event markers and error codes.

Individual reading values at present are typically confined to a sub-range of the full 32-bit range available, namely −134217728 to +1073741760. Readings outside this range which are not:

  1. defined as Event Markers (see the section Standard format events markers), or
  2. defined as Error Codes (see below), or
  3. known to originate from a sensor channel with specially defined properties,

should be treated with suspicion.

The readings for each channel are 'raw', unprocessed values from an A/D converter or some other type of data acquisition hardware. They can not be interpreted as physical values of the measured parameter without further processing according to the calibration equation and coefficients for the channel. 

Error Codes

Under some conditions an error may occur on one channel while data from the other channels is perfectly acceptable. Rather than inserting a time-stamped event in the data stream if this happens, the individual reading is replaced by an error code.

Error codes are 32-bit values which by definition should never appear as valid readings. They indicate a problem with that particular reading from the channel in question; other readings in the same sample set may be fine, as may other readings from the same channel in different sample sets.

The general format is 0xF6<EC><CRC>, where 0xF6 is the error code indicator in the MSB, <EC> is one of 256 possible error codes, and <CRC> is the byte-swapped 16b CRC of the two bytes 0xF6,<EC>. Because the codes are all fixed, so are the CRCs, and the table below simply shows the full 32-bit values for all error codes defined so far.

Error #Hex CodeDescription
00xF600D692generic, unknown or unexpected error
10xF601E7A1EOC bit unexpectedly set in ADC output
20xF602B4F4DMY bit unexpectedly set in ADC output
30xF60385C7internal addressing error
40xF604125Etoo much data for internal transfer
50xF605236Daccess to internal bus denied
60xF6067038timeout sending internal command
70xF607410Btimeout receiving internal response
80xF6087F1Bgeneric failure to interpret response
90xF6094E28no sample was started
100xF60A1D7Dsample acquisition still in progress
110xF60B2C4Esample process failed
120xF60CBBD7no valid samples to average
130xF60D8AE4internal response unexpectedly short
140xF60ED9B1supporting channel value not valid, or unknown equation
150xF60FE882(reserved)
160xF610A591channel value is outside reasonable range
170xF61194A2channel value is below minimum measurable limit
180xF612C7F7channel value is above maximum measurable limit
190xF613F6C4sensor output not received within timeout
200xF614615Dunable to parse sensor output
210xF615506Echannel is not correctly calibrated
220xF616033Bfloating point value is badly formed
230xF6173208channel not logged