MRPT  1.9.9
xsresultvalue.h
Go to the documentation of this file.
1 /* +------------------------------------------------------------------------+
2  | Mobile Robot Programming Toolkit (MRPT) |
3  | http://www.mrpt.org/ |
4  | |
5  | Copyright (c) 2005-2018, Individual contributors, see AUTHORS file |
6  | See: http://www.mrpt.org/Authors - All rights reserved. |
7  | Released under BSD License. See details in http://www.mrpt.org/License |
8  +------------------------------------------------------------------------+ */
9 #ifndef XSRESULTVALUE_H
10 #define XSRESULTVALUE_H
11 
12 #include "xstypesconfig.h"
13 
14 #ifdef __cplusplus
15 extern "C" {
16 #endif
17 
18 //////////////////////////////////////////////////////////////////////////////////////////
19 /*! \addtogroup enums Global enumerations
20  @{
21 */
22 /*! \brief Xsens result values
23  \details These values are used to signal success or specific failures of
24  functions
25  \sa XsResultValue_toString
26 */
28 {
29  // general OK
30  /** 0: Operation was performed successfully */
31  XRV_OK = 0
32 
33  // communication protocol
34  /** 1: No bus communication possible */
35  ,
36  XRV_NOBUS = 1
37  /** 2: InitBus and/or SetBID are not issued */
38  ,
39  XRV_BUSNOTREADY = 2
40  /** 3: Period sent is invalid */
41  ,
43  /** 4: The message is invalid or not implemented */
44  ,
45  XRV_INVALIDMSG = 4
46  /** 16: A slave did not respond to WaitForSetBID */
47  ,
48  XRV_INITBUSFAIL1 = 16
49  /** 17: An incorrect answer received after WaitForSetBID */
50  ,
51  XRV_INITBUSFAIL2 = 17
52  /** 18: After four bus-scans still undetected Motion Trackers */
53  ,
54  XRV_INITBUSFAIL3 = 18
55  /** 20: No reply to SetBID message during SetBID procedure */
56  ,
57  XRV_SETBIDFAIL1 = 20
58  /** 21: Other than SetBIDAck received */
59  ,
60  XRV_SETBIDFAIL2 = 21
61  /** 24: Timer overflow - period too short to collect all data from Motion
62  Trackers */
63  ,
65  /** 25: Motion Tracker responds with other than SlaveData message */
66  ,
68  /** 26: Total bytes of data of Motion Trackers including sample counter
69  exceeds 255 bytes */
70  ,
72  /** 27: Timer overflows during measurement */
73  ,
75  /** 28: Timer overflows during measurement */
76  ,
78  /** 29: No correct response from Motion Tracker during measurement */
79  ,
81  /** 30: Timer overflows during measurement */
82  ,
84  /** 32: Baud rate does not comply with valid range */
85  ,
87  /** 33: An invalid parameter is supplied */
88  ,
89  XRV_INVALIDPARAM = 33
90  /** 35: TX PC Buffer is full */
91  ,
93  /** 36: TX PC Buffer overflow, cannot fit full message */
94  ,
96  /** 40: The device generated an error, try updating the firmware */
97  ,
98  XRV_DEVICEERROR = 40
99  /** 41: The device generates more data than the bus communication can handle
100  (baud rate may be too low) */
101  ,
102  XRV_DATAOVERFLOW = 41
103  /** 42: The sample buffer of the device was full during a communication
104  outage */
105  ,
106  XRV_BUFFEROVERFLOW = 42
107 
108  // CMT / XDA / XME / etc
109  /** 256: A generic error occurred */
110  ,
111  XRV_ERROR = 256
112  /** 257: Operation not implemented in this version (yet) */
113  ,
114  XRV_NOTIMPLEMENTED = 257
115  /** 258: A timeout occurred */
116  ,
117  XRV_TIMEOUT = 258
118  /** 259: Operation aborted because of no data read */
119  ,
120  XRV_TIMEOUTNODATA = 259
121  /** 260: Checksum fault occurred */
122  ,
123  XRV_CHECKSUMFAULT = 260
124  /** 261: No internal memory available */
125  ,
126  XRV_OUTOFMEMORY = 261
127  /** 262: The requested item was not found */
128  ,
129  XRV_NOTFOUND = 262
130  /** 263: Unexpected message received (e.g. no acknowledge message received)
131  */
132  ,
133  XRV_UNEXPECTEDMSG = 263
134  /** 264: Invalid id supplied */
135  ,
136  XRV_INVALIDID = 264
137  /** 265: Operation is invalid at this point */
138  ,
140  /** 266: Insufficient buffer space available */
141  ,
143  /** 267: The specified i/o device can not be opened */
144  ,
146  /** 268: The specified i/o device can not be opened */
147  ,
149  /** 269: An I/O device is already opened with this object */
150  ,
151  XRV_ALREADYOPEN = 269
152  /** 270: End of file is reached */
153  ,
154  XRV_ENDOFFILE = 270
155  /** 271: A required settings file could not be opened or is missing some
156  data */
157  ,
159  /** 272: No data is available */
160  ,
161  XRV_NODATA = 272
162  /** 273: Tried to change a read-only value */
163  ,
164  XRV_READONLY = 273
165  /** 274: Tried to supply a nullptr value where it is not allowed */
166  ,
167  XRV_NULLPTR = 274
168  /** 275: Insufficient data was supplied to a function */
169  ,
171  /** 276: Busy processing, try again later */
172  ,
173  XRV_BUSY = 276
174  /** 277: Invalid instance called */
175  ,
176  XRV_INVALIDINSTANCE = 277
177  /** 278: A trusted data stream proves to contain corrupted data */
178  ,
179  XRV_DATACORRUPT = 278
180 
181  /** 279: Failure during read of settings */
182  ,
183  XRV_READINITFAILED = 279
184  /** 280: Could not find any MVN-compatible hardware */
185  ,
186  XRV_NOXMFOUND = 280
187  /** 281: Found only one responding Xbus Master */
188  ,
189  XRV_ONLYONEXMFOUND = 281
190  /** 282: No sensors found */
191  ,
192  XRV_MTCOUNTZERO = 282
193  /** 283: One or more sensors are not where they were expected */
194  ,
196  /** 284: Not enough sensors were found */
197  ,
198  XRV_INSUFFICIENTMTS = 284
199  /** 285: Failure during initialization of Fusion Engine */
200  ,
202  /** 286: Something else was received than was requested */
203  ,
204  XRV_OTHER = 286
205 
206  /** 287: No file opened for reading/writing */
207  ,
208  XRV_NOFILEOPEN = 287
209  /** 288: No serial port opened for reading/writing */
210  ,
211  XRV_NOPORTOPEN = 288
212  /** 289: No file or serial port opened for reading/writing */
213  ,
215  /** 290: A required port could not be found */
216  ,
217  XRV_PORTNOTFOUND = 290
218  /** 291: The low-level port handler failed to initialize */
219  ,
220  XRV_INITPORTFAILED = 291
221  /** 292: A calibration routine failed */
222  ,
224 
225  /** 293: The in-config check of the device failed */
226  ,
227  XRV_CONFIGCHECKFAIL = 293
228  /** 294: The operation is once only and has already been performed */
229  ,
230  XRV_ALREADYDONE = 294
231 
232  /** 295: The single connected device is configured as a slave */
233  ,
235  /** 296: More than one master was detected */
236  ,
238  /** 297: A device was detected that was neither master nor slave */
239  ,
240  XRV_SYNC_NO_SYNC = 297
241  /** 298: No master detected */
242  ,
243  XRV_SYNC_NO_MASTER = 298
244  /** 299: A device is not sending enough data */
245  ,
247 
248  /** 300: The version of the object is too low for the requested operation */
249  ,
250  XRV_VERSION_TOO_LOW = 300
251  /** 301: The object has an unrecognized version, so it's not safe to perform
252  the operation */
253  ,
254  XRV_VERSION_PROBLEM = 301
255 
256  /** 302: The process was aborted by an external event, usually a user action
257  or process termination */
258  ,
259  XRV_ABORTED = 302
260  /** 303: The requested functionality is not supported by the device */
261  ,
262  XRV_UNSUPPORTED = 303
263 
264  /** 304: A packet counter value was missed */
265  ,
267 
268  /** 305: An error occured while trying to put the device in measurement mode
269  */
270  ,
272 };
273 /*! @} */
274 typedef enum XsResultValue XsResultValue;
275 
276 //! These enum values can be used to specify a device error (XRV_DEVICEERROR
277 //! 0x28), i.e. a xbus message like [FA FF 42 05 28 XXXXXXXX CS]
279 {
288 };
290 
291 //////////////////////////////////////////////////////////////////////////////////////////
292 
293 /* \brief Retrieve a string corresponding to the given result code.
294 
295  This function uses the XsResultText list to return a string with the
296  relevant result
297  code in a textual format. If the supplied result code is invalid the
298  "!!Invalid result code!!" string is returned.
299 */
301 
302 #ifdef __cplusplus
303 } // extern "C"
304 #endif
305 
306 #endif // file guard
XsResultValue
Xsens result values.
Definition: xsresultvalue.h:28
@ XRV_NODATA
@ XRV_CONFIGCHECKFAIL
@ XRV_PORTNOTFOUND
@ XRV_BUSY
@ XRV_ALREADYOPEN
@ XRV_SYNC_NO_MASTER
@ XRV_CHECKSUMFAULT
@ XRV_INSUFFICIENTDATA
@ XRV_INPUTCANNOTBEOPENED
@ XRV_MEASUREMENTFAIL8
Definition: xsresultvalue.h:95
@ XRV_VERSION_PROBLEM
@ XRV_DEVICEERROR
Definition: xsresultvalue.h:98
@ XRV_PACKETCOUNTERMISSED
@ XRV_NOPORTOPEN
@ XRV_DATACORRUPT
@ XRV_INVALIDMSG
Definition: xsresultvalue.h:45
@ XRV_BUSNOTREADY
Definition: xsresultvalue.h:39
@ XRV_SETBIDFAIL1
Definition: xsresultvalue.h:57
@ XRV_ENDOFFILE
@ XRV_INVALIDINSTANCE
@ XRV_NOFILEOPEN
@ XRV_NOFILEORPORTOPEN
@ XRV_OUTPUTCANNOTBEOPENED
@ XRV_VERSION_TOO_LOW
@ XRV_INSUFFICIENTSPACE
@ XRV_TIMEROVERFLOW
Definition: xsresultvalue.h:83
@ XRV_INVALIDPERIOD
Definition: xsresultvalue.h:42
@ XRV_NOTFOUND
@ XRV_INITFUSIONFAILED
@ XRV_SYNC_SECOND_MASTER
@ XRV_INVALIDOPERATION
@ XRV_SETBIDFAIL2
Definition: xsresultvalue.h:60
@ XRV_UNSUPPORTED
@ XRV_BUFFEROVERFLOW
@ XRV_COULDNOTREADSETTINGS
@ XRV_INITBUSFAIL3
Definition: xsresultvalue.h:54
@ XRV_DATAOVERFLOW
@ XRV_ERROR
@ XRV_OUTOFMEMORY
@ XRV_MEASUREMENTFAIL1
Definition: xsresultvalue.h:64
@ XRV_TIMEOUT
@ XRV_MEASUREMENTFAILED
@ XRV_MEASUREMENTFAIL2
Definition: xsresultvalue.h:67
@ XRV_MEASUREMENTFAIL3
Definition: xsresultvalue.h:71
@ XRV_NOBUS
Definition: xsresultvalue.h:36
@ XRV_MEASUREMENTFAIL6
Definition: xsresultvalue.h:80
@ XRV_OK
0: Operation was performed successfully
Definition: xsresultvalue.h:31
@ XRV_MEASUREMENTFAIL5
Definition: xsresultvalue.h:77
@ XRV_INITPORTFAILED
@ XRV_NOXMFOUND
@ XRV_MTLOCATIONINVALID
@ XRV_INITBUSFAIL1
Definition: xsresultvalue.h:48
@ XRV_SYNC_SINGLE_SLAVE
@ XRV_INVALIDPARAM
Definition: xsresultvalue.h:89
@ XRV_READINITFAILED
@ XRV_CALIBRATIONFAILED
@ XRV_NOTIMPLEMENTED
@ XRV_READONLY
@ XRV_SYNC_NO_SYNC
@ XRV_UNEXPECTEDMSG
@ XRV_ONLYONEXMFOUND
@ XRV_SYNC_DATA_MISSING
@ XRV_NULLPTR
@ XRV_INSUFFICIENTMTS
@ XRV_OTHER
@ XRV_BAUDRATEINVALID
Definition: xsresultvalue.h:86
@ XRV_INVALIDID
@ XRV_ABORTED
@ XRV_MEASUREMENTFAIL7
Definition: xsresultvalue.h:92
@ XRV_MTCOUNTZERO
@ XRV_ALREADYDONE
@ XRV_INITBUSFAIL2
Definition: xsresultvalue.h:51
@ XRV_TIMEOUTNODATA
@ XRV_MEASUREMENTFAIL4
Definition: xsresultvalue.h:74
XsDeviceErrorType
These enum values can be used to specify a device error (XRV_DEVICEERROR 0x28), i....
@ XERR_ImcuSettingsFailure
@ XERR_Unknown
@ XERR_ImcuEmtsReadFailure
@ XERR_DspCrashed
@ XERR_ImcuEmtsWriteFailure
@ XERR_DspBootingTimeout
@ XERR_ImcuTimeout
@ XERR_ImcuSettingsInvalid
XSTYPES_DLL_API const char * XsResultValue_toString(XsResultValue result)
#define XSTYPES_DLL_API
Definition: xstypesconfig.h:9



Page generated by Doxygen 1.9.1 for MRPT 1.9.9 Git: 814d80880 Fri Aug 24 01:51:28 2018 +0200 at mar 26 may 2026 12:30:59 CEST