Main MRPT website
>
C++ reference for MRPT 1.9.9
xSens_MT4
xstypes
include
xsens
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-2017, 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
*/
27
enum
XsResultValue
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
,
42
XRV_INVALIDPERIOD
= 3
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
,
64
XRV_MEASUREMENTFAIL1
= 24
65
/** 25: Motion Tracker responds with other than SlaveData message */
66
,
67
XRV_MEASUREMENTFAIL2
= 25
68
/** 26: Total bytes of data of Motion Trackers including sample counter
69
exceeds 255 bytes */
70
,
71
XRV_MEASUREMENTFAIL3
= 26
72
/** 27: Timer overflows during measurement */
73
,
74
XRV_MEASUREMENTFAIL4
= 27
75
/** 28: Timer overflows during measurement */
76
,
77
XRV_MEASUREMENTFAIL5
= 28
78
/** 29: No correct response from Motion Tracker during measurement */
79
,
80
XRV_MEASUREMENTFAIL6
= 29
81
/** 30: Timer overflows during measurement */
82
,
83
XRV_TIMEROVERFLOW
= 30
84
/** 32: Baud rate does not comply with valid range */
85
,
86
XRV_BAUDRATEINVALID
= 32
87
/** 33: An invalid parameter is supplied */
88
,
89
XRV_INVALIDPARAM
= 33
90
/** 35: TX PC Buffer is full */
91
,
92
XRV_MEASUREMENTFAIL7
= 35
93
/** 36: TX PC Buffer overflow, cannot fit full message */
94
,
95
XRV_MEASUREMENTFAIL8
= 36
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
,
139
XRV_INVALIDOPERATION
= 265
140
/** 266: Insufficient buffer space available */
141
,
142
XRV_INSUFFICIENTSPACE
= 266
143
/** 267: The specified i/o device can not be opened */
144
,
145
XRV_INPUTCANNOTBEOPENED
= 267
146
/** 268: The specified i/o device can not be opened */
147
,
148
XRV_OUTPUTCANNOTBEOPENED
= 268
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
,
158
XRV_COULDNOTREADSETTINGS
= 271
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
,
170
XRV_INSUFFICIENTDATA
= 275
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
,
195
XRV_MTLOCATIONINVALID
= 283
196
/** 284: Not enough sensors were found */
197
,
198
XRV_INSUFFICIENTMTS
= 284
199
/** 285: Failure during initialization of Fusion Engine */
200
,
201
XRV_INITFUSIONFAILED
= 285
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
,
214
XRV_NOFILEORPORTOPEN
= 289
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
,
223
XRV_CALIBRATIONFAILED
= 292
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
,
234
XRV_SYNC_SINGLE_SLAVE
= 295
235
/** 296: More than one master was detected */
236
,
237
XRV_SYNC_SECOND_MASTER
= 296
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
,
246
XRV_SYNC_DATA_MISSING
= 299
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
,
266
XRV_PACKETCOUNTERMISSED
= 304
267
268
/** 305: An error occured while trying to put the device in measurement mode
269
*/
270
,
271
XRV_MEASUREMENTFAILED
= 305
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]
278
enum
XsDeviceErrorType
279
{
280
XERR_Unknown
= 0,
281
XERR_ImcuTimeout
= 1,
282
XERR_ImcuSettingsInvalid
= 2,
283
XERR_ImcuSettingsFailure
= 3,
284
XERR_ImcuEmtsWriteFailure
= 4,
285
XERR_ImcuEmtsReadFailure
= 5,
286
XERR_DspCrashed
= 6,
287
XERR_DspBootingTimeout
= 7
288
};
289
typedef
enum
XsDeviceErrorType
XsDeviceErrorType
;
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
*/
300
XSTYPES_DLL_API
const
char
*
XsResultValue_toString
(
XsResultValue
result);
301
302
#ifdef __cplusplus
303
}
// extern "C"
304
#endif
305
306
#endif // file guard
XRV_BUSNOTREADY
Definition:
xsresultvalue.h:39
XRV_INSUFFICIENTMTS
Definition:
xsresultvalue.h:198
XsResultValue_toString
XSTYPES_DLL_API const char * XsResultValue_toString(XsResultValue result)
XRV_TIMEROVERFLOW
Definition:
xsresultvalue.h:83
XRV_UNEXPECTEDMSG
Definition:
xsresultvalue.h:133
XRV_VERSION_PROBLEM
Definition:
xsresultvalue.h:254
XRV_INPUTCANNOTBEOPENED
Definition:
xsresultvalue.h:145
XRV_INVALIDINSTANCE
Definition:
xsresultvalue.h:176
XRV_INVALIDMSG
Definition:
xsresultvalue.h:45
XRV_SYNC_DATA_MISSING
Definition:
xsresultvalue.h:246
XRV_SYNC_SINGLE_SLAVE
Definition:
xsresultvalue.h:234
XRV_ALREADYOPEN
Definition:
xsresultvalue.h:151
XRV_MEASUREMENTFAIL4
Definition:
xsresultvalue.h:74
XRV_ERROR
Definition:
xsresultvalue.h:111
XRV_SYNC_NO_MASTER
Definition:
xsresultvalue.h:243
XRV_ALREADYDONE
Definition:
xsresultvalue.h:230
XRV_DATACORRUPT
Definition:
xsresultvalue.h:179
XRV_DATAOVERFLOW
Definition:
xsresultvalue.h:102
XRV_DEVICEERROR
Definition:
xsresultvalue.h:98
XRV_OK
0: Operation was performed successfully
Definition:
xsresultvalue.h:31
XRV_OTHER
Definition:
xsresultvalue.h:204
XERR_DspBootingTimeout
Definition:
xsresultvalue.h:287
XRV_MEASUREMENTFAIL3
Definition:
xsresultvalue.h:71
XRV_BAUDRATEINVALID
Definition:
xsresultvalue.h:86
XRV_OUTOFMEMORY
Definition:
xsresultvalue.h:126
XRV_NODATA
Definition:
xsresultvalue.h:161
XRV_INITBUSFAIL2
Definition:
xsresultvalue.h:51
XERR_ImcuEmtsReadFailure
Definition:
xsresultvalue.h:285
XRV_UNSUPPORTED
Definition:
xsresultvalue.h:262
XRV_MEASUREMENTFAIL7
Definition:
xsresultvalue.h:92
XERR_ImcuSettingsFailure
Definition:
xsresultvalue.h:283
XsResultValue
XsResultValue
Xsens result values.
Definition:
xsresultvalue.h:27
XRV_SYNC_SECOND_MASTER
Definition:
xsresultvalue.h:237
XRV_NOTIMPLEMENTED
Definition:
xsresultvalue.h:114
XRV_SETBIDFAIL2
Definition:
xsresultvalue.h:60
XRV_INITBUSFAIL1
Definition:
xsresultvalue.h:48
XRV_TIMEOUTNODATA
Definition:
xsresultvalue.h:120
XRV_INVALIDPARAM
Definition:
xsresultvalue.h:89
XRV_INITPORTFAILED
Definition:
xsresultvalue.h:220
XRV_MEASUREMENTFAIL2
Definition:
xsresultvalue.h:67
XRV_INVALIDPERIOD
Definition:
xsresultvalue.h:42
XERR_ImcuTimeout
Definition:
xsresultvalue.h:281
XRV_VERSION_TOO_LOW
Definition:
xsresultvalue.h:250
XRV_PACKETCOUNTERMISSED
Definition:
xsresultvalue.h:266
XRV_BUFFEROVERFLOW
Definition:
xsresultvalue.h:106
XRV_MEASUREMENTFAIL8
Definition:
xsresultvalue.h:95
XRV_INSUFFICIENTSPACE
Definition:
xsresultvalue.h:142
XRV_MEASUREMENTFAILED
Definition:
xsresultvalue.h:271
XRV_ONLYONEXMFOUND
Definition:
xsresultvalue.h:189
XRV_INVALIDID
Definition:
xsresultvalue.h:136
XRV_NULLPTR
Definition:
xsresultvalue.h:167
XSTYPES_DLL_API
#define XSTYPES_DLL_API
Definition:
xstypesconfig.h:9
XRV_CHECKSUMFAULT
Definition:
xsresultvalue.h:123
XRV_NOXMFOUND
Definition:
xsresultvalue.h:186
XRV_OUTPUTCANNOTBEOPENED
Definition:
xsresultvalue.h:148
XRV_TIMEOUT
Definition:
xsresultvalue.h:117
XERR_DspCrashed
Definition:
xsresultvalue.h:286
XRV_READONLY
Definition:
xsresultvalue.h:164
XERR_ImcuSettingsInvalid
Definition:
xsresultvalue.h:282
XsDeviceErrorType
XsDeviceErrorType
These enum values can be used to specify a device error (XRV_DEVICEERROR 0x28), i.e.
Definition:
xsresultvalue.h:278
XRV_NOBUS
Definition:
xsresultvalue.h:36
XRV_INITFUSIONFAILED
Definition:
xsresultvalue.h:201
XRV_ENDOFFILE
Definition:
xsresultvalue.h:154
XRV_INVALIDOPERATION
Definition:
xsresultvalue.h:139
XRV_COULDNOTREADSETTINGS
Definition:
xsresultvalue.h:158
XRV_NOTFOUND
Definition:
xsresultvalue.h:129
XRV_SYNC_NO_SYNC
Definition:
xsresultvalue.h:240
XRV_ABORTED
Definition:
xsresultvalue.h:259
XRV_BUSY
Definition:
xsresultvalue.h:173
XRV_INITBUSFAIL3
Definition:
xsresultvalue.h:54
XRV_MEASUREMENTFAIL1
Definition:
xsresultvalue.h:64
XRV_MTLOCATIONINVALID
Definition:
xsresultvalue.h:195
xstypesconfig.h
XRV_MEASUREMENTFAIL6
Definition:
xsresultvalue.h:80
XRV_NOPORTOPEN
Definition:
xsresultvalue.h:211
XERR_Unknown
Definition:
xsresultvalue.h:280
XRV_CALIBRATIONFAILED
Definition:
xsresultvalue.h:223
XERR_ImcuEmtsWriteFailure
Definition:
xsresultvalue.h:284
XRV_NOFILEOPEN
Definition:
xsresultvalue.h:208
XRV_MTCOUNTZERO
Definition:
xsresultvalue.h:192
XRV_INSUFFICIENTDATA
Definition:
xsresultvalue.h:170
XRV_NOFILEORPORTOPEN
Definition:
xsresultvalue.h:214
XRV_PORTNOTFOUND
Definition:
xsresultvalue.h:217
XRV_SETBIDFAIL1
Definition:
xsresultvalue.h:57
XRV_READINITFAILED
Definition:
xsresultvalue.h:183
XRV_MEASUREMENTFAIL5
Definition:
xsresultvalue.h:77
XRV_CONFIGCHECKFAIL
Definition:
xsresultvalue.h:227
Page generated by
Doxygen 1.8.14
for MRPT 1.9.9 Git: ae4571287 Thu Nov 23 00:06:53 2017 +0100 at dom oct 27 23:51:55 CET 2019