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