Main MRPT website > C++ reference for MRPT 1.9.9
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-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 #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";
38  return "Timer overflow - period too short to collect all data from "
39  "Motion Trackers";
41  return "Motion Tracker responds with other than SlaveData message";
43  return "Total bytes of data of Motion Trackers incl sample counter "
44  "exceeds 255 bytes";
46  return "Timer overflow during measurement: MT does not respond "
47  "within measurement period. Increase period (lower sample "
48  "frequency)";
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";
54  return "No correct response from Motion Tracker during measurement";
55  case XRV_TIMEROVERFLOW:
56  return "Timer overflow during measurement";
58  return "Baudrate does not comply with valid range";
59  case XRV_INVALIDPARAM:
60  return "Invalid parameter supplied";
62  return "TX PC Buffer is full";
64  return "TX PC Buffer overflow, cannot fit full message";
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";
86  return "Invalid operation";
88  return "Insufficient buffer space available";
90  return "Could not open input device";
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";
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";
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";
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";
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";
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";
146  return "A calibration routine failed";
147  case XRV_ALREADYDONE:
148  return "This once only operation has already been performed";
149 
151  return "The single connected device is configured as a slave";
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";
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_SETBIDFAIL1
@ XRV_SETBIDFAIL1
Definition: xsens_std.h:60
XRV_NOBUS
@ XRV_NOBUS
Definition: xsens_std.h:39
XRV_SYNC_DATA_MISSING
@ XRV_SYNC_DATA_MISSING
Definition: xsens_std.h:239
XRV_NOFILEOPEN
@ XRV_NOFILEOPEN
Definition: xsens_std.h:201
XRV_VERSION_TOO_LOW
@ XRV_VERSION_TOO_LOW
Definition: xsens_std.h:243
XRV_SYNC_NO_MASTER
@ XRV_SYNC_NO_MASTER
Definition: xsens_std.h:236
XRV_MTCOUNTZERO
@ XRV_MTCOUNTZERO
Definition: xsens_std.h:185
XRV_ONLYONEXMFOUND
@ XRV_ONLYONEXMFOUND
Definition: xsens_std.h:182
XRV_MEASUREMENTFAIL8
@ XRV_MEASUREMENTFAIL8
Definition: xsens_std.h:101
XRV_MEASUREMENTFAIL3
@ XRV_MEASUREMENTFAIL3
Definition: xsens_std.h:74
XRV_INITBUSFAIL3
@ XRV_INITBUSFAIL3
Definition: xsens_std.h:57
XRV_NOFILEORPORTOPEN
@ XRV_NOFILEORPORTOPEN
Definition: xsens_std.h:207
XRV_INVALIDMSG
@ XRV_INVALIDMSG
Definition: xsens_std.h:48
XRV_TIMEOUT
@ XRV_TIMEOUT
Definition: xsens_std.h:112
XRV_OUTPUTCANNOTBEOPENED
@ XRV_OUTPUTCANNOTBEOPENED
Definition: xsens_std.h:142
XRV_NOTIMPLEMENTED
@ XRV_NOTIMPLEMENTED
Definition: xsens_std.h:109
XRV_OK
@ XRV_OK
Operation was performed successfully.
Definition: xsens_std.h:34
XRV_TIMEROVERFLOW
@ XRV_TIMEROVERFLOW
Definition: xsens_std.h:86
XRV_ENDOFFILE
@ XRV_ENDOFFILE
Definition: xsens_std.h:148
XRV_TIMEOUTNODATA
@ XRV_TIMEOUTNODATA
Definition: xsens_std.h:115
XRV_PORTNOTFOUND
@ XRV_PORTNOTFOUND
Definition: xsens_std.h:210
XRV_NOXMFOUND
@ XRV_NOXMFOUND
Definition: xsens_std.h:179
XRV_OUTOFMEMORY
@ XRV_OUTOFMEMORY
Definition: xsens_std.h:121
XRV_ALREADYDONE
@ XRV_ALREADYDONE
Definition: xsens_std.h:223
XRV_COULDNOTREADSETTINGS
@ XRV_COULDNOTREADSETTINGS
Definition: xsens_std.h:151
XRV_INPUTCANNOTBEOPENED
@ XRV_INPUTCANNOTBEOPENED
Definition: xsens_std.h:139
XRV_NOPORTOPEN
@ XRV_NOPORTOPEN
Definition: xsens_std.h:204
XRV_NODATA
@ XRV_NODATA
Definition: xsens_std.h:154
XRV_INSUFFICIENTSPACE
@ XRV_INSUFFICIENTSPACE
Definition: xsens_std.h:136
XRV_INVALIDOPERATION
@ XRV_INVALIDOPERATION
Definition: xsens_std.h:133
XRV_CHECKSUMFAULT
@ XRV_CHECKSUMFAULT
Definition: xsens_std.h:118
XRV_BAUDRATEINVALID
@ XRV_BAUDRATEINVALID
Definition: xsens_std.h:89
XRV_INVALIDPERIOD
@ XRV_INVALIDPERIOD
Definition: xsens_std.h:45
XRV_INVALIDID
@ XRV_INVALIDID
Definition: xsens_std.h:130
xsensResultText
const char * xsensResultText(const XsensResultValue result)
Definition: xsens_std.cpp:13
XRV_SYNC_NO_SYNC
@ XRV_SYNC_NO_SYNC
Definition: xsens_std.h:233
XRV_INITBUSFAIL2
@ XRV_INITBUSFAIL2
Definition: xsens_std.h:54
XRV_DATACORRUPT
@ XRV_DATACORRUPT
Definition: xsens_std.h:172
XRV_BUSNOTREADY
@ XRV_BUSNOTREADY
Definition: xsens_std.h:42
XRV_VERSION_PROBLEM
@ XRV_VERSION_PROBLEM
Definition: xsens_std.h:247
XRV_SYNC_SINGLE_SLAVE
@ XRV_SYNC_SINGLE_SLAVE
Definition: xsens_std.h:227
XRV_READONLY
@ XRV_READONLY
Definition: xsens_std.h:157
XRV_NOTFOUND
@ XRV_NOTFOUND
Definition: xsens_std.h:124
XRV_MEASUREMENTFAIL7
@ XRV_MEASUREMENTFAIL7
Definition: xsens_std.h:98
XRV_SYNC_SECOND_MASTER
@ XRV_SYNC_SECOND_MASTER
Definition: xsens_std.h:230
XRV_INSUFFICIENTDATA
@ XRV_INSUFFICIENTDATA
Definition: xsens_std.h:163
XRV_READINITFAILED
@ XRV_READINITFAILED
Definition: xsens_std.h:176
XRV_INITFUSIONFAILED
@ XRV_INITFUSIONFAILED
Definition: xsens_std.h:194
XRV_MEASUREMENTFAIL2
@ XRV_MEASUREMENTFAIL2
Definition: xsens_std.h:70
XRV_CONFIGCHECKFAIL
@ XRV_CONFIGCHECKFAIL
Definition: xsens_std.h:220
xsens_std.h
XRV_MEASUREMENTFAIL4
@ XRV_MEASUREMENTFAIL4
Definition: xsens_std.h:77
XRV_ERROR
@ XRV_ERROR
Definition: xsens_std.h:106
XRV_BUSY
@ XRV_BUSY
Definition: xsens_std.h:166
XRV_INITPORTFAILED
@ XRV_INITPORTFAILED
Definition: xsens_std.h:213
XRV_MEASUREMENTFAIL5
@ XRV_MEASUREMENTFAIL5
Definition: xsens_std.h:80
XRV_INVALIDPARAM
@ XRV_INVALIDPARAM
Definition: xsens_std.h:95
XRV_MEASUREMENTFAIL6
@ XRV_MEASUREMENTFAIL6
Definition: xsens_std.h:83
XRV_MEASUREMENTFAIL1
@ XRV_MEASUREMENTFAIL1
Definition: xsens_std.h:67
XRV_INSUFFICIENTMTS
@ XRV_INSUFFICIENTMTS
Definition: xsens_std.h:191
XRV_ALREADYOPEN
@ XRV_ALREADYOPEN
Definition: xsens_std.h:145
XsensResultValue
XsensResultValue
Xsens return values.
Definition: xsens_std.h:31
XRV_INVALIDINSTANCE
@ XRV_INVALIDINSTANCE
Definition: xsens_std.h:169
XRV_UNEXPECTEDMSG
@ XRV_UNEXPECTEDMSG
Definition: xsens_std.h:127
XRV_NULLPTR
@ XRV_NULLPTR
Definition: xsens_std.h:160
XRV_OTHER
@ XRV_OTHER
Definition: xsens_std.h:197
XRV_INITBUSFAIL1
@ XRV_INITBUSFAIL1
Definition: xsens_std.h:51
XRV_CALIBRATIONFAILED
@ XRV_CALIBRATIONFAILED
Definition: xsens_std.h:216
XRV_MTLOCATIONINVALID
@ XRV_MTLOCATIONINVALID
Definition: xsens_std.h:188
XRV_SETBIDFAIL2
@ XRV_SETBIDFAIL2
Definition: xsens_std.h:63



Page generated by Doxygen 1.8.17 for MRPT 1.9.9 Git: ad3a9d8ae Tue May 1 23:10:22 2018 -0700 at miƩ 12 jul 2023 10:03:34 CEST