OpenIGTLink
From NAMIC Wiki
Home < OpenIGTLink
Contents
Overview
Protocol
Header Structure
Bytes 0 2 14 34 42 50 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+--+-+-+..... | V | TYPE | DEVICE_NAME | BODY_SIZE | CRC | BODY +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+--+-+-+.....
Byte Order
Big endian should be used.
Header Fields
| Data | Type | Description |
| V | Unsigned short (16bit) | Version number (1) |
| TYPE | char[8] | Type name of body |
| DEVICE_NAME | char[20] | Unique device name |
| BODY_SIZE | 64 bit unsigned int | Size of body in bytes |
| CRC | 64 bit unsigned int | 64 bit CRC for body data |
Message types
IMAGE
TRANSFORM
POSITION
STATUS
Bytes (Body) 50 52 60 80 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+--+-+-+..... | C | Sub Code | Status name | Status message (optional) +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+--+-+-+.....
| Data | Type | Description |
| C | Unsigned short (16bit) | Status code: 01-Ok, 02-Generic Error, ... |
| Sub Code | 64 bit integer | Sub code for the error (ex. 0x200 - file not found) |
| Error name | char[20] | "Error", "Ok", "Starting up" |
| Status Message (optional) | char[ BodySize - 30 ] | Optional (English) description (ex. "File C:\test.ini not found") |