Main MRPT website > C++ reference for MRPT 1.5.7
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: return "No error";
18  case XRV_NOBUS: return "Bus has no power";
19  case XRV_BUSNOTREADY: return "Bus not ready for measurement";
20  case XRV_INVALIDPERIOD: return "Period is invalid";
21  case XRV_INVALIDMSG: return "Message is invalid";
22  case XRV_INITBUSFAIL1: return "A slave did not respond to WaitForSetBID";
23  case XRV_INITBUSFAIL2: return "An incorrect answer received after WaitForSetBID";
24  case XRV_INITBUSFAIL3: return "After four bus-scans still undetected Motion Trackers";
25  case XRV_SETBIDFAIL1: return "No reply to SetBID message during SetBID procedure";
26  case XRV_SETBIDFAIL2: return "Other than SetBIDAck received";
27  case XRV_MEASUREMENTFAIL1: return "Timer overflow - period too short to collect all data from Motion Trackers";
28  case XRV_MEASUREMENTFAIL2: return "Motion Tracker responds with other than SlaveData message";
29  case XRV_MEASUREMENTFAIL3: return "Total bytes of data of Motion Trackers incl sample counter exceeds 255 bytes";
30  case XRV_MEASUREMENTFAIL4: return "Timer overflow during measurement: MT does not respond within measurement period. Increase period (lower sample frequency)";
31  case XRV_MEASUREMENTFAIL5: return "Timer overflow during measurement: MT response was not received within measurement period. Increase period (lower sample frequency) or use fewer Motion Trackers";
32  case XRV_MEASUREMENTFAIL6: return "No correct response from Motion Tracker during measurement";
33  case XRV_TIMEROVERFLOW: return "Timer overflow during measurement";
34  case XRV_BAUDRATEINVALID: return "Baudrate does not comply with valid range";
35  case XRV_INVALIDPARAM: return "Invalid parameter supplied";
36  case XRV_MEASUREMENTFAIL7: return "TX PC Buffer is full";
37  case XRV_MEASUREMENTFAIL8: return "TX PC Buffer overflow, cannot fit full message";
38  case XRV_CONFIGCHECKFAIL: return "Failure during device configuration";
39  case XRV_ERROR: return "Generic error";
40  case XRV_NOTIMPLEMENTED: return "Operation not implemented";
41  case XRV_TIMEOUT: return "Timeout occurred, some data received";
42  case XRV_TIMEOUTNODATA: return "Timeout occurred, no data was received";
43  case XRV_CHECKSUMFAULT: return "Checksum fault";
44  case XRV_OUTOFMEMORY: return "Out of memory";
45  case XRV_NOTFOUND: return "Requested item was not found";
46  case XRV_UNEXPECTEDMSG: return "Unexpected message received";
47  case XRV_INVALIDID: return "Invalid id supplied";
48  case XRV_INVALIDOPERATION: return "Invalid operation";
49  case XRV_INSUFFICIENTSPACE: return "Insufficient buffer space available";
50  case XRV_INPUTCANNOTBEOPENED: return "Could not open input device";
51  case XRV_OUTPUTCANNOTBEOPENED: return "Could not open output device";
52  case XRV_ALREADYOPEN: return "A device is already open";
53  case XRV_ENDOFFILE: return "End of file reached";
54  case XRV_COULDNOTREADSETTINGS: return "A required settings file could not be opened or is missing some data";
55  case XRV_NODATA: return "No data available";
56  case XRV_READONLY: return "Tried to change a read-only value";
57  case XRV_NULLPTR: return "Invalid NULL pointer supplied";
58  case XRV_INSUFFICIENTDATA: return "Insufficient data supplied";
59  case XRV_BUSY: return "Busy processing, try again later";
60  case XRV_INVALIDINSTANCE: return "Invalid instance called";
61  case XRV_DATACORRUPT: return "Data-source corrupt";
62  case XRV_READINITFAILED: return "Failure during reading of settings. File may be old or corrupt.";
63  case XRV_NOXMFOUND: return "Could not find any Moven-compatible hardware, check connections and Xbus Master LEDs";
64  case XRV_ONLYONEXMFOUND: return "Found only one responding Xbus Master, check connections and Xbus Master LEDs";
65  case XRV_MTCOUNTZERO: return "No sensors found, check cables";
66  case XRV_MTLOCATIONINVALID: return "One or more sensors are not where they were expected, check locations";
67  case XRV_INSUFFICIENTMTS: return "Not enough sensors were found, check cables";
68  case XRV_INITFUSIONFAILED: return "Failure during initialization of Fusion Engine. Source file may be old or corrupt.";
69  case XRV_OTHER: return "Something else was received than was requested";
70  case XRV_NOFILEOPEN: return "No file open";
71  case XRV_NOPORTOPEN: return "No serial port open";
72  case XRV_NOFILEORPORTOPEN: return "No file or serial port open";
73  case XRV_PORTNOTFOUND: return "A required port could not be found";
74  case XRV_INITPORTFAILED: return "The low-level port handler failed to initialize";
75  case XRV_CALIBRATIONFAILED: return "A calibration routine failed";
76  case XRV_ALREADYDONE: return "This once only operation has already been performed";
77 
78  case XRV_SYNC_SINGLE_SLAVE: return "The single connected device is configured as a slave";
79  case XRV_SYNC_SECOND_MASTER: return "More than one master was detected";
80  case XRV_SYNC_NO_SYNC: return "A device was detected that was neither master nor slave";
81  case XRV_SYNC_NO_MASTER: return "No master detected";
82  case XRV_SYNC_DATA_MISSING: return "A device is not sending enough data, check synchronization cables";
83 
84  case XRV_VERSION_TOO_LOW: return "The version of the object is too low for the requested operation";
85  case XRV_VERSION_PROBLEM: return "The object has an unrecognized version, so it's not safe to perform the operation";
86 
87  default: return "!!Undefined Result Value!!";
88  }
89 }
Operation was performed successfully.
Definition: xsens_std.h:32
A calibration routine failed.
Definition: xsens_std.h:96
A slave did not respond to WaitForSetBID.
Definition: xsens_std.h:39
No bus communication possible.
Definition: xsens_std.h:35
Found only one responding Xbus Master.
Definition: xsens_std.h:84
No sensors found.
Definition: xsens_std.h:85
Other than SetBIDAck received.
Definition: xsens_std.h:43
A timeout occurred.
Definition: xsens_std.h:60
TX PC Buffer overflow, cannot fit full message.
Definition: xsens_std.h:55
Operation aborted because of no data read.
Definition: xsens_std.h:61
One or more sensors are not where they were expected.
Definition: xsens_std.h:86
Operation not implemented in this version (yet)
Definition: xsens_std.h:59
No reply to SetBID message during SetBID procedure.
Definition: xsens_std.h:42
A device is not sending enough data.
Definition: xsens_std.h:105
The specified i/o device can not be opened.
Definition: xsens_std.h:69
The specified i/o device can not be opened.
Definition: xsens_std.h:70
After four bus-scans still undetected Motion Trackers.
Definition: xsens_std.h:41
A required port could not be found.
Definition: xsens_std.h:94
Operation is invalid at this point.
Definition: xsens_std.h:67
Could not find any Moven-compatible hardware.
Definition: xsens_std.h:83
Timer overflows during measurement.
Definition: xsens_std.h:50
No internal memory available.
Definition: xsens_std.h:63
Insufficient buffer space available.
Definition: xsens_std.h:68
End of file is reached.
Definition: xsens_std.h:72
An incorrect answer received after WaitForSetBID.
Definition: xsens_std.h:40
InitBus and/or SetBID are not issued.
Definition: xsens_std.h:36
Tried to change a read-only value.
Definition: xsens_std.h:75
A required settings file could not be opened or is missing some data.
Definition: xsens_std.h:73
Invalid id supplied.
Definition: xsens_std.h:66
Checksum fault occured.
Definition: xsens_std.h:62
The operation is once only and has already been performed.
Definition: xsens_std.h:99
No serial port opened for reading/writing.
Definition: xsens_std.h:92
Baud rate does not comply with valid range.
Definition: xsens_std.h:51
A trusted data stream proves to contain corrupted data.
Definition: xsens_std.h:80
No data is available.
Definition: xsens_std.h:74
XsensResultValue
Xsens return values.
Definition: xsens_std.h:30
Motion Tracker responds with other than SlaveData message.
Definition: xsens_std.h:45
The requested item was not found.
Definition: xsens_std.h:64
Failure during read of settings.
Definition: xsens_std.h:82
The in-config check of the device failed.
Definition: xsens_std.h:98
Period sent is invalid.
Definition: xsens_std.h:37
The single connected device is configured as a slave.
Definition: xsens_std.h:101
More than one master was detected.
Definition: xsens_std.h:102
Insufficient data was supplied to a function.
Definition: xsens_std.h:77
A device was detected that was neither master nor slave.
Definition: xsens_std.h:103
The object has an unrecognized version, so it's not safe to perform the operation.
Definition: xsens_std.h:108
Failure during initialization of Fusion Engine.
Definition: xsens_std.h:88
Timer overflows during measurement.
Definition: xsens_std.h:48
The low-level port handler failed to initialize.
Definition: xsens_std.h:95
Invalid instance called.
Definition: xsens_std.h:79
An invalid parameter is supplied.
Definition: xsens_std.h:53
TX PC Buffer is full.
Definition: xsens_std.h:54
Timer overflows during measurement.
Definition: xsens_std.h:47
Tried to supply a NULL value where it is not allowed.
Definition: xsens_std.h:76
const char * xsensResultText(const XsensResultValue result)
Definition: xsens_std.cpp:13
Something else was received than was requested.
Definition: xsens_std.h:89
No correct response from Motion Tracker during measurement.
Definition: xsens_std.h:49
A generic error occurred.
Definition: xsens_std.h:58
The version of the object is too low for the requested operation.
Definition: xsens_std.h:107
Not enough sensors were found.
Definition: xsens_std.h:87
Timer overflow - period too short to collect all data from Motion Trackers.
Definition: xsens_std.h:44
Unexpected message received (e.g. no acknowledge message received)
Definition: xsens_std.h:65
An I/O device is already opened with this object.
Definition: xsens_std.h:71
Busy processing, try again later.
Definition: xsens_std.h:78
No master detected.
Definition: xsens_std.h:104
No file opened for reading/writing.
Definition: xsens_std.h:91
Total bytes of data of Motion Trackers including sample counter exceeds 255 bytes.
Definition: xsens_std.h:46
The message is invalid or not implemented.
Definition: xsens_std.h:38
No file or serial port opened for reading/writing.
Definition: xsens_std.h:93



Page generated by Doxygen 1.8.14 for MRPT 1.5.7 Git: 8277875f6 Mon Jun 11 02:47:32 2018 +0200 at lun oct 28 01:50:49 CET 2019