Main Page
Classes
Files
File List
File Members
sbgECom
common
sbgErrorCodes.h
Go to the documentation of this file.
1
20
#ifndef __SBG_ERROR_CODES_H__
21
#define __SBG_ERROR_CODES_H__
22
23
#include "
sbgDefines.h
"
24
25
//----------------------------------------------------------------------//
26
//- Errors code definitions -//
27
//----------------------------------------------------------------------//
28
32
typedef
enum
_SbgErrorCode
33
{
34
SBG_NO_ERROR
= 0,
35
SBG_ERROR
,
36
SBG_NULL_POINTER
,
37
SBG_INVALID_CRC
,
38
SBG_INVALID_FRAME
,
42
SBG_TIME_OUT
,
43
SBG_WRITE_ERROR
,
44
SBG_READ_ERROR
,
45
SBG_BUFFER_OVERFLOW
,
46
SBG_INVALID_PARAMETER
,
47
SBG_NOT_READY
,
48
SBG_MALLOC_FAILED
,
49
SGB_CALIB_MAG_NOT_ENOUGH_POINTS
,
50
SBG_CALIB_MAG_INVALID_TAKE
,
51
SBG_CALIB_MAG_SATURATION
,
52
SBG_CALIB_MAG_POINTS_NOT_IN_A_PLANE
,
54
SBG_DEVICE_NOT_FOUND
,
55
SBG_OPERATION_CANCELLED
,
56
SBG_NOT_CONTINUOUS_FRAME
,
58
SBG_INCOMPATIBLE_HARDWARE
,
59
SBG_INVALID_VERSION
60
}
SbgErrorCode
;
61
62
//----------------------------------------------------------------------//
63
//- Error codes to string litteral conversion -//
64
//----------------------------------------------------------------------//
65
71
SBG_INLINE
const
char
*
sbgErrorCodeToString
(
SbgErrorCode
errorCode)
72
{
76
static
const
char
*sbgErrorCodeString[] =
77
{
78
"SBG_NO_ERROR"
,
79
"SBG_ERROR"
,
80
"SBG_NULL_POINTER"
,
81
"SBG_INVALID_CRC"
,
82
"SBG_INVALID_FRAME"
,
83
"SBG_TIME_OUT"
,
84
"SBG_WRITE_ERROR"
,
85
"SBG_READ_ERROR"
,
86
"SBG_BUFFER_OVERFLOW"
,
87
"SBG_INVALID_PARAMETER"
,
88
"SBG_NOT_READY"
,
89
"SBG_MALLOC_FAILED"
,
90
"SGB_CALIB_MAG_NOT_ENOUGH_POINTS"
,
91
"SBG_CALIB_MAG_INVALID_TAKE"
,
92
"SBG_CALIB_MAG_SATURATION"
,
93
"SBG_CALIB_MAG_POINTS_NOT_IN_A_PLANE"
,
94
"SBG_DEVICE_NOT_FOUND"
,
95
"SBG_OPERATION_CANCELLED"
,
96
"SBG_NOT_CONTINUOUS_FRAME"
,
97
"SBG_INCOMPATIBLE_HARDWARE"
,
98
"SBG_INVALID_VERSION"
99
};
100
101
return
sbgErrorCodeString[errorCode];
102
}
103
104
#endif
/* __SBG_ERROR_CODES_H__ */
SBG_NULL_POINTER
Definition:
sbgErrorCodes.h:36
SBG_CALIB_MAG_INVALID_TAKE
Definition:
sbgErrorCodes.h:50
SBG_ERROR
Definition:
sbgErrorCodes.h:35
SBG_WRITE_ERROR
Definition:
sbgErrorCodes.h:43
SBG_TIME_OUT
Definition:
sbgErrorCodes.h:42
SBG_MALLOC_FAILED
Definition:
sbgErrorCodes.h:48
SBG_INVALID_PARAMETER
Definition:
sbgErrorCodes.h:46
SBG_DEVICE_NOT_FOUND
Definition:
sbgErrorCodes.h:54
sbgErrorCodeToString
SBG_INLINE const char * sbgErrorCodeToString(SbgErrorCode errorCode)
Definition:
sbgErrorCodes.h:71
SBG_INVALID_FRAME
Definition:
sbgErrorCodes.h:38
SBG_CALIB_MAG_POINTS_NOT_IN_A_PLANE
Definition:
sbgErrorCodes.h:52
SBG_INVALID_VERSION
Definition:
sbgErrorCodes.h:59
SBG_INVALID_CRC
Definition:
sbgErrorCodes.h:37
SGB_CALIB_MAG_NOT_ENOUGH_POINTS
Definition:
sbgErrorCodes.h:49
SBG_INLINE
#define SBG_INLINE
Definition:
sbgDefines.h:94
SBG_NOT_CONTINUOUS_FRAME
Definition:
sbgErrorCodes.h:56
SBG_BUFFER_OVERFLOW
Definition:
sbgErrorCodes.h:45
SBG_NO_ERROR
Definition:
sbgErrorCodes.h:34
SBG_READ_ERROR
Definition:
sbgErrorCodes.h:44
SBG_INCOMPATIBLE_HARDWARE
Definition:
sbgErrorCodes.h:58
SBG_OPERATION_CANCELLED
Definition:
sbgErrorCodes.h:55
SBG_CALIB_MAG_SATURATION
Definition:
sbgErrorCodes.h:51
sbgDefines.h
Header file that contains all common definitions.
SbgErrorCode
enum _SbgErrorCode SbgErrorCode
SBG_NOT_READY
Definition:
sbgErrorCodes.h:47
_SbgErrorCode
_SbgErrorCode
Definition:
sbgErrorCodes.h:32
sbg_driver
Author(s):
autogenerated on Sun Jan 27 2019 03:42:20