33 #ifndef SBG_ERROR_CODES_H
34 #define SBG_ERROR_CODES_H
85 static inline const char *sbgErrorCodeToString(
SbgErrorCode errorCode)
90 static const char *sbgErrorCodeString[] =
100 "SBG_BUFFER_OVERFLOW",
101 "SBG_INVALID_PARAMETER",
104 "SGB_CALIB_MAG_NOT_ENOUGH_POINTS",
105 "SBG_CALIB_MAG_INVALID_TAKE",
106 "SBG_CALIB_MAG_SATURATION",
107 "SBG_CALIB_MAG_POINTS_NOT_IN_A_PLANE",
108 "SBG_DEVICE_NOT_FOUND",
109 "SBG_OPERATION_CANCELLED",
110 "SBG_NOT_CONTINUOUS_FRAME",
111 "SBG_INCOMPATIBLE_HARDWARE",
112 "SBG_INVALID_VERSION"
115 assert(errorCode < SBG_ARRAY_SIZE(sbgErrorCodeString));
116 return sbgErrorCodeString[errorCode];
Header file that contains all common definitions.
enum _SbgErrorCode SbgErrorCode
_SbgErrorCode
Definition: sbgErrorCodes.h:47
@ SBG_ERROR
Definition: sbgErrorCodes.h:49
@ SBG_READ_ERROR
Definition: sbgErrorCodes.h:58
@ SBG_TIME_OUT
Definition: sbgErrorCodes.h:56
@ SBG_MALLOC_FAILED
Definition: sbgErrorCodes.h:62
@ SBG_BUFFER_OVERFLOW
Definition: sbgErrorCodes.h:59
@ SBG_NULL_POINTER
Definition: sbgErrorCodes.h:50
@ SBG_INCOMPATIBLE_HARDWARE
Definition: sbgErrorCodes.h:72
@ SBG_NO_ERROR
Definition: sbgErrorCodes.h:48
@ SBG_INVALID_CRC
Definition: sbgErrorCodes.h:51
@ SBG_DEVICE_NOT_FOUND
Definition: sbgErrorCodes.h:68
@ SBG_INVALID_VERSION
Definition: sbgErrorCodes.h:73
@ SBG_WRITE_ERROR
Definition: sbgErrorCodes.h:57
@ SBG_NOT_READY
Definition: sbgErrorCodes.h:61
@ SGB_CALIB_MAG_NOT_ENOUGH_POINTS
Definition: sbgErrorCodes.h:63
@ SBG_INVALID_FRAME
Definition: sbgErrorCodes.h:52
@ SBG_CALIB_MAG_SATURATION
Definition: sbgErrorCodes.h:65
@ SBG_NOT_CONTINUOUS_FRAME
Definition: sbgErrorCodes.h:70
@ SBG_CALIB_MAG_POINTS_NOT_IN_A_PLANE
Definition: sbgErrorCodes.h:66
@ SBG_OPERATION_CANCELLED
Definition: sbgErrorCodes.h:69
@ SBG_CALIB_MAG_INVALID_TAKE
Definition: sbgErrorCodes.h:64
@ SBG_INVALID_PARAMETER
Definition: sbgErrorCodes.h:60