Difference between revisions of "OpenIGTLink"
From NAMIC Wiki
(added some message types) |
|||
| Line 38: | Line 38: | ||
| align="left" | 64 bit unsigned int | | align="left" | 64 bit unsigned int | ||
| align="left" | 64 bit CRC for body data | | align="left" | 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) | ||
| + | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+--+-+-+..... | ||
| + | |||
| + | {| border="1" cellpadding="5" cellspacing="0" align="center" | ||
| + | |- | ||
| + | | align="left style="background:#e0e0e0;" | Data | ||
| + | | align="left style="background:#e0e0e0;" | Type | ||
| + | | align="left style="background:#e0e0e0;" | Description | ||
| + | |- | ||
| + | | align="left" | C | ||
| + | | align="left" | Unsigned short (16bit) | ||
| + | | align="left" | Status code: 01-Ok, 02-Generic Error, ... | ||
| + | |- | ||
| + | | align="left" | Sub Code | ||
| + | | align="left" | 64 bit integer | ||
| + | | align="left" | Sub code for the error (ex. 0x200 - file not found) | ||
| + | |- | ||
| + | | align="left" | Error name | ||
| + | | align="left" | char[20] | ||
| + | | align="left" | "Error", "Ok", "Starting up" | ||
| + | |- | ||
| + | | align="left" | Status Message (optional) | ||
| + | | align="left" | char[ BodySize - 30 ] | ||
| + | | align="left" | Optional (English) description (ex. "File C:\test.ini not found") | ||
|- | |- | ||
|} | |} | ||
Revision as of 19:38, 9 January 2008
Home < OpenIGTLinkContents
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") |