File: status.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 (110 lines) | stat: -rwxr-xr-x 3,105 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
---
layout: page
title: Specification > Status
header: Pages
---
{% include JB/setup %}

## Summary

The STATUS data type is used to notify the receiver about the current status of the sender.
The data consist of status code in a 16-bit unsigned integer, sub code in a 64-bit integer,
error name in a 20-byte-length character string, and a status message. The length of
the status message is determined by the size information in the general header.
The status code is defined as a part of the OpenIGTLink protocol specification listed
bellow. The sub code is device specific and is defined by developers. In addition,
developers can build their own error name/code into the status message and additional
optional description in the following data field.


## Message Types

### STATUS

<table border="1" cellpadding="5" cellspacing="0">
<tr>
<td style="background:#e0e0e0;"> Data
</td><td style="background:#e0e0e0;"> Type
</td><td style="background:#e0e0e0;"> Description
</td></tr>
<tr>
<td align="left"> C
</td><td align="left"> Unsigned short (16bit)
</td><td align="left"> Status code groups: 1-Ok, 2-Generic Error, ... (see below)
</td></tr>
<tr>
<td align="left"> Sub Code
</td><td align="left"> 64 bit integer
</td><td align="left"> Sub code for the error (ex. 0x200 - file not found)
</td></tr>
<tr>
<td align="left"> Error name
</td><td align="left"> char[20]
</td><td align="left"> "Error", "OK", "Warning" - can be anything, don't relay on this
</td></tr>
<tr>
<td align="left"> Status Message (optional)
</td><td align="left"> char[ BodySize - 30 ]
</td><td align="left"> Optional (English) description (ex. "File C:\test.ini not found")
</td></tr>
</table>

### Status codes:

(7/6/2013: The list was updated due to the discrepancy between this document and the actual specification.)

- 00: Invalid packet - 0 is not used
- 01: OK (Default status)
- 02: Unknown error
- 03: Panic mode (emergency)
- 04: Not found (file, configuration, device etc)
- 05: Access denied
- 06: Busy
- 07: Time out / Connection lost
- 08: Overflow / Can't be reached
- 09: Checksum error
- 10: Configuration error
- 11: Not enough resource (memory, storage etc)
- 12: Illegal/Unknown instruction (or feature not implemented / Unknown command received)
- 13: Device not ready (starting up)
- 14: Manual mode (device does not accept commands)
- 15: Device disabled
- 16: Device not present
- 17: Device version not known
- 18: Hardware failure
- 19: Exiting / shut down in progress



### GET_STATUS

<table border="1" cellpadding="5" cellspacing="0" align="center">
<tr>
<td style="background:#e0e0e0;"> Data
</td><td style="background:#e0e0e0;"> Type
</td><td style="background:#e0e0e0;"> Description
</td></tr>
</table>

### STT_STATUS

N/A

### STP_STATUS

N/A

### RTS_STATUS

N/A

## Implementations

POSITION type is implemented in the following files:

* [igtlStatusMessage.h](https://github.com/openigtlink/OpenIGTLink/blob/master/Source/igtlStatusMessage.h)
* [igtlStatusMessage.cxx](https://github.com/openigtlink/OpenIGTLink/blob/master/Source/igtlStatusMessage.cxx)

## Contributors

* Junichi Tokuda