MRPT
1.9.9
xsstatusflag.h
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
#ifndef XSSTATUSFLAG_H
10
#define XSSTATUSFLAG_H
11
12
/*! \addtogroup enums Global enumerations
13
@{
14
*/
15
/*! \brief Status flags
16
\details These flags define the function of specific bits in the status
17
returned by
18
XsDataPacket::status()
19
\sa XsDataPacket::status()
20
*/
21
22
enum
XsStatusFlag
23
{
24
/** Is set when the self test result was ok */
25
XSF_SelfTestOk
= 0x01
26
/** Is set when the computed orientation is valid. The orientation may be
27
invalid during startup or when the sensor data is clipping during violent
28
(for the device) motion */
29
,
30
XSF_OrientationValid
= 0x02
31
/** Is set when the device has a GPS receiver and the receiver says that
32
there is a GPS position fix. */
33
,
34
XSF_GpsValid
= 0x04
35
36
/** If all of these flags are set, the No Rotation algorithm is running */
37
,
38
XSF_NoRotationMask
= 0x18
39
/** If only this flag is set (out of the XSF_NoRotationMask) then the No
40
Rotation algorithm was aborted */
41
,
42
XSF_NoRotationAborted
= 0x10
43
/** If only this flag is set (out of the XSF_NoRotationMask) then the No
44
Rotation algorithm is running but has rejected samples */
45
,
46
XSF_NoRotationSamplesRejected
= 0x08
47
/** If all these flags are set (out of the XSF_NoRotationMask) then the No
48
Rotation algorithm is running normally */
49
,
50
XSF_NoRotationRunningNormally
= 0x18
51
52
,
53
XSF_ClipAccX
= 0x00000100,
54
XSF_ClipAccY
= 0x00000200,
55
XSF_ClipAccZ
= 0x00000400,
56
XSF_ClipGyrX
= 0x00000800,
57
XSF_ClipGyrY
= 0x00001000,
58
XSF_ClipGyrZ
= 0x00002000,
59
XSF_ClipMagX
= 0x00004000,
60
XSF_ClipMagY
= 0x00008000,
61
XSF_ClipMagZ
= 0x00010000
62
63
/** When set indicates a sync-in event has been triggered */
64
,
65
XSF_SyncIn
= 0x00200000
66
/** When set Indicates a sync-out event has been generated */
67
,
68
XSF_SyncOut
= 0x00400000
69
70
/** Mask for the 3 bit filter mode field */
71
,
72
XSF_FilterMode
= 0x03800000
73
};
74
75
/*! \brief Status flag bit offsets
76
\details Sometimes (rarely) it is necessary to know the bit offset instead
77
of the bit mask (ie when
78
shifting to only keep a subset of flags) for the status flags. This
79
enumeration provides these
80
offsets.
81
\sa XsStatusFlag
82
*/
83
enum
XsStatusFlagOffset
84
{
85
XSFO_OffsetSelfTestOk
= 0,
86
XSFO_OffsetOrientationValid
= 1,
87
XSFO_OffsetGpsValid
= 2,
88
XSFO_OffsetNoRotation
= 3
89
90
,
91
XSFO_OffsetClipAccX
= 8,
92
XSFO_OffsetClipAccY
= 9,
93
XSFO_OffsetClipAccZ
= 10,
94
XSFO_OffsetClipGyrX
= 11,
95
XSFO_OffsetClipGyrY
= 12,
96
XSFO_OffsetClipGyrZ
= 13,
97
XSFO_OffsetClipMagX
= 14,
98
XSFO_OffsetClipMagY
= 15,
99
XSFO_OffsetClipMagZ
= 16
100
101
,
102
XSFO_SyncIn
= 21,
103
XSFO_SyncOut
= 22
104
105
,
106
XSFO_FilterMode
= 23
// bits 23 -> 23 + XSFO_FilterModeNrOfBits - 1
107
,
108
XSFO_FilterModeNrOfBits
= 3
// note: bit 26 is reserved for future use
109
};
110
111
/*! @} */
112
typedef
enum
XsStatusFlag
XsStatusFlag
;
113
typedef
enum
XsStatusFlagOffset
XsStatusFlagOffset
;
114
115
#endif // file guard
116
117
//
118
//#define XS_STATUSFLAG_SELFTEST_OK 0x01
119
//#define XSF_OrientationValid 0x02
120
//#define XS_STATUSFLAG_GPSVALID 0x04
121
//#define XSF_NoRotationMask 0x18
122
//#define XSF_NoRotationRunningNormally 0x18
123
//#define XSF_NoRotationAborted 0x10
124
//#define XSF_NoRotationSamplesRejected 0x08
125
126
//#define XS_STATUSFLAG_CLIP_ACC_X 0x000100
127
//#define XS_STATUSFLAG_CLIP_ACC_Y 0x000200
128
//#define XS_STATUSFLAG_CLIP_ACC_Z 0x000400
129
//#define XS_STATUSFLAG_CLIP_GYR_X 0x000800
130
//#define XS_STATUSFLAG_CLIP_GYR_Y 0x001000
131
//#define XS_STATUSFLAG_CLIP_GYR_Z 0x002000
132
//#define XS_STATUSFLAG_CLIP_MAG_X 0x004000
133
//#define XS_STATUSFLAG_CLIP_MAG_Y 0x008000
134
//#define XS_STATUSFLAG_CLIP_MAG_Z 0x010000
135
//#define XS_STATUSFLAG_CLIP_ACC_OFFSET 8
XSFO_OffsetClipAccY
Definition:
xsstatusflag.h:92
XSFO_FilterModeNrOfBits
Definition:
xsstatusflag.h:108
XSF_ClipGyrY
Definition:
xsstatusflag.h:57
XSFO_OffsetOrientationValid
Definition:
xsstatusflag.h:86
XSF_OrientationValid
Definition:
xsstatusflag.h:30
XSF_ClipAccX
Definition:
xsstatusflag.h:53
XSF_NoRotationMask
Definition:
xsstatusflag.h:38
XSF_ClipMagY
Definition:
xsstatusflag.h:60
XSF_ClipGyrX
Definition:
xsstatusflag.h:56
XsStatusFlagOffset
XsStatusFlagOffset
Status flag bit offsets.
Definition:
xsstatusflag.h:83
XSF_NoRotationRunningNormally
Definition:
xsstatusflag.h:50
XSF_SyncIn
Definition:
xsstatusflag.h:65
XSFO_OffsetGpsValid
Definition:
xsstatusflag.h:87
XSFO_OffsetClipGyrY
Definition:
xsstatusflag.h:95
XSFO_OffsetSelfTestOk
Definition:
xsstatusflag.h:85
XSF_ClipAccZ
Definition:
xsstatusflag.h:55
XSFO_OffsetClipAccZ
Definition:
xsstatusflag.h:93
XsStatusFlag
XsStatusFlag
Status flags.
Definition:
xsstatusflag.h:22
XSFO_OffsetClipGyrX
Definition:
xsstatusflag.h:94
XSF_ClipMagX
Definition:
xsstatusflag.h:59
XSF_ClipGyrZ
Definition:
xsstatusflag.h:58
XSFO_OffsetClipMagY
Definition:
xsstatusflag.h:98
XSF_ClipAccY
Definition:
xsstatusflag.h:54
XSFO_OffsetClipMagX
Definition:
xsstatusflag.h:97
XSF_NoRotationSamplesRejected
Definition:
xsstatusflag.h:46
XSF_ClipMagZ
Definition:
xsstatusflag.h:61
XSFO_OffsetClipMagZ
Definition:
xsstatusflag.h:99
XSFO_OffsetClipGyrZ
Definition:
xsstatusflag.h:96
XSF_FilterMode
Definition:
xsstatusflag.h:72
XSFO_SyncIn
Definition:
xsstatusflag.h:102
XSF_SyncOut
Definition:
xsstatusflag.h:68
XSFO_SyncOut
Definition:
xsstatusflag.h:103
XSFO_OffsetNoRotation
Definition:
xsstatusflag.h:88
XSFO_FilterMode
Definition:
xsstatusflag.h:106
XSF_NoRotationAborted
Definition:
xsstatusflag.h:42
XSF_GpsValid
Definition:
xsstatusflag.h:34
XSF_SelfTestOk
Is set when the self test result was ok.
Definition:
xsstatusflag.h:25
XSFO_OffsetClipAccX
Definition:
xsstatusflag.h:91
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