Difference between revisions of "OpenIGTLink/ProtocolV2/Header"
From NAMIC Wiki
(→CRC) |
(→CRC) |
||
Line 49: | Line 49: | ||
==Body size== | ==Body size== | ||
==CRC== | ==CRC== | ||
− | The 64-bit CRC used in OpenIGTLink protocol is based on [http://www.ecma-international.org/publications/files/ECMA-ST/Ecma-182.pdf ECMA-182 standard]. An example code is available in [http://svn.na-mic.org/NAMICSandBox/trunk/OpenIGTLink/Source/igtlutil/igtl_util.h] and [http://svn.na-mic.org/NAMICSandBox/trunk/OpenIGTLink/Source/igtlutil/igtl_util.c] in the OpenIGTLink library. | + | The 64-bit CRC used in OpenIGTLink protocol is based on [http://www.ecma-international.org/publications/files/ECMA-ST/Ecma-182.pdf ECMA-182 standard]. An example code is available in [http://svn.na-mic.org/NAMICSandBox/trunk/OpenIGTLink/Source/igtlutil/igtl_util.h igtl_util.h] and [http://svn.na-mic.org/NAMICSandBox/trunk/OpenIGTLink/Source/igtlutil/igtl_util.c igtl_util.c] in the OpenIGTLink library. |
Revision as of 21:07, 10 August 2010
Home < OpenIGTLink < ProtocolV2 < HeaderContents
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 |
Version number
Type name
Device name
Time stamp
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.h and igtl_util.c in the OpenIGTLink library.