Difference between revisions of "OpenIGTLink/ProtocolV2/Type/Bind"
From NAMIC Wiki
Line 189: | Line 189: | ||
| align="left" | Data length | | align="left" | Data length | ||
|- | |- | ||
− | | colspan=3 align="left" style="background:#e0e0e0;" |NAME Table | + | | colspan=3 align="left" style="background:#e0e0e0;" |NAME Table Section (NULL-separated values) |
+ | |- | ||
+ | | align="left" | NAME_TABLE_SIZE | ||
+ | | align="left" | uint16 | ||
+ | | align="left" | Size of name table (including the padding) | ||
|- | |- | ||
| align="left" | NAME 0 | | align="left" | NAME 0 |
Revision as of 22:20, 13 January 2011
Home < OpenIGTLink < ProtocolV2 < Type < BindContents
Summary
Bind message format is designed to bind any OpenIGTLink messages into a single message. This message format is useful, when one needs to care about synchronization of multiple data (e.g. multi-channel sensors), or sending associative array (pairs of key string and value). The bind message format consists of the bind header section, the name table section and the data section.
Message Types
BIND
Data | Type | Description |
NELEMENTS | uint16 | Number of elements |
Bind Header Section | ||
TYPE 0 | char[12] | Data type (OpenIGTLink Device Type string) |
DATA SIZE 0 | uint 64 | Data size |
... | ||
TYPE (NELEMENTS-1) | char[12] | Data type (OpenIGTLink Device Type string) |
DATA SIZE (NELEMENTS-1) | uint 64 | Data size |
NAME Table Section (NULL-separated values) | ||
NAME_TABLE_SIZE | uint16 | Size of name table (including the padding) |
NAME 0 | char[*] | Name |
(null) | uint8 | separator |
... | ||
NAME (NELEMENTS-1) | char[*] | Name |
(null) | uint8 | separator |
Padding* | uint8 or none | padding to align DATA with WORD |
Data Section | ||
DATA 0 | TYPE 0 [ SIZE 0 ] | Data array |
DATA 1 | TYPE 1 [ SIZE 1 ] | Data array |
... | ||
DATA (NELEMENTS-1) | TYPE (NELEMENTS-1) [SIZE (NELEMENTS -1)] | Data array |
GET_BIND
GET_BIND is used to request the receiver for associative array data. If a GET_BIND message does not have a body, it requests all data.
Data | Type | Description |
NELEMENTS | uint16 | Number of elements |
Bind Header Section | ||
TYPE 0 | char[12] | Data type (OpenIGTLink device type string) |
NAMELEN 0 | uint 8 | Name length |
SIZE 0 | uint 16 | Data length |
... | ||
TYPE (NELEMENTS-1) | uint8 | Data type (0: string, 1: scalar, 2: vector) |
NAMELEN (NELEMENTS-1) | uint 8 | Name length |
SIZE (NELEMENTS-1) | uint 16 | Data length |
NAME Table | ||
NAME 0 | char[NAMELEN] | Name |
... | ||
NAME (NELEMENTS-1) | char[NAMELEN (NELEMENTS-1)] | Name |
STT_BIND
Data | Type | Description |
RESOL | uint64 | Minimum interval between message (ns). Same format as TimeStamp |
GET_BIND is used to request the receiver for associative array data. If a GET_BIND message does not have a body, it requests all data.
Data | Type | Description |
RESOL | uint64 | Minimum interval between message (ns). Same format as TimeStamp |
NELEMENTS | uint16 | Number of elements |
Bind Header Section | ||
TYPE 0 | char[12] | Data type (OpenIGTLink device type string) |
SIZE 0 | uint 16 | Data length |
... | ||
TYPE (NELEMENTS-1) | uint8 | Data type (0: string, 1: scalar, 2: vector) |
SIZE (NELEMENTS-1) | uint 16 | Data length |
NAME Table Section (NULL-separated values) | ||
NAME_TABLE_SIZE | uint16 | Size of name table (including the padding) |
NAME 0 | char[*] | Name |
(null) | uint8 | separator |
... | ||
NAME (NELEMENTS-1) | char[*] | Name |
(null) | uint8 | separator |
STP_BIND
Data | Type | Description |
RTS_BIND
Data | Type | Description |
Status | 8 bit unsigned | 0: Success 1: Error |
Implementations
Contributors
Junichi Tokuda, Yuichiro Hayashi