sbgErrorCodes.h
Go to the documentation of this file.
1 
20 #ifndef SBG_ERROR_CODES_H
21 #define SBG_ERROR_CODES_H
22 
23 // Local headers
24 #include "sbgDefines.h"
25 
26 //----------------------------------------------------------------------//
27 //- Errors code definitions -//
28 //----------------------------------------------------------------------//
29 
33 typedef enum _SbgErrorCode
34 {
61 } SbgErrorCode;
62 
63 //----------------------------------------------------------------------//
64 //- Error codes to string litteral conversion -//
65 //----------------------------------------------------------------------//
66 
72 static inline const char *sbgErrorCodeToString(SbgErrorCode errorCode)
73 {
77  static const char *sbgErrorCodeString[] =
78  {
79  "SBG_NO_ERROR",
80  "SBG_ERROR",
81  "SBG_NULL_POINTER",
82  "SBG_INVALID_CRC",
83  "SBG_INVALID_FRAME",
84  "SBG_TIME_OUT",
85  "SBG_WRITE_ERROR",
86  "SBG_READ_ERROR",
87  "SBG_BUFFER_OVERFLOW",
88  "SBG_INVALID_PARAMETER",
89  "SBG_NOT_READY",
90  "SBG_MALLOC_FAILED",
91  "SGB_CALIB_MAG_NOT_ENOUGH_POINTS",
92  "SBG_CALIB_MAG_INVALID_TAKE",
93  "SBG_CALIB_MAG_SATURATION",
94  "SBG_CALIB_MAG_POINTS_NOT_IN_A_PLANE",
95  "SBG_DEVICE_NOT_FOUND",
96  "SBG_OPERATION_CANCELLED",
97  "SBG_NOT_CONTINUOUS_FRAME",
98  "SBG_INCOMPATIBLE_HARDWARE",
99  "SBG_INVALID_VERSION"
100  };
101 
102  assert(errorCode < SBG_ARRAY_SIZE(sbgErrorCodeString));
103  return sbgErrorCodeString[errorCode];
104 }
105 
106 #endif /* SBG_ERROR_CODES_H */
static const char * sbgErrorCodeToString(SbgErrorCode errorCode)
Definition: sbgErrorCodes.h:72
#define SBG_ARRAY_SIZE(a)
Definition: sbgDefines.h:97
Header file that contains all common definitions.
enum _SbgErrorCode SbgErrorCode
_SbgErrorCode
Definition: sbgErrorCodes.h:33


sbg_driver
Author(s): SBG Systems
autogenerated on Thu Oct 22 2020 03:47:22