Main Page
Namespace List
Class Hierarchy
Alphabetical List
Compound List
File List
Namespace Members
Compound Members
File Members
Source
igtlutil
igtl_status.h
Go to the documentation of this file.
1
/*=========================================================================
2
3
Program: The OpenIGTLink Library
4
Language: C
5
Web page: http://openigtlink.org/
6
7
Copyright (c) Insight Software Consortium. All rights reserved.
8
9
This software is distributed WITHOUT ANY WARRANTY; without even
10
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
11
PURPOSE. See the above copyright notices for more information.
12
13
=========================================================================*/
14
15
#ifndef __IGTL_STATUS_H
16
#define __IGTL_STATUS_H
17
18
#include "
igtl_util.h
"
19
#include "
igtl_types.h
"
20
21
#define IGTL_STATUS_HEADER_SIZE 30
22
23
#define IGTL_STATUS_ERROR_NAME_LENGTH 20
24
25
/* Status codes */
26
27
#define IGTL_STATUS_INVALID 0
28
#define IGTL_STATUS_OK 1
29
#define IGTL_STATUS_UNKNOWN_ERROR 2
30
#define IGTL_STATUS_PANICK_MODE 3
/* emergency */
31
#define IGTL_STATUS_NOT_FOUND 4
/* file, configuration, device etc */
32
#define IGTL_STATUS_ACCESS_DENIED 5
33
#define IGTL_STATUS_BUSY 6
34
#define IGTL_STATUS_TIME_OUT 7
/* Time out / Connection lost */
35
#define IGTL_STATUS_OVERFLOW 8
/* Overflow / Can't be reached */
36
#define IGTL_STATUS_CHECKSUM_ERROR 9
/* Checksum error */
37
#define IGTL_STATUS_CONFIG_ERROR 10
/* Configuration error */
38
#define IGTL_STATUS_RESOURCE_ERROR 11
/* Not enough resource (memory, storage etc) */
39
#define IGTL_STATUS_ILLEGAL_INSTRUCTION 12
/* Illegal/Unknown instruction */
40
#define IGTL_STATUS_NOT_READY 13
/* Device not ready (starting up)*/
41
#define IGTL_STATUS_MANUAL_MODE 14
/* Manual mode (device does not accept commands) */
42
#define IGTL_STATUS_DISABLED 15
/* Device disabled */
43
#define IGTL_STATUS_NOT_PRESENT 16
/* Device not present */
44
#define IGTL_STATUS_UNKNOWN_VERSION 17
/* Device version not known */
45
#define IGTL_STATUS_HARDWARE_FAILURE 18
/* Hardware failure */
46
#define IGTL_STATUS_SHUT_DOWN 19
/* Exiting / shut down in progress */
47
48
49
#ifdef __cplusplus
50
extern
"C"
{
51
#endif
52
53
#pragma pack(1)
/* For 1-byte boundary in memroy */
54
56
typedef
struct
{
57
igtl_uint16
code
;
/* status code defined above */
58
igtl_int64
subcode
;
/* sub code for the error */
59
char
error_name[
IGTL_STATUS_ERROR_NAME_LENGTH
];
60
/* error name -- can be anything, don't rely on this */
61
/*char status_message[]; */
62
}
igtl_status_header
;
63
64
#pragma pack()
65
69
void
igtl_export
igtl_status_convert_byte_order
(
igtl_status_header
* status);
70
72
igtl_uint64
igtl_export
igtl_status_get_crc
(
igtl_status_header
* status, igtl_uint32 msglen,
const
char
* msg);
73
74
#ifdef __cplusplus
75
}
76
#endif
77
78
#endif
/* __IGTL_IMAGE_H */
79
80
igtl_util.h
igtl_status_get_crc
igtl_uint64 igtl_export igtl_status_get_crc(igtl_status_header *status, igtl_uint32 msglen, const char *msg)
igtl_types.h
igtl_status_header::subcode
igtl_int64 subcode
Definition:
igtl_status.h:58
igtl_status_header::code
igtl_uint16 code
Definition:
igtl_status.h:57
igtl_status_convert_byte_order
void igtl_export igtl_status_convert_byte_order(igtl_status_header *status)
igtl_status_header
Definition:
igtl_status.h:56
igtl_export
#define igtl_export
Definition:
igtl_win32header.h:28
IGTL_STATUS_ERROR_NAME_LENGTH
#define IGTL_STATUS_ERROR_NAME_LENGTH
Definition:
igtl_status.h:23
Generated for OpenIGTLink by
Doxygen
1.8.17 written by
Dimitri van Heesch
, © 1997-2012