xsoption.h
Go to the documentation of this file.
1 
2 // Copyright (c) 2003-2021 Xsens Technologies B.V. or subsidiaries worldwide.
3 // All rights reserved.
4 //
5 // Redistribution and use in source and binary forms, with or without modification,
6 // are permitted provided that the following conditions are met:
7 //
8 // 1. Redistributions of source code must retain the above copyright notice,
9 // this list of conditions, and the following disclaimer.
10 //
11 // 2. Redistributions in binary form must reproduce the above copyright notice,
12 // this list of conditions, and the following disclaimer in the documentation
13 // and/or other materials provided with the distribution.
14 //
15 // 3. Neither the names of the copyright holders nor the names of their contributors
16 // may be used to endorse or promote products derived from this software without
17 // specific prior written permission.
18 //
19 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
20 // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
21 // MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
22 // THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23 // SPECIAL, EXEMPLARY OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
24 // OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
25 // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY OR
26 // TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
27 // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.THE LAWS OF THE NETHERLANDS
28 // SHALL BE EXCLUSIVELY APPLICABLE AND ANY DISPUTES SHALL BE FINALLY SETTLED UNDER THE RULES
29 // OF ARBITRATION OF THE INTERNATIONAL CHAMBER OF COMMERCE IN THE HAGUE BY ONE OR MORE
30 // ARBITRATORS APPOINTED IN ACCORDANCE WITH SAID RULES.
31 //
32 
33 
34 // Copyright (c) 2003-2021 Xsens Technologies B.V. or subsidiaries worldwide.
35 // All rights reserved.
36 //
37 // Redistribution and use in source and binary forms, with or without modification,
38 // are permitted provided that the following conditions are met:
39 //
40 // 1. Redistributions of source code must retain the above copyright notice,
41 // this list of conditions, and the following disclaimer.
42 //
43 // 2. Redistributions in binary form must reproduce the above copyright notice,
44 // this list of conditions, and the following disclaimer in the documentation
45 // and/or other materials provided with the distribution.
46 //
47 // 3. Neither the names of the copyright holders nor the names of their contributors
48 // may be used to endorse or promote products derived from this software without
49 // specific prior written permission.
50 //
51 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
52 // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
53 // MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
54 // THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
55 // SPECIAL, EXEMPLARY OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
56 // OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
57 // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY OR
58 // TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
59 // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.THE LAWS OF THE NETHERLANDS
60 // SHALL BE EXCLUSIVELY APPLICABLE AND ANY DISPUTES SHALL BE FINALLY SETTLED UNDER THE RULES
61 // OF ARBITRATION OF THE INTERNATIONAL CHAMBER OF COMMERCE IN THE HAGUE BY ONE OR MORE
62 // ARBITRATORS APPOINTED IN ACCORDANCE WITH SAID RULES.
63 //
64 
65 #ifndef XSOPTION_H
66 #define XSOPTION_H
67 
75 //AUTO namespace xstypes {
77 {
78  XSO_None = 0
79  , XSO_Calibrate = 0x0001
80  , XSO_Orientation = 0x0002
81 
83  , XSO_RetainLiveData = 0x0008
87 
89 
93  , XSO_Reserved = 0x8000
94 };
95 #define XSO_All ((XsOption)0xFFFF)
96 
97 
98 typedef enum XsOption XsOption;
99 
100 //AUTO }
101 
102 #ifdef __cplusplus
105 {
106  return (XsOption)((int)a | (int)b);
107 }
110 {
111  return (XsOption)((int)a & (int)b);
112 }
114 inline XsOption operator ^ (XsOption a, XsOption b)
115 {
116  return (XsOption)((int)a ^ (int)b);
117 }
119 inline XsOption operator ~(XsOption a)
120 {
121  return (XsOption)(~(int)a);
122 }
124 inline XsOption XsOption_purify(XsOption a)
125 {
126  if ((a & XSO_RetainLiveData) && (a & XSO_RetainBufferedData))
127  a = a & ~XSO_RetainLiveData;
128 
129  return a;
130 }
131 #endif
132 
133 #endif
operator|
SerialInterface::PortOptions operator|(SerialInterface::PortOptions lhs, SerialInterface::PortOptions rhs)
Logical or operator for flow controls.
Definition: serialinterface.cpp:873
XSO_Calibrate
@ XSO_Calibrate
Compute calibrated inertial data from raw data and temperature.
Definition: xsoption.h:79
XSO_Orientation
@ XSO_Orientation
Compute orientation, the orientation is typically only computed in one stream. If not specified the s...
Definition: xsoption.h:80
XSO_OrientationInLiveStream
@ XSO_OrientationInLiveStream
Compute orientation in the live stream. This is no longer (since version 4.9.2) mutually exclusive wi...
Definition: xsoption.h:85
operator~
SerialInterface::PortOptions operator~(SerialInterface::PortOptions lhs)
Logical inversion operator for flow controls.
Definition: serialinterface.cpp:885
operator&
SerialInterface::PortOptions operator&(SerialInterface::PortOptions lhs, SerialInterface::PortOptions rhs)
Logical and operator for flow controls.
Definition: serialinterface.cpp:879
XSO_ApplyOrientationResetToCalData
@ XSO_ApplyOrientationResetToCalData
Apply orientation reset to calibrated acc, gyr and mag (object reset only) and heading reset to free ...
Definition: xsoption.h:88
XsOption
XsOption
Xda options, used to control the kind of data processing done by XDA.
Definition: xsoption.h:76
XSO_InterpolateMissingData
@ XSO_InterpolateMissingData
When set, any gaps in the data streams of child devices will be filled with interpolated data....
Definition: xsoption.h:90
XSO_OrientationInBufferedStream
@ XSO_OrientationInBufferedStream
Compute orientation in the buffered stream. This is no longer (since version 4.9.2) mutually exclusiv...
Definition: xsoption.h:86
XSO_RetainLiveData
@ XSO_RetainLiveData
Keep the live data in a cache so it can be accessed through XsDevice::getDataPacketByIndex or XsDevic...
Definition: xsoption.h:83
XSO_Reserved
@ XSO_Reserved
Reserved for internal use.
Definition: xsoption.h:93
XSO_KeepLastLiveData
@ XSO_KeepLastLiveData
Keep the last available live data in a cache so XsDevice::lastAvailableLiveData will work.
Definition: xsoption.h:82
XSO_RetainBufferedData
@ XSO_RetainBufferedData
Keep the buffered data in a cache so it can be accessed through XsDevice::getDataPacketByIndex or XsD...
Definition: xsoption.h:84
XSO_SkipDataBundling
@ XSO_SkipDataBundling
When set, the onAll...DataAvailable callbacks will not be called by the master device....
Definition: xsoption.h:91
XSO_ExpectNoRetransmissionsInFile
@ XSO_ExpectNoRetransmissionsInFile
When set and reading a file, missing data is immediately treated as unavailable. The default behaviou...
Definition: xsoption.h:92
XSO_None
@ XSO_None
No option.
Definition: xsoption.h:78


xsens_mti_driver
Author(s):
autogenerated on Sun Sep 3 2023 02:43:20