Debian Codegraph @

3rdparty/xspublic/xstypes/xsdataidentifier.h

raw
1
2 // Copyright (c) 2003-2019 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 #ifndef XSDATAIDENTIFIER_H
34 #define XSDATAIDENTIFIER_H
35
36 //////////////////////////////////////////////////////////////////////////////////////////
37 /*! \addtogroup enums Global enumerations
38 @{
39 */
40
41 //AUTO namespace xstypes {
42 /*! \enum XsDataIdentifier
43 \brief Defines the data identifiers
44
45 The list of standard data identifiers is shown below.
46 The last positions in the data identifier depends on the configuration of the data.
47 For example 0x4020 is 3D acceleration in single precision float format,
48 where 0x4022 is 3D acceleration in fixed point 16.32 format.
49
50 Refer to the Low Level Communication Protocol for more details.
51 */
52 enum XsDataIdentifier
53 {
54 XDI_None = 0x0000, //!< Empty datatype
55 XDI_TypeMask = 0xFE00, //!< Mask for checking the group which a dataidentifier belongs to, Eg. XDI_TimestampGroup or XDI_OrientationGroup
56 XDI_FullTypeMask = 0xFFF0, //!< Mask to get the type of data, without the data format
57 XDI_FullMask = 0xFFFF, //!< Complete mask to get entire data identifier
58 XDI_FormatMask = 0x01FF, //!< Mask for getting the data id without checking the group
59 XDI_DataFormatMask = 0x000F, //!< Mask for extracting just the data format /sa XDI_SubFormat
60
61 XDI_SubFormatMask = 0x0003, //!< Determines, float, fp12.20, fp16.32, double output... (where applicable)
62 XDI_SubFormatFloat = 0x0000, //!< Floating point format
63 XDI_SubFormatFp1220 = 0x0001, //!< Fixed point 12.20
64 XDI_SubFormatFp1632 = 0x0002, //!< Fixed point 16.32
65 XDI_SubFormatDouble = 0x0003, //!< Double format
66
67 XDI_TemperatureGroup = 0x0800, //!< Group for temperature outputs
68 XDI_Temperature = 0x0810, //!< Temperature
69
70 XDI_TimestampGroup = 0x1000, //!< Group for time stamp related outputs
71 XDI_UtcTime = 0x1010, //!< Utc time from the GNSS receiver
72 XDI_PacketCounter = 0x1020, //!< Packet counter, increments every packet
73 XDI_Itow = 0x1030, //!< Itow. Time Of Week from the GNSS receiver
74 XDI_GnssAge = 0x1040, //!< Gnss age from the GNSS receiver
75 XDI_PressureAge = 0x1050, //!< Age of a pressure sample, in packet counts
76 XDI_SampleTimeFine = 0x1060, //!< Sample Time Fine
77 XDI_SampleTimeCoarse = 0x1070, //!< Sample Time Coarse
78 XDI_FrameRange = 0x1080, //!< Reserved \internal add for MTw (if needed)
79 XDI_PacketCounter8 = 0x1090, //!< 8 bit packet counter, wraps at 256
80 XDI_SampleTime64 = 0x10A0, //!< 64 bit sample time
81
82 XDI_OrientationGroup = 0x2000, //!< Group for orientation related outputs
83 XDI_CoordSysMask = 0x000C, //!< Mask for the coordinate system part of the orientation data identifier
84 XDI_CoordSysEnu = 0x0000, //!< East North Up orientation output
85 XDI_CoordSysNed = 0x0004, //!< North East Down orientation output
86 XDI_CoordSysNwu = 0x0008, //!< North West Up orientation output
87 XDI_Quaternion = 0x2010, //!< Orientation in quaternion format
88 XDI_RotationMatrix = 0x2020, //!< Orientation in rotation matrix format
89 XDI_EulerAngles = 0x2030, //!< Orientation in euler angles format
90
91 XDI_PressureGroup = 0x3000, //!< Group for pressure related outputs
92 XDI_BaroPressure = 0x3010, //!< Pressure output recorded from the barometer
93
94 XDI_AccelerationGroup = 0x4000, //!< Group for acceleration related outputs
95 XDI_DeltaV = 0x4010, //!< DeltaV SDI data output
96 XDI_Acceleration = 0x4020, //!< Acceleration output in m/s2
97 XDI_FreeAcceleration = 0x4030, //!< Free acceleration output in m/s2
98 XDI_AccelerationHR = 0x4040, //!< AccelerationHR output
99
100 XDI_PositionGroup = 0x5000, //!< Group for position related outputs
101 XDI_AltitudeMsl = 0x5010, //!< Altitude at Mean Sea Level
102 XDI_AltitudeEllipsoid = 0x5020, //!< Altitude at ellipsoid
103 XDI_PositionEcef = 0x5030, //!< Position in earth-centered, earth-fixed format
104 XDI_LatLon = 0x5040, //!< Position in latitude, longitude
105
106 XDI_SnapshotGroup = 0xC800, //!< Group for snapshot related outputs
107 XDI_RetransmissionMask = 0x0001, //!< Mask for the retransmission bit in the snapshot data
108 XDI_RetransmissionFlag = 0x0001, //!< Bit indicating if the snapshot if from a retransmission
109 XDI_AwindaSnapshot = 0xC810, //!< Awinda type snapshot
110 XDI_FullSnapshot = 0xC820, //!< Full snapshot
111 XDI_GloveSnapshot = 0xC830, //!< Glove Snapshot
112 XDI_GloveData = 0xC840, //!< Glove Data
113
114 XDI_GnssGroup = 0x7000, //!< Group for Gnss related outputs
115 XDI_GnssPvtData = 0x7010, //!< Gnss position, velocity and time data
116 XDI_GnssSatInfo = 0x7020, //!< Gnss satellite information
117
118 XDI_AngularVelocityGroup = 0x8000, //!< Group for angular velocity related outputs
119 XDI_RateOfTurn = 0x8020, //!< Rate of turn data in rad/sec
120 XDI_DeltaQ = 0x8030, //!< DeltaQ SDI data
121 XDI_RateOfTurnHR = 0x8040, //!< Rate of turn HR data
122
123 XDI_RawSensorGroup = 0xA000, //!< Group for raw sensor data related outputs
124 XDI_RawUnsigned = 0x0000, //!< Tracker produces unsigned raw values, usually fixed behavior
125 XDI_RawSigned = 0x0001, //!< Tracker produces signed raw values, usually fixed behavior
126 XDI_RawAccGyrMagTemp = 0xA010, //!< Raw acceleration, gyroscope, magnetometer and temperature data
127 XDI_RawGyroTemp = 0xA020, //!< Raw gyroscope and temperature data
128 XDI_RawAcc = 0xA030, //!< Raw acceleration data
129 XDI_RawGyr = 0xA040, //!< Raw gyroscope data
130 XDI_RawMag = 0xA050, //!< Raw magnetometer data
131 XDI_RawDeltaQ = 0xA060, //!< Raw deltaQ SDI data
132 XDI_RawDeltaV = 0xA070, //!< Raw deltaV SDI data
133 XDI_RawBlob = 0xA080, //!< Raw blob data
134
135 XDI_AnalogInGroup = 0xB000, //!< Group for analog in related outputs
136 XDI_AnalogIn1 = 0xB010, //!< Data containing adc data from analog in 1 line (if present)
137 XDI_AnalogIn2 = 0xB020, //!< Data containing adc data from analog in 2 line (if present)
138
139 XDI_MagneticGroup = 0xC000, //!< Group for magnetometer related outputs
140 XDI_MagneticField = 0xC020, //!< Magnetic field data in a.u.
141 XDI_MagneticFieldCorrected = 0xC030, //!< Corrected Magnetic field data in a.u. (ICC result)
142
143 XDI_VelocityGroup = 0xD000, //!< Group for velocity related outputs
144 XDI_VelocityXYZ = 0xD010, //!< Velocity in XYZ coordinate frame
145
146 XDI_StatusGroup = 0xE000, //!< Group for status related outputs
147 XDI_StatusByte = 0xE010, //!< Status byte
148 XDI_StatusWord = 0xE020, //!< Status word
149 XDI_Rssi = 0xE040, //!< Rssi information
150 XDI_DeviceId = 0xE080, //!< DeviceId output
151 XDI_LocationId = 0xE090, //!< LocationId output
152
153 XDI_IndicationGroup = 0x4800, //!< 0100.1000 -> bit reverse = 0001.0010 -> type 18
154 XDI_TriggerIn1 = 0x4810, //!< Trigger in 1 indication
155 XDI_TriggerIn2 = 0x4820, //!< Trigger in 2 indication
156 };
157 /*! @} */
158
159 typedef enum XsDataIdentifier XsDataIdentifier;
160 //AUTO }
161
162 #ifdef __cplusplus
163 inline XsDataIdentifier operator | (XsDataIdentifier a, XsDataIdentifier b)
164 {
165 return (XsDataIdentifier) ((int) a | (int) b);
166 }
167
168 inline XsDataIdentifier operator & (XsDataIdentifier a, XsDataIdentifier b)
169 {
170 return (XsDataIdentifier) ((int) a & (int) b);
171 }
172
173 inline XsDataIdentifier operator ~ (XsDataIdentifier a)
174 {
175 return (XsDataIdentifier) ~((unsigned short)a);
176 }
177 #endif
178
179 #include "xsdataidentifiervalue.h"
180
181 #endif