Main MRPT website
>
C++ reference for MRPT 1.9.9
xSens_MT3
xsens_std.cpp
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
#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:34
XRV_CALIBRATIONFAILED
Definition:
xsens_std.h:216
XRV_INITBUSFAIL1
Definition:
xsens_std.h:51
XRV_NOBUS
Definition:
xsens_std.h:39
XRV_ONLYONEXMFOUND
Definition:
xsens_std.h:182
XRV_MTCOUNTZERO
Definition:
xsens_std.h:185
XRV_SETBIDFAIL2
Definition:
xsens_std.h:63
XRV_TIMEOUT
Definition:
xsens_std.h:112
XRV_MEASUREMENTFAIL8
Definition:
xsens_std.h:101
XRV_TIMEOUTNODATA
Definition:
xsens_std.h:115
XRV_MTLOCATIONINVALID
Definition:
xsens_std.h:188
XRV_NOTIMPLEMENTED
Definition:
xsens_std.h:109
XRV_SETBIDFAIL1
Definition:
xsens_std.h:60
XRV_SYNC_DATA_MISSING
Definition:
xsens_std.h:239
XRV_INPUTCANNOTBEOPENED
Definition:
xsens_std.h:139
XRV_OUTPUTCANNOTBEOPENED
Definition:
xsens_std.h:142
XRV_INITBUSFAIL3
Definition:
xsens_std.h:57
XRV_PORTNOTFOUND
Definition:
xsens_std.h:210
XRV_INVALIDOPERATION
Definition:
xsens_std.h:133
XRV_NOXMFOUND
Definition:
xsens_std.h:179
XRV_TIMEROVERFLOW
Definition:
xsens_std.h:86
XRV_OUTOFMEMORY
Definition:
xsens_std.h:121
XRV_INSUFFICIENTSPACE
Definition:
xsens_std.h:136
XRV_ENDOFFILE
Definition:
xsens_std.h:148
XRV_INITBUSFAIL2
Definition:
xsens_std.h:54
XRV_BUSNOTREADY
Definition:
xsens_std.h:42
XRV_READONLY
Definition:
xsens_std.h:157
XRV_COULDNOTREADSETTINGS
Definition:
xsens_std.h:151
XRV_INVALIDID
Definition:
xsens_std.h:130
XRV_CHECKSUMFAULT
Definition:
xsens_std.h:118
XRV_ALREADYDONE
Definition:
xsens_std.h:223
XRV_NOPORTOPEN
Definition:
xsens_std.h:204
XRV_BAUDRATEINVALID
Definition:
xsens_std.h:89
XRV_DATACORRUPT
Definition:
xsens_std.h:172
XRV_NODATA
Definition:
xsens_std.h:154
XsensResultValue
XsensResultValue
Xsens return values.
Definition:
xsens_std.h:31
XRV_MEASUREMENTFAIL2
Definition:
xsens_std.h:70
XRV_NOTFOUND
Definition:
xsens_std.h:124
XRV_READINITFAILED
Definition:
xsens_std.h:176
XRV_CONFIGCHECKFAIL
Definition:
xsens_std.h:220
XRV_INVALIDPERIOD
Definition:
xsens_std.h:45
xsens_std.h
XRV_SYNC_SINGLE_SLAVE
Definition:
xsens_std.h:227
XRV_SYNC_SECOND_MASTER
Definition:
xsens_std.h:230
XRV_INSUFFICIENTDATA
Definition:
xsens_std.h:163
XRV_SYNC_NO_SYNC
Definition:
xsens_std.h:233
XRV_VERSION_PROBLEM
Definition:
xsens_std.h:247
XRV_INITFUSIONFAILED
Definition:
xsens_std.h:194
XRV_MEASUREMENTFAIL5
Definition:
xsens_std.h:80
XRV_INITPORTFAILED
Definition:
xsens_std.h:213
XRV_INVALIDINSTANCE
Definition:
xsens_std.h:169
XRV_INVALIDPARAM
Definition:
xsens_std.h:95
XRV_MEASUREMENTFAIL7
Definition:
xsens_std.h:98
XRV_MEASUREMENTFAIL4
Definition:
xsens_std.h:77
XRV_NULLPTR
Definition:
xsens_std.h:160
xsensResultText
const char * xsensResultText(const XsensResultValue result)
Definition:
xsens_std.cpp:13
XRV_OTHER
Definition:
xsens_std.h:197
XRV_MEASUREMENTFAIL6
Definition:
xsens_std.h:83
XRV_ERROR
Definition:
xsens_std.h:106
XRV_VERSION_TOO_LOW
Definition:
xsens_std.h:243
XRV_INSUFFICIENTMTS
Definition:
xsens_std.h:191
XRV_MEASUREMENTFAIL1
Definition:
xsens_std.h:67
XRV_UNEXPECTEDMSG
Definition:
xsens_std.h:127
XRV_ALREADYOPEN
Definition:
xsens_std.h:145
XRV_BUSY
Definition:
xsens_std.h:166
XRV_SYNC_NO_MASTER
Definition:
xsens_std.h:236
XRV_NOFILEOPEN
Definition:
xsens_std.h:201
XRV_MEASUREMENTFAIL3
Definition:
xsens_std.h:74
XRV_INVALIDMSG
Definition:
xsens_std.h:48
XRV_NOFILEORPORTOPEN
Definition:
xsens_std.h:207
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