MRPT  1.9.9
xsdeviceid.h
Go to the documentation of this file.
1 /* +------------------------------------------------------------------------+
2  | Mobile Robot Programming Toolkit (MRPT) |
3  | https://www.mrpt.org/ |
4  | |
5  | Copyright (c) 2005-2019, Individual contributors, see AUTHORS file |
6  | See: https://www.mrpt.org/Authors - All rights reserved. |
7  | Released under BSD License. See: https://www.mrpt.org/License |
8  +------------------------------------------------------------------------+ */
9 #ifndef XSDEVICEID_H
10 #define XSDEVICEID_H
11 
12 #include "pstdint.h"
13 #include "xsstring.h"
14 #include "xstypesconfig.h"
15 #ifdef __cplusplus
16 extern "C"
17 {
18 #else
19 #define XSDEVICEID_INITIALIZER \
20  { \
21  0 \
22  }
23 #endif
24 
25  struct XsDeviceId;
26 
28  struct XsDeviceId const* thisPtr, XsString* str);
29  XSTYPES_DLL_API int XsDeviceId_isValid(struct XsDeviceId const* thisPtr);
31  struct XsDeviceId const* thisPtr);
33  struct XsDeviceId const* thisPtr);
35  struct XsDeviceId const* thisPtr);
36  XSTYPES_DLL_API int XsDeviceId_isMtw(struct XsDeviceId const* thisPtr);
37  XSTYPES_DLL_API int XsDeviceId_isMtix(struct XsDeviceId const* thisPtr);
38  XSTYPES_DLL_API int XsDeviceId_isMtig(struct XsDeviceId const* thisPtr);
40  struct XsDeviceId const* thisPtr);
42  struct XsDeviceId const* thisPtr);
44  struct XsDeviceId const* thisPtr);
46  struct XsDeviceId const* thisPtr);
47  XSTYPES_DLL_API int XsDeviceId_isMtMk4(struct XsDeviceId const* thisPtr);
48  XSTYPES_DLL_API int XsDeviceId_isMtMk4_X0(struct XsDeviceId const* thisPtr);
49  XSTYPES_DLL_API int XsDeviceId_isMtMk4_10(struct XsDeviceId const* thisPtr);
50  XSTYPES_DLL_API int XsDeviceId_isMtMk4_20(struct XsDeviceId const* thisPtr);
51  XSTYPES_DLL_API int XsDeviceId_isMtMk4_30(struct XsDeviceId const* thisPtr);
53  struct XsDeviceId const* thisPtr);
55  struct XsDeviceId const* thisPtr);
57  struct XsDeviceId const* thisPtr);
59  struct XsDeviceId const* thisPtr);
61  struct XsDeviceId const* thisPtr);
62  XSTYPES_DLL_API int XsDeviceId_isMtw2(struct XsDeviceId const* thisPtr);
63  XSTYPES_DLL_API int XsDeviceId_isMtx2(struct XsDeviceId const* thisPtr);
65  struct XsDeviceId const* thisPtr);
67  struct XsDeviceId const* thisPtr);
70  struct XsDeviceId* a, struct XsDeviceId* b);
71 
72 #ifdef __cplusplus
73 } // extern "C"
74 #endif
75 
76 struct XsDeviceId
77 {
78 #ifdef __cplusplus
79  /*! \brief Constructor that creates an XsDeviceId from the supplied \a
80  * deviceId */
82  /*! \brief Constructor that creates an XsDeviceId from the supplied
83  * XsDeviceId \a other */
84  inline XsDeviceId(const XsDeviceId& other) : m_deviceId(other.m_deviceId) {}
85  /*! \brief Assign the \a other deviceId to this XsDeviceId */
86  inline const XsDeviceId& operator=(const XsDeviceId& other)
87  {
88  m_deviceId = other.m_deviceId;
89  return *this;
90  }
91  /*! \brief Assign the \a deviceId to this XsDeviceId */
92  inline const XsDeviceId& operator=(uint32_t deviceId)
93  {
95  return *this;
96  }
97 
98  /*! \brief Returns the deviceId as an unsigned integer */
99  inline uint32_t toInt() const { return m_deviceId; }
100  /*! \brief Returns the deviceId as an XsString */
101  inline XsString toString() const
102  {
103  XsString tmp;
104  XsDeviceId_toString(this, &tmp);
105  return tmp;
106  }
107 
108  /*! \brief \copybrief XsDeviceId_isValid */
109  inline bool isValid() const { return 0 != XsDeviceId_isValid(this); }
110  /*! \brief \copybrief XsDeviceId_isXbusMaster */
111  inline bool isXbusMaster() const
112  {
113  return 0 != XsDeviceId_isXbusMaster(this);
114  }
115  /*! \brief \copybrief XsDeviceId_isXbusMasterMotionTracker */
116  inline bool isXbusMasterMotionTracker() const
117  {
118  return 0 != XsDeviceId_isXbusMasterMotionTracker(this);
119  }
120  /*! \brief \copybrief XsDeviceId_isMtw */
121  inline bool isMtw() const { return 0 != XsDeviceId_isMtw(this); }
122  /*! \brief \copybrief XsDeviceId_isMtix */
123  inline bool isMtix() const { return 0 != XsDeviceId_isMtix(this); }
124  /*! \brief \copybrief XsDeviceId_isLegacyMtig */
125  inline bool isLegacyMtig() const
126  {
127  return 0 != XsDeviceId_isLegacyMtig(this);
128  }
129  /*! \brief \copybrief XsDeviceId_isMtig */
130  inline bool isMtig() const { return 0 != XsDeviceId_isMtig(this); }
131  /*! \brief \copybrief XsDeviceId_isMtMk4 */
132  inline bool isMtMk4() const { return 0 != XsDeviceId_isMtMk4(this); }
133  /*! \brief \copybrief XsDeviceId_isMtMk4_X0 */
134  inline bool isMtMk4_X0() const { return 0 != XsDeviceId_isMtMk4_X0(this); }
135  /*! \brief \copybrief XsDeviceId_isMtMk4_10 */
136  inline bool isMtMk4_10() const { return 0 != XsDeviceId_isMtMk4_10(this); }
137  /*! \brief \copybrief XsDeviceId_isMtMk4_20 */
138  inline bool isMtMk4_20() const { return 0 != XsDeviceId_isMtMk4_20(this); }
139  /*! \brief \copybrief XsDeviceId_isMtMk4_30 */
140  inline bool isMtMk4_30() const { return 0 != XsDeviceId_isMtMk4_30(this); }
141  /*! \brief \copybrief XsDeviceId_isMtMk4_X00 */
142  inline bool isMtMk4_X00() const
143  {
144  return 0 != XsDeviceId_isMtMk4_X00(this);
145  }
146  /*! \brief \copybrief XsDeviceId_isMtMk4_100 */
147  inline bool isMtMk4_100() const
148  {
149  return 0 != XsDeviceId_isMtMk4_100(this);
150  }
151  /*! \brief \copybrief XsDeviceId_isMtMk4_200 */
152  inline bool isMtMk4_200() const
153  {
154  return 0 != XsDeviceId_isMtMk4_200(this);
155  }
156  /*! \brief \copybrief XsDeviceId_isMtMk4_300 */
157  inline bool isMtMk4_300() const
158  {
159  return 0 != XsDeviceId_isMtMk4_300(this);
160  }
161  /*! \brief \copybrief XsDeviceId_isMtMk4_700 */
162  inline bool isMtMk4_700() const
163  {
164  return 0 != XsDeviceId_isMtMk4_700(this);
165  }
166  /*! \brief \copybrief XsDeviceId_isMtw2 */
167  inline bool isMtw2() const { return 0 != XsDeviceId_isMtw2(this); }
168  /*! \brief \copybrief XsDeviceId_isMtx2 */
169  inline bool isMtx2() const { return 0 != XsDeviceId_isMtx2(this); }
170  /*! \brief \copybrief XsDeviceId_isWirelessMaster */
171  inline bool isWirelessMaster() const
172  {
173  return 0 != XsDeviceId_isWirelessMaster(this);
174  }
175  /*! \brief \copybrief XsDeviceId_isAwindaStation */
176  inline bool isAwindaStation() const
177  {
178  return 0 != XsDeviceId_isAwindaStation(this);
179  }
180  /*! \brief \copybrief XsDeviceId_isAwindaDongle */
181  inline bool isAwindaDongle() const
182  {
183  return 0 != XsDeviceId_isAwindaDongle(this);
184  }
185  /*! \brief \copybrief XsDeviceId_isAwindaOem */
186  inline bool isAwindaOem() const
187  {
188  return 0 != XsDeviceId_isAwindaOem(this);
189  }
190  /*! \brief \copybrief XsDeviceId_containsBroadcast */
191  inline bool containsBroadcast() const
192  {
193  return 0 != XsDeviceId_containsBroadcast(this);
194  }
195  /*! \brief \copybrief XsDeviceId_isBroadcast */
196  inline bool isBroadcast() const
197  {
198  return 0 != XsDeviceId_isBroadcast(this);
199  }
200 
201  /*! \brief Returns true if the \a other deviceId matches this deviceId */
202  inline bool operator==(const XsDeviceId& other) const
203  {
204  return m_deviceId == other.m_deviceId;
205  }
206  /*! \brief Returns true if the \a other deviceId does not match this
207  * deviceId */
208  inline bool operator!=(const XsDeviceId& other) const
209  {
210  return m_deviceId != other.m_deviceId;
211  }
212  /*! \brief Returns true if this deviceId is less than the \a other deviceId
213  */
214  inline bool operator<(const XsDeviceId& other) const
215  {
216  return m_deviceId < other.m_deviceId;
217  }
218  /*! \brief Returns true if this deviceId is less or equal to the \a other
219  * deviceId */
220  inline bool operator<=(const XsDeviceId& other) const
221  {
222  return m_deviceId <= other.m_deviceId;
223  }
224  /*! \brief Returns true if this deviceId is larger than the \a other
225  * deviceId */
226  inline bool operator>(const XsDeviceId& other) const
227  {
228  return m_deviceId > other.m_deviceId;
229  }
230  /*! \brief Returns true if this deviceId is larger or equal to the \a other
231  * deviceId */
232  inline bool operator>=(const XsDeviceId& other) const
233  {
234  return m_deviceId >= other.m_deviceId;
235  }
236 
237  /*! \brief Creates and returns a XsDeviceId representing the broadcast
238  * deviceId */
239  static XsDeviceId broadcast() { return XsDeviceId(XsDeviceId_broadcast()); }
240 
241  private:
242 #endif
243  /** The actual device id */
245 };
246 
247 typedef struct XsDeviceId XsDeviceId;
248 
249 #endif // file guard
XSTYPES_DLL_API int XsDeviceId_isMtig(struct XsDeviceId const *thisPtr)
XSTYPES_DLL_API uint32_t XsDeviceId_broadcast(void)
XSTYPES_DLL_API int XsDeviceId_isAwindaOem(struct XsDeviceId const *thisPtr)
XSTYPES_DLL_API int XsDeviceId_isBroadcast(struct XsDeviceId const *thisPtr)
XSTYPES_DLL_API int XsDeviceId_isMtMk4_300(struct XsDeviceId const *thisPtr)
XSTYPES_DLL_API void XsDeviceId_toString(struct XsDeviceId const *thisPtr, XsString *str)
XSTYPES_DLL_API int XsDeviceId_isMtMk4_30(struct XsDeviceId const *thisPtr)
XSTYPES_DLL_API int XsDeviceId_isMtMk4_10(struct XsDeviceId const *thisPtr)
XSTYPES_DLL_API int XsDeviceId_containsBroadcast(struct XsDeviceId const *thisPtr)
XSTYPES_DLL_API int XsDeviceId_isLegacyMtig(struct XsDeviceId const *thisPtr)
XSTYPES_DLL_API int XsDeviceId_isMtMk4_20(struct XsDeviceId const *thisPtr)
XSTYPES_DLL_API int XsDeviceId_isMtMk4(struct XsDeviceId const *thisPtr)
XSTYPES_DLL_API int XsDeviceId_isValid(struct XsDeviceId const *thisPtr)
GLubyte GLubyte b
Definition: glext.h:6372
XSTYPES_DLL_API int XsDeviceId_isWirelessMaster(struct XsDeviceId const *thisPtr)
struct XsDeviceId XsDeviceId
Definition: xsdeviceid.h:247
XSTYPES_DLL_API int XsDeviceId_isAwindaDongle(struct XsDeviceId const *thisPtr)
XSTYPES_DLL_API void XsDeviceId_swap(struct XsDeviceId *a, struct XsDeviceId *b)
XSTYPES_DLL_API int XsDeviceId_isMtMk4_700(struct XsDeviceId const *thisPtr)
XSTYPES_DLL_API int XsDeviceId_isMtMk4_X00(struct XsDeviceId const *thisPtr)
bool operator==(const mrpt::img::TCamera &a, const mrpt::img::TCamera &b)
Definition: TCamera.cpp:202
#define XSTYPES_DLL_API
Definition: xstypesconfig.h:9
XSTYPES_DLL_API int XsDeviceId_isXbusMaster(struct XsDeviceId const *thisPtr)
XSTYPES_DLL_API int XsDeviceId_isMtw(struct XsDeviceId const *thisPtr)
XSTYPES_DLL_API int XsDeviceId_isMtix(struct XsDeviceId const *thisPtr)
XSTYPES_DLL_API int XsDeviceId_isMtx2(struct XsDeviceId const *thisPtr)
XSTYPES_DLL_API int XsDeviceId_isMtMk4_100(struct XsDeviceId const *thisPtr)
XSTYPES_DLL_API int XsDeviceId_isAwindaStation(struct XsDeviceId const *thisPtr)
XSTYPES_DLL_API int XsDeviceId_isXbusMasterMotionTracker(struct XsDeviceId const *thisPtr)
struct XsString XsString
Definition: xsstring.h:35
XSTYPES_DLL_API int XsDeviceId_isMtMk4_X0(struct XsDeviceId const *thisPtr)
bool operator<(const COccupancyGridMap2D::TPairLikelihoodIndex &e1, const COccupancyGridMap2D::TPairLikelihoodIndex &e2)
unsigned __int32 uint32_t
Definition: rptypes.h:50
XSTYPES_DLL_API int XsDeviceId_isMtw2(struct XsDeviceId const *thisPtr)
bool operator!=(const mrpt::img::TCamera &a, const mrpt::img::TCamera &b)
Definition: TCamera.cpp:209
#define deviceId
Definition: CIMUXSens.cpp:40
GLubyte GLubyte GLubyte a
Definition: glext.h:6372
XSTYPES_DLL_API int XsDeviceId_isMtMk4_200(struct XsDeviceId const *thisPtr)
uint32_t m_deviceId
The actual device id.
Definition: xsdeviceid.h:244



Page generated by Doxygen 1.8.14 for MRPT 1.9.9 Git: 8fe78517f Sun Jul 14 19:43:28 2019 +0200 at lun oct 28 02:10:00 CET 2019