Specification > Header
Back to Specification
Header Structure
Bytes
0 2 14 34 42 50 58
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+.....
| V | TYPE | DEVICE_NAME | TIME_STAMP | BODY_SIZE | CRC64 | BODY
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+.....
Byte Order
Big endian should be used for all numerical values (version, body size, crc). Unused spaces are padded with 0 (binary).
Header Fields
Data | Type | Description |
V | Unsigned short (16bit) | Version number (1) |
TYPE | char[12] | Type name of data |
DEVICE_NAME | char[20] | Unique device name |
TIME_STAMP | 64 bit unsigned int | Timestamp or 0 if unused |
BODY_SIZE | 64 bit unsigned int | Size of body in bytes |
CRC | 64 bit unsigned int | 64 bit CRC for body data |
Description of Fields
Version number
The version number field specifies the header format version. Currently the version number is 1. Please note that this is different from the protocol version.
Type name
The type name field is an ASCII character string specifying the type of the data contained in the message body e.g. “TRANSFORM”. The length of the type name must be within 12 characters.
Device name
The device name field contains an ASCII character string specifying the name of the the message.
Timestamp
The timestamp field contains a 64-bit timestamp indicating when the data is generated. Please refer Timestamp for the format of the 64-bit timestamp.
Body size
CRC
The 64-bit CRC used in OpenIGTLink protocol is based on ECMA-182 standard. An example code is available in igtl_util.c in the OpenIGTLink library.