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 }
Operation was performed successfully.
Definition: xsens_std.h:34
XsensResultValue
Xsens return values.
Definition: xsens_std.h:31
const char * xsensResultText(const XsensResultValue result)
Definition: xsens_std.cpp:13



Page generated by Doxygen 1.8.14 for MRPT 1.9.9 Git: 7d5e6d718 Fri Aug 24 01:51:28 2018 +0200 at lun nov 2 08:35:50 CET 2020