xsdevicecapabilities.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 XSDEVICECAPABILITIES_H
66 #define XSDEVICECAPABILITIES_H
67 
68 #include "xstypesconfig.h"
69 
70 #ifdef __cplusplus
71 extern "C" {
72 #endif
73 
79 {
80  XDC_Invalid = 0x00000000,
81  XDC_Acc = 0x00000001,
82  XDC_Gyr = 0x00000002,
83  XDC_Mag = 0x00000004,
84  XDC_Baro = 0x00000008,
85  XDC_Gnss = 0x00000010,
86  XDC_Imu = 0x00000020,
87  XDC_Vru = 0x00000040,
88  XDC_Ahrs = 0x00000080,
89  XDC_GnssIns = 0x00000100,
90  XDC_Rtk = 0x00000200,
91 };
95 
97 
109 
110 #ifdef __cplusplus
111 }
112 #endif
113 
115 {
116 #ifdef __cplusplus
117 public:
119  inline explicit XsDeviceCapabilities(uint32_t flags = XDC_Invalid)
120  : m_flags(flags)
121  {
122  }
123 
125  inline XsDeviceCapabilities(const XsDeviceCapabilities& other)
126  : m_flags(other.m_flags)
127  {
128  }
129 
131  inline const XsDeviceCapabilities& operator=(const XsDeviceCapabilities& other)
132  {
133  m_flags = other.m_flags;
134  return *this;
135  }
136 
138  inline bool hasAccelerometer() const
139  {
140  return XsDeviceCapabilities_hasAccelerometer(this) != 0;
141  }
142 
144  inline bool hasGyroscope() const
145  {
146  return XsDeviceCapabilities_hasGyroscope(this) != 0;
147  }
148 
150  inline bool hasMagnetometer() const
151  {
152  return XsDeviceCapabilities_hasMagnetometer(this) != 0;
153  }
154 
156  inline bool hasBarometer() const
157  {
158  return XsDeviceCapabilities_hasBarometer(this) != 0;
159  }
160 
162  inline bool hasGnss() const
163  {
164  return XsDeviceCapabilities_hasGnss(this) != 0;
165  }
166 
168  inline bool isImu() const
169  {
170  return XsDeviceCapabilities_isImu(this) != 0;
171  }
172 
174  inline bool isVru() const
175  {
176  return XsDeviceCapabilities_isVru(this) != 0;
177  }
178 
180  inline bool isAhrs() const
181  {
182  return XsDeviceCapabilities_isAhrs(this) != 0;
183  }
184 
186  inline bool isGnssIns() const
187  {
188  return XsDeviceCapabilities_isGnssIns(this) != 0;
189  }
191  inline bool isRtk() const
192  {
193  return XsDeviceCapabilities_isRtk(this) != 0;
194  }
195 private:
196 #endif
197 
199 };
200 
202 
203 #endif
XsDeviceCapabilities_isRtk
XSTYPES_DLL_API int XsDeviceCapabilities_isRtk(const struct XsDeviceCapabilities *thisPtr)
Test if the device is an RTK device.
Definition: xsdevicecapabilities.c:158
XsDeviceCapabilities_isImu
XSTYPES_DLL_API int XsDeviceCapabilities_isImu(const struct XsDeviceCapabilities *thisPtr)
Test if the device is an IMU.
Definition: xsdevicecapabilities.c:126
XsDeviceCapabilities::m_flags
uint32_t m_flags
Definition: xsdevicecapabilities.h:198
XDC_Baro
@ XDC_Baro
Device has an operational barometer.
Definition: xsdevicecapabilities.h:84
XsDeviceCapabilities_hasMagnetometer
XSTYPES_DLL_API int XsDeviceCapabilities_hasMagnetometer(const struct XsDeviceCapabilities *thisPtr)
Test if the device has an operational magnetometer.
Definition: xsdevicecapabilities.c:102
XDC_Rtk
@ XDC_Rtk
Device has RTK features.
Definition: xsdevicecapabilities.h:90
XsDeviceCapabilities
Describes what a device is capable of.
Definition: xsdevicecapabilities.h:114
XsDeviceCapabilities_isVru
XSTYPES_DLL_API int XsDeviceCapabilities_isVru(const struct XsDeviceCapabilities *thisPtr)
Test if the device has a VRU.
Definition: xsdevicecapabilities.c:134
XsDeviceCapabilities_isGnssIns
XSTYPES_DLL_API int XsDeviceCapabilities_isGnssIns(const struct XsDeviceCapabilities *thisPtr)
Test if the device is a GNSS/INS.
Definition: xsdevicecapabilities.c:150
XDC_Vru
@ XDC_Vru
Device is a VRU.
Definition: xsdevicecapabilities.h:87
XsDeviceCapabilities_isValid
XSTYPES_DLL_API int XsDeviceCapabilities_isValid(const struct XsDeviceCapabilities *thisPtr)
Test if the given XsDeviceCapabilities is valid.
Definition: xsdevicecapabilities.c:78
XDC_Gnss
@ XDC_Gnss
Device has an operational GNSS receiver.
Definition: xsdevicecapabilities.h:85
uint32_t
unsigned int uint32_t
Definition: pstdint.h:485
XsDeviceCapabilities_isAhrs
XSTYPES_DLL_API int XsDeviceCapabilities_isAhrs(const struct XsDeviceCapabilities *thisPtr)
Test if the device has an AHRS.
Definition: xsdevicecapabilities.c:142
XDC_Imu
@ XDC_Imu
Device is an IMU.
Definition: xsdevicecapabilities.h:86
XsDeviceCapability
XsDeviceCapability
Device capability flags.
Definition: xsdevicecapabilities.h:78
XsDeviceCapabilities_hasGnss
XSTYPES_DLL_API int XsDeviceCapabilities_hasGnss(const struct XsDeviceCapabilities *thisPtr)
Test if the device has an operational GNSS receiver.
Definition: xsdevicecapabilities.c:118
XDC_GnssIns
@ XDC_GnssIns
Device is a GNSS/INS.
Definition: xsdevicecapabilities.h:89
XDC_Acc
@ XDC_Acc
Device has an operational accelerometer.
Definition: xsdevicecapabilities.h:81
XsDeviceCapabilities_hasBarometer
XSTYPES_DLL_API int XsDeviceCapabilities_hasBarometer(const struct XsDeviceCapabilities *thisPtr)
Test if the device has an operational barometer.
Definition: xsdevicecapabilities.c:110
xstypesconfig.h
XDC_Gyr
@ XDC_Gyr
Device has an operational gyroscope.
Definition: xsdevicecapabilities.h:82
XDC_Invalid
@ XDC_Invalid
Indicates the XsDeviceCapabilities structure is invalid.
Definition: xsdevicecapabilities.h:80
XSTYPES_DLL_API
#define XSTYPES_DLL_API
Definition: xstypesconfig.h:65
XsDeviceCapabilities_hasAccelerometer
XSTYPES_DLL_API int XsDeviceCapabilities_hasAccelerometer(const struct XsDeviceCapabilities *thisPtr)
Test if the device has an operational accelerometer.
Definition: xsdevicecapabilities.c:86
XDC_Mag
@ XDC_Mag
Device has an operational magnetometer.
Definition: xsdevicecapabilities.h:83
XsDeviceCapabilities_hasGyroscope
XSTYPES_DLL_API int XsDeviceCapabilities_hasGyroscope(const struct XsDeviceCapabilities *thisPtr)
Test if the device has an operational gyroscope.
Definition: xsdevicecapabilities.c:94
XDC_Ahrs
@ XDC_Ahrs
Device is an AHRS.
Definition: xsdevicecapabilities.h:88
XsDeviceCapabilities
struct XsDeviceCapabilities XsDeviceCapabilities
Definition: xsdevicecapabilities.h:201


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