TOB2 or TOB3

TOB2 and TOB3 files are created when data are retrieved from external PC cards on dataloggers such as the CR9000, CR5000, and CR1000. The TOB2 file format has been replaced in new dataloggers by the TOB3 file format. TOB3 format is similar to TOB2 in most respects but differs from TOB2 in the following ways:

  • Frame headers in TOB3 are twelve bytes long rather than eight bytes long. The additional four bytes contain an unsigned integer with the least significant byte written first to identify the record number for the first record in the frame.

  • In the TOB3 format, the offset field in the major frame footer no longer represents the number of frames back to the last minor frame. This information is used in TOB2 to help accelerate searching for data but is not considered to be necessary in TOB3 because of the presence of the record number in the frame header.

The TOB2 or TOB3 binary file format has the following structure with each header line terminated with a carriage return and line feed (CRLF):

ASCII Header Line 1
ASCII Header Line 2
ASCII Header Line 3
ASCII Header Line 4
ASCII Header Line 5
ASCII Header Line 6
Frame Header Frame Body n

Frame Footer

Header line one describes the file environment with the following fields:

  • Data file type (TOB2 or TOB3).

  • Station name.

  • Model name of the datalogger.

  • Serial number of the datalogger.

  • Operating system on the datalogger.

  • Name of the program running in the datalogger.

  • Signature of the program running in the datalogger.

  • The time that the file was created.

Header line two contains:

  • The name of the table as declared in the datalogger program.

  • The non-timestamped record interval.

  • The data frame size.

  • The intended table size.

  • The validation stamp.

  • The frame time resolution.

Header line three describes the names for each field in a table record as determined by the datalogger program.

Header line four describes the units associated with each field in the record. Units are optional and are specified in the datalogger program, if they are included. If no units are provided in the program, then an empty string placeholder is placed in this line for that specific field.

Header line five describes the processing performed in the datalogger to produce the value for each field in the record; for example, sample, average, min, max, etc. If there is no known processing for a field, that field will be assigned an empty processing string. There will be one value on this line for each field name given on header line three.

Header line six defines the data types for each field in the record and supports the following values: IEEE4, FP2, ULONG, LONG, SecNano, and ASCII(len).

TOB2 frame headers are eight bytes long and hold the timestamp for the first record in the frame. TOB3 frame headers are twelve bytes long and contain the same timestamp information but also add a four-byte unsigned integer that represents the beginning record number for that frame.

The frame data begins immediately following the frame header and consists of zero or more data records. Each record contains one data point for each of the field names identified in header line three. The data type and implied size of these data points are identified by the data types list given by header line six.

The frame footer makes up the last four bytes of the frame.