igtl_status.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifndef __IGTL_STATUS_H
00018 #define __IGTL_STATUS_H
00019
00020 #include "igtl_util.h"
00021 #include "igtl_types.h"
00022
00023 #define IGTL_STATUS_HEADER_SIZE 30
00024
00025 #define IGTL_STATUS_ERROR_NAME_LENGTH 20
00026
00027
00028
00029 #define IGTL_STATUS_INVALID 0
00030 #define IGTL_STATUS_OK 1
00031 #define IGTL_STATUS_UNKNOWN_ERROR 2
00032 #define IGTL_STATUS_PANICK_MODE 3
00033 #define IGTL_STATUS_NOT_FOUND 4
00034 #define IGTL_STATUS_ACCESS_DENIED 5
00035 #define IGTL_STATUS_BUSY 6
00036 #define IGTL_STATUS_TIME_OUT 7
00037 #define IGTL_STATUS_OVERFLOW 8
00038 #define IGTL_STATUS_CHECKSUM_ERROR 9
00039 #define IGTL_STATUS_CONFIG_ERROR 10
00040 #define IGTL_STATUS_RESOURCE_ERROR 11
00041 #define IGTL_STATUS_ILLEGAL_INSTRUCTION 12
00042 #define IGTL_STATUS_NOT_READY 13
00043 #define IGTL_STATUS_MANUAL_MODE 14
00044 #define IGTL_STATUS_DISABLED 15
00045 #define IGTL_STATUS_NOT_PRESENT 16
00046 #define IGTL_STATUS_UNKNOWN_VERSION 17
00047 #define IGTL_STATUS_HARDWARE_FAILURE 18
00048 #define IGTL_STATUS_SHUT_DOWN 19
00049
00050
00051 #ifdef __cplusplus
00052 extern "C" {
00053 #endif
00054
00055 #pragma pack(1)
00056
00057
00058
00059
00060
00061
00062 typedef struct {
00063 igtl_uint16 code;
00064 igtl_int64 subcode;
00065 char error_name[IGTL_STATUS_ERROR_NAME_LENGTH];
00066
00067
00068 } igtl_status_header;
00069
00070 #pragma pack()
00071
00072
00073
00074
00075
00076
00077
00078
00079
00080 void igtl_export igtl_status_convert_byte_order(igtl_status_header* status);
00081
00082
00083
00084
00085
00086
00087
00088
00089
00090 igtl_uint64 igtl_export igtl_status_get_crc(igtl_status_header* status, igtl_uint32 msglen, const char* msg);
00091
00092 #ifdef __cplusplus
00093 }
00094 #endif
00095
00096 #endif
00097
00098
00099