File: bind.md

package info (click to toggle)
openigtlink 3.0.0-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 3,080 kB
  • sloc: cpp: 20,076; ansic: 6,704; sh: 227; perl: 74; makefile: 46
file content (161 lines) | stat: -rw-r--r-- 5,016 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
[Back to Index](/Documents/Protocol/index.md)

Bind Message
============

- Protocol Version: 3.0
- Release Date: January 20, 2017

Summary
=======

The Bind message is designed to bind any OpenIGTLink messages into a single
message. Messages bound in a BIND message are called 'child messages.' The BIND
message format is useful, when one needs to care about synchronization of
multiple messages (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, which contains types and sizes of child messages, the child
message name table section, and the child message body section.

Message Types
=============

BIND
----

 Data         | Type          | Description
--------------|---------------|-------------------------------------------------
 N_CHLID      | uint16	      | Number of child messages
 BIND_HEADER  | BIND HEADER   | Types and sizes of child messages
 NAME_TABLE   | NAME TABLE    | Name tables for child messages
 DATA         | DATA          | Child messages


- BIND HEADER Section

 Data             | Type      | Description
------------------|-----------|-------------------------------------------------
 CTYPE_0          | char[12]  | Device type string for child message 0
 CSIZE_0          | uint64    | Data size for child message 0
 ...              | ...       |
 CTYPE_(N_CHILD-1)| char[12]  | Device type string for child message (N_CHILD-1)
 CSIZE_(N_CHILD-1)| uint 64   | Data size for child message (N_CHILD-1)


- NAME TABLE Section (NULL-separated values)

 Data           | Type          | Description
----------------|---------------|-----------------------------------------------
 NTABLE_SIZE    | uint16        | Size of name table (including the padding)
 NAME_0         | char[*]       | Name for child message 0
 (null)         | uint8         | separator
 ...            | ...           |
 NAME_(N_CM-1)  | char[*]       | Name for child message (N_CHILD-1)
 (null)	        | uint8         | Separator
 (Padding*)     | uint8 or none | Padding to align with WORD


* Padding field is inserted only if the previous field does not aligned with WORD border.

- DATA Section

 Data             | Type          | Description
------------------|---------------|-----------------------------------------------
 CDATA 0          | CTYPE_0       | Data array for child message 0 (size: CSIZE_0)
 (Padding*)       | uint8 or none | Padding to align DATA with WORD
 CDATA 1          | CTYPE_1       | Data array for child message 1 (size: CSIZE_1)
 (Padding*)       | uint8 or none | Padding to align DATA with WORD
 ...              | ...           | 
 CDATA_(N_CHILD-1)| CTYPE_(N_CHILD-1)|Data array for child message (N_CHILD-1)
 (Padding*)       | uint8 or none | Padding to align DATA with WORD


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
--------------|---------------|-------------------------------------------------
 N_CHLID      | uint16	      | Number of child messages
 BIND_HEADER_2| BIND HEADER 2 | Types and sizes of child messages
 NAME_TABLE   | NAME TABLE    | Name tables for child messages

- BIND HEADER 2 Section

 Data             | Type      | Description
------------------|-----------|-------------------------------------------------
 CTYPE_0          | char[12]  | Device type string for child message 0
 ...              | ...       |
 CTYPE_(N_CHILD-1)| char[12]  | Device type string for child message (N_CHILD-1)

- NAME_TABLE (see BIND message)


STT_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
--------------|---------------|-------------------------------------------------
 RESOL        | uint64        | Minimum interval between message (ns)*

See [Time Stamp](timestamp.md)

or 

 Data         | Type          | Description
--------------|---------------|-------------------------------------------------
 N_CHLID      | uint16	      | Number of child messages
 BIND_HEADER_2| BIND HEADER 2 | Types and sizes of child messages
 NAME_TABLE   | NAME TABLE    | Name tables for child messages

- BIND HEADER 2 Section  (see BIND message)
- NAME_TABLE Section (see BIND message)


STP_BIND
--------

 Data         | Type          | Description
--------------|---------------|-------------------------------------------------
              |               |

RTS_BIND
--------

 Data         | Type          | Description
--------------|---------------|-------------------------------------------------
              |               |


Implementations
===================

* [igtlBindMessage.h](/Source/igtlBindMessage.h)
* [igtlBindMessage.cxx](/Source/igtlBindMessage.cxx) 


Contributors
===================

* Junichi Tokuda