MRPT
1.9.9
xsens_std.cpp
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
#include "
xsens_std.h
"
10
11
//////////////////////////////////////////////////////////////////////////////////////////
12
// Retrieve a string corresponding to the given result code.
13
const
char
*
xsensResultText
(
const
XsensResultValue
result)
14
{
15
switch
(result)
16
{
17
case
XRV_OK
:
18
return
"No error"
;
19
case
XRV_NOBUS
:
20
return
"Bus has no power"
;
21
case
XRV_BUSNOTREADY
:
22
return
"Bus not ready for measurement"
;
23
case
XRV_INVALIDPERIOD
:
24
return
"Period is invalid"
;
25
case
XRV_INVALIDMSG
:
26
return
"Message is invalid"
;
27
case
XRV_INITBUSFAIL1
:
28
return
"A slave did not respond to WaitForSetBID"
;
29
case
XRV_INITBUSFAIL2
:
30
return
"An incorrect answer received after WaitForSetBID"
;
31
case
XRV_INITBUSFAIL3
:
32
return
"After four bus-scans still undetected Motion Trackers"
;
33
case
XRV_SETBIDFAIL1
:
34
return
"No reply to SetBID message during SetBID procedure"
;
35
case
XRV_SETBIDFAIL2
:
36
return
"Other than SetBIDAck received"
;
37
case
XRV_MEASUREMENTFAIL1
:
38
return
"Timer overflow - period too short to collect all data from "
39
"Motion Trackers"
;
40
case
XRV_MEASUREMENTFAIL2
:
41
return
"Motion Tracker responds with other than SlaveData message"
;
42
case
XRV_MEASUREMENTFAIL3
:
43
return
"Total bytes of data of Motion Trackers incl sample counter "
44
"exceeds 255 bytes"
;
45
case
XRV_MEASUREMENTFAIL4
:
46
return
"Timer overflow during measurement: MT does not respond "
47
"within measurement period. Increase period (lower sample "
48
"frequency)"
;
49
case
XRV_MEASUREMENTFAIL5
:
50
return
"Timer overflow during measurement: MT response was not "
51
"received within measurement period. Increase period (lower "
52
"sample frequency) or use fewer Motion Trackers"
;
53
case
XRV_MEASUREMENTFAIL6
:
54
return
"No correct response from Motion Tracker during measurement"
;
55
case
XRV_TIMEROVERFLOW
:
56
return
"Timer overflow during measurement"
;
57
case
XRV_BAUDRATEINVALID
:
58
return
"Baudrate does not comply with valid range"
;
59
case
XRV_INVALIDPARAM
:
60
return
"Invalid parameter supplied"
;
61
case
XRV_MEASUREMENTFAIL7
:
62
return
"TX PC Buffer is full"
;
63
case
XRV_MEASUREMENTFAIL8
:
64
return
"TX PC Buffer overflow, cannot fit full message"
;
65
case
XRV_CONFIGCHECKFAIL
:
66
return
"Failure during device configuration"
;
67
case
XRV_ERROR
:
68
return
"Generic error"
;
69
case
XRV_NOTIMPLEMENTED
:
70
return
"Operation not implemented"
;
71
case
XRV_TIMEOUT
:
72
return
"Timeout occurred, some data received"
;
73
case
XRV_TIMEOUTNODATA
:
74
return
"Timeout occurred, no data was received"
;
75
case
XRV_CHECKSUMFAULT
:
76
return
"Checksum fault"
;
77
case
XRV_OUTOFMEMORY
:
78
return
"Out of memory"
;
79
case
XRV_NOTFOUND
:
80
return
"Requested item was not found"
;
81
case
XRV_UNEXPECTEDMSG
:
82
return
"Unexpected message received"
;
83
case
XRV_INVALIDID
:
84
return
"Invalid id supplied"
;
85
case
XRV_INVALIDOPERATION
:
86
return
"Invalid operation"
;
87
case
XRV_INSUFFICIENTSPACE
:
88
return
"Insufficient buffer space available"
;
89
case
XRV_INPUTCANNOTBEOPENED
:
90
return
"Could not open input device"
;
91
case
XRV_OUTPUTCANNOTBEOPENED
:
92
return
"Could not open output device"
;
93
case
XRV_ALREADYOPEN
:
94
return
"A device is already open"
;
95
case
XRV_ENDOFFILE
:
96
return
"End of file reached"
;
97
case
XRV_COULDNOTREADSETTINGS
:
98
return
"A required settings file could not be opened or is missing "
99
"some data"
;
100
case
XRV_NODATA
:
101
return
"No data available"
;
102
case
XRV_READONLY
:
103
return
"Tried to change a read-only value"
;
104
case
XRV_NULLPTR
:
105
return
"Invalid nullptr pointer supplied"
;
106
case
XRV_INSUFFICIENTDATA
:
107
return
"Insufficient data supplied"
;
108
case
XRV_BUSY
:
109
return
"Busy processing, try again later"
;
110
case
XRV_INVALIDINSTANCE
:
111
return
"Invalid instance called"
;
112
case
XRV_DATACORRUPT
:
113
return
"Data-source corrupt"
;
114
case
XRV_READINITFAILED
:
115
return
"Failure during reading of settings. File may be old or "
116
"corrupt."
;
117
case
XRV_NOXMFOUND
:
118
return
"Could not find any Moven-compatible hardware, check "
119
"connections and Xbus Master LEDs"
;
120
case
XRV_ONLYONEXMFOUND
:
121
return
"Found only one responding Xbus Master, check connections "
122
"and Xbus Master LEDs"
;
123
case
XRV_MTCOUNTZERO
:
124
return
"No sensors found, check cables"
;
125
case
XRV_MTLOCATIONINVALID
:
126
return
"One or more sensors are not where they were expected, "
127
"check locations"
;
128
case
XRV_INSUFFICIENTMTS
:
129
return
"Not enough sensors were found, check cables"
;
130
case
XRV_INITFUSIONFAILED
:
131
return
"Failure during initialization of Fusion Engine. Source "
132
"file may be old or corrupt."
;
133
case
XRV_OTHER
:
134
return
"Something else was received than was requested"
;
135
case
XRV_NOFILEOPEN
:
136
return
"No file open"
;
137
case
XRV_NOPORTOPEN
:
138
return
"No serial port open"
;
139
case
XRV_NOFILEORPORTOPEN
:
140
return
"No file or serial port open"
;
141
case
XRV_PORTNOTFOUND
:
142
return
"A required port could not be found"
;
143
case
XRV_INITPORTFAILED
:
144
return
"The low-level port handler failed to initialize"
;
145
case
XRV_CALIBRATIONFAILED
:
146
return
"A calibration routine failed"
;
147
case
XRV_ALREADYDONE
:
148
return
"This once only operation has already been performed"
;
149
150
case
XRV_SYNC_SINGLE_SLAVE
:
151
return
"The single connected device is configured as a slave"
;
152
case
XRV_SYNC_SECOND_MASTER
:
153
return
"More than one master was detected"
;
154
case
XRV_SYNC_NO_SYNC
:
155
return
"A device was detected that was neither master nor slave"
;
156
case
XRV_SYNC_NO_MASTER
:
157
return
"No master detected"
;
158
case
XRV_SYNC_DATA_MISSING
:
159
return
"A device is not sending enough data, check synchronization "
160
"cables"
;
161
162
case
XRV_VERSION_TOO_LOW
:
163
return
"The version of the object is too low for the requested "
164
"operation"
;
165
case
XRV_VERSION_PROBLEM
:
166
return
"The object has an unrecognized version, so it's not safe "
167
"to perform the operation"
;
168
169
default
:
170
return
"!!Undefined Result Value!!"
;
171
}
172
}
XRV_OK
Operation was performed successfully.
Definition:
xsens_std.h:35
XRV_CALIBRATIONFAILED
Definition:
xsens_std.h:217
XRV_INITBUSFAIL1
Definition:
xsens_std.h:52
XRV_NOBUS
Definition:
xsens_std.h:40
XRV_ONLYONEXMFOUND
Definition:
xsens_std.h:183
XRV_MTCOUNTZERO
Definition:
xsens_std.h:186
XRV_SETBIDFAIL2
Definition:
xsens_std.h:64
XRV_TIMEOUT
Definition:
xsens_std.h:113
XRV_MEASUREMENTFAIL8
Definition:
xsens_std.h:102
XRV_TIMEOUTNODATA
Definition:
xsens_std.h:116
XRV_MTLOCATIONINVALID
Definition:
xsens_std.h:189
XRV_NOTIMPLEMENTED
Definition:
xsens_std.h:110
XRV_SETBIDFAIL1
Definition:
xsens_std.h:61
XRV_SYNC_DATA_MISSING
Definition:
xsens_std.h:240
XRV_INPUTCANNOTBEOPENED
Definition:
xsens_std.h:140
XRV_OUTPUTCANNOTBEOPENED
Definition:
xsens_std.h:143
XRV_INITBUSFAIL3
Definition:
xsens_std.h:58
XRV_PORTNOTFOUND
Definition:
xsens_std.h:211
XRV_INVALIDOPERATION
Definition:
xsens_std.h:134
XRV_NOXMFOUND
Definition:
xsens_std.h:180
XRV_TIMEROVERFLOW
Definition:
xsens_std.h:87
XRV_OUTOFMEMORY
Definition:
xsens_std.h:122
XRV_INSUFFICIENTSPACE
Definition:
xsens_std.h:137
XRV_ENDOFFILE
Definition:
xsens_std.h:149
XRV_INITBUSFAIL2
Definition:
xsens_std.h:55
XRV_BUSNOTREADY
Definition:
xsens_std.h:43
XRV_READONLY
Definition:
xsens_std.h:158
XRV_COULDNOTREADSETTINGS
Definition:
xsens_std.h:152
XRV_INVALIDID
Definition:
xsens_std.h:131
XRV_CHECKSUMFAULT
Definition:
xsens_std.h:119
XRV_ALREADYDONE
Definition:
xsens_std.h:224
XRV_NOPORTOPEN
Definition:
xsens_std.h:205
XRV_BAUDRATEINVALID
Definition:
xsens_std.h:90
XRV_DATACORRUPT
Definition:
xsens_std.h:173
XRV_NODATA
Definition:
xsens_std.h:155
XsensResultValue
XsensResultValue
Xsens return values.
Definition:
xsens_std.h:31
XRV_MEASUREMENTFAIL2
Definition:
xsens_std.h:71
XRV_NOTFOUND
Definition:
xsens_std.h:125
XRV_READINITFAILED
Definition:
xsens_std.h:177
XRV_CONFIGCHECKFAIL
Definition:
xsens_std.h:221
XRV_INVALIDPERIOD
Definition:
xsens_std.h:46
xsens_std.h
XRV_SYNC_SINGLE_SLAVE
Definition:
xsens_std.h:228
XRV_SYNC_SECOND_MASTER
Definition:
xsens_std.h:231
XRV_INSUFFICIENTDATA
Definition:
xsens_std.h:164
XRV_SYNC_NO_SYNC
Definition:
xsens_std.h:234
XRV_VERSION_PROBLEM
Definition:
xsens_std.h:248
XRV_INITFUSIONFAILED
Definition:
xsens_std.h:195
XRV_MEASUREMENTFAIL5
Definition:
xsens_std.h:81
XRV_INITPORTFAILED
Definition:
xsens_std.h:214
XRV_INVALIDINSTANCE
Definition:
xsens_std.h:170
XRV_INVALIDPARAM
Definition:
xsens_std.h:96
XRV_MEASUREMENTFAIL7
Definition:
xsens_std.h:99
XRV_MEASUREMENTFAIL4
Definition:
xsens_std.h:78
XRV_NULLPTR
Definition:
xsens_std.h:161
xsensResultText
const char * xsensResultText(const XsensResultValue result)
Definition:
xsens_std.cpp:13
XRV_OTHER
Definition:
xsens_std.h:198
XRV_MEASUREMENTFAIL6
Definition:
xsens_std.h:84
XRV_ERROR
Definition:
xsens_std.h:107
XRV_VERSION_TOO_LOW
Definition:
xsens_std.h:244
XRV_INSUFFICIENTMTS
Definition:
xsens_std.h:192
XRV_MEASUREMENTFAIL1
Definition:
xsens_std.h:68
XRV_UNEXPECTEDMSG
Definition:
xsens_std.h:128
XRV_ALREADYOPEN
Definition:
xsens_std.h:146
XRV_BUSY
Definition:
xsens_std.h:167
XRV_SYNC_NO_MASTER
Definition:
xsens_std.h:237
XRV_NOFILEOPEN
Definition:
xsens_std.h:202
XRV_MEASUREMENTFAIL3
Definition:
xsens_std.h:75
XRV_INVALIDMSG
Definition:
xsens_std.h:49
XRV_NOFILEORPORTOPEN
Definition:
xsens_std.h:208
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