xsdeviceid.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 XSDEVICEID_H
66 #define XSDEVICEID_H
67 
68 #include "xstypesconfig.h"
69 #include "pstdint.h"
70 #include "xsstring.h"
71 #include "xshandid.h"
72 #ifdef __cplusplus
73 #include <cstring>
74 extern "C" {
75 #endif
76 
77 #define XSDEVICEID_PRODUCT_CODE_LEN 24
78 #define XSDEVICEID_PRODUCT_CODE_INIT "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
79 
80 #ifndef __cplusplus
81 #define XSDEVICEID_INITIALIZER { 0, XSDEVICEID_PRODUCT_CODE_INIT, 0, 0, 0 }
82 #endif
83 
84 struct XsDeviceId;
85 
86 XSTYPES_DLL_API int XsDeviceId_isLegacyDeviceId(struct XsDeviceId const* thisPtr);
87 XSTYPES_DLL_API uint64_t XsDeviceId_legacyBit(struct XsDeviceId const* thisPtr);
88 XSTYPES_DLL_API int XsDeviceId_isMtiX(struct XsDeviceId const* thisPtr);
89 XSTYPES_DLL_API int XsDeviceId_isMtiX0(struct XsDeviceId const* thisPtr);
90 XSTYPES_DLL_API int XsDeviceId_isMtiX00(struct XsDeviceId const* thisPtr);
91 XSTYPES_DLL_API int XsDeviceId_isMtigX00(struct XsDeviceId const* thisPtr);
92 XSTYPES_DLL_API int XsDeviceId_isMtigX10(struct XsDeviceId const* thisPtr);
93 XSTYPES_DLL_API int XsDeviceId_isMti3X0(struct XsDeviceId const* thisPtr);
94 XSTYPES_DLL_API int XsDeviceId_isMti6X0(struct XsDeviceId const* thisPtr);
95 XSTYPES_DLL_API int XsDeviceId_isMti8X0(struct XsDeviceId const* thisPtr);
96 XSTYPES_DLL_API int XsDeviceId_isMtw(struct XsDeviceId const* thisPtr);
97 XSTYPES_DLL_API int XsDeviceId_isMtw2(struct XsDeviceId const* thisPtr);
98 XSTYPES_DLL_API int XsDeviceId_isMtx(struct XsDeviceId const* thisPtr);
99 XSTYPES_DLL_API int XsDeviceId_isMtx2(struct XsDeviceId const* thisPtr);
100 XSTYPES_DLL_API int XsDeviceId_isBodyPack(struct XsDeviceId const* thisPtr);
101 XSTYPES_DLL_API int XsDeviceId_isBodyPackV1(struct XsDeviceId const* thisPtr);
102 XSTYPES_DLL_API int XsDeviceId_isBodyPackV2(struct XsDeviceId const* thisPtr);
103 XSTYPES_DLL_API int XsDeviceId_isWirelessMaster(struct XsDeviceId const* thisPtr);
104 XSTYPES_DLL_API int XsDeviceId_isAwindaX(struct XsDeviceId const* thisPtr);
105 XSTYPES_DLL_API int XsDeviceId_isAwindaXStation(struct XsDeviceId const* thisPtr);
106 XSTYPES_DLL_API int XsDeviceId_isAwindaXDongle(struct XsDeviceId const* thisPtr);
107 XSTYPES_DLL_API int XsDeviceId_isAwindaXOem(struct XsDeviceId const* thisPtr);
108 XSTYPES_DLL_API int XsDeviceId_isAwinda2(struct XsDeviceId const* thisPtr);
109 XSTYPES_DLL_API int XsDeviceId_isAwinda2Station(struct XsDeviceId const* thisPtr);
110 XSTYPES_DLL_API int XsDeviceId_isAwinda2Dongle(struct XsDeviceId const* thisPtr);
111 XSTYPES_DLL_API int XsDeviceId_isAwinda2Oem(struct XsDeviceId const* thisPtr);
112 XSTYPES_DLL_API int XsDeviceId_isSyncStationX(struct XsDeviceId const* thisPtr);
113 XSTYPES_DLL_API int XsDeviceId_isSyncStation2(struct XsDeviceId const* thisPtr);
114 XSTYPES_DLL_API int XsDeviceId_isHilDevice(struct XsDeviceId const* thisPtr);
115 XSTYPES_DLL_API int XsDeviceId_isGlove(struct XsDeviceId const* thisPtr);
116 XSTYPES_DLL_API XsHandId XsDeviceId_side(struct XsDeviceId const* thisPtr);
117 XSTYPES_DLL_API int XsDeviceId_isDot(struct XsDeviceId const* thisPtr);
118 XSTYPES_DLL_API int XsDeviceId_isRugged(struct XsDeviceId const* thisPtr);
119 
120 XSTYPES_DLL_API int XsDeviceId_isImu(struct XsDeviceId const* thisPtr);
121 XSTYPES_DLL_API int XsDeviceId_isVru(struct XsDeviceId const* thisPtr);
122 XSTYPES_DLL_API int XsDeviceId_isAhrs(struct XsDeviceId const* thisPtr);
123 XSTYPES_DLL_API int XsDeviceId_isGnss(struct XsDeviceId const* thisPtr);
124 XSTYPES_DLL_API int XsDeviceId_isRtk(struct XsDeviceId const* thisPtr);
125 XSTYPES_DLL_API int XsDeviceId_hasInternalGnss(struct XsDeviceId const* thisPtr);
126 XSTYPES_DLL_API int XsDeviceId_isContainerDevice(struct XsDeviceId const* thisPtr);
127 
128 XSTYPES_DLL_API int XsDeviceId_isMt(struct XsDeviceId const* thisPtr);
129 XSTYPES_DLL_API int XsDeviceId_isMti(struct XsDeviceId const* thisPtr);
130 XSTYPES_DLL_API int XsDeviceId_isMtig(struct XsDeviceId const* thisPtr);
131 XSTYPES_DLL_API int XsDeviceId_isMtMark4(struct XsDeviceId const* thisPtr);
132 XSTYPES_DLL_API int XsDeviceId_isMtMark5(struct XsDeviceId const* thisPtr);
133 
134 //------------------------------------------------------------------------------------------------------------
135 //------------------------------------------------------------------------------------------------------------
136 //------------------------------------------------------------------------------------------------------------
137 //------------------------------------------------------------------------------------------------------------
138 
139 XSTYPES_DLL_API void XsDeviceId_toString(struct XsDeviceId const* thisPtr, XsString* str);
140 XSTYPES_DLL_API void XsDeviceId_fromString(struct XsDeviceId* thisPtr, XsString const* str);
141 XSTYPES_DLL_API void XsDeviceId_toDeviceTypeString(struct XsDeviceId const* thisPtr, XsString* str, int makeType);
142 XSTYPES_DLL_API void XsDeviceId_fromDeviceTypeString(struct XsDeviceId* thisPtr, XsString const* str);
143 XSTYPES_DLL_API int XsDeviceId_isValid(struct XsDeviceId const* thisPtr);
144 XSTYPES_DLL_API void XsDeviceId_swap(struct XsDeviceId* a, struct XsDeviceId* b);
145 XSTYPES_DLL_API int XsDeviceId_contains(struct XsDeviceId const* a, struct XsDeviceId const* b);
146 XSTYPES_DLL_API int XsDeviceId_isType(struct XsDeviceId const* thisPtr);
147 XSTYPES_DLL_API void XsDeviceId_typeName(struct XsDeviceId const* thisPtr, XsString* str);
148 XSTYPES_DLL_API void XsDeviceId_type(struct XsDeviceId const* thisPtr, struct XsDeviceId* type);
149 XSTYPES_DLL_API void XsDeviceId_deviceType(struct XsDeviceId const* thisPtr, int detailed, struct XsDeviceId* type);
150 XSTYPES_DLL_API void XsDeviceId_deviceTypeMask(struct XsDeviceId const* thisPtr, int detailed, struct XsDeviceId* type);
151 
152 //============================================================================================================
153 //==== Deprecated methods follow =====
154 //============================================================================================================
155 XSTYPES_DLL_API int XsDeviceId_isMtMk4(struct XsDeviceId const* thisPtr);
156 XSTYPES_DLL_API int XsDeviceId_isMtMk4_X(struct XsDeviceId const* thisPtr);
157 XSTYPES_DLL_API int XsDeviceId_isMtMk4_1(struct XsDeviceId const* thisPtr);
158 XSTYPES_DLL_API int XsDeviceId_isMtMk4_2(struct XsDeviceId const* thisPtr);
159 XSTYPES_DLL_API int XsDeviceId_isMtMk4_3(struct XsDeviceId const* thisPtr);
160 XSTYPES_DLL_API int XsDeviceId_isMtMk4_7(struct XsDeviceId const* thisPtr);
161 XSTYPES_DLL_API int XsDeviceId_isMtMk4_X0(struct XsDeviceId const* thisPtr);
162 XSTYPES_DLL_API int XsDeviceId_isMtMk4_10(struct XsDeviceId const* thisPtr);
163 XSTYPES_DLL_API int XsDeviceId_isMtMk4_20(struct XsDeviceId const* thisPtr);
164 XSTYPES_DLL_API int XsDeviceId_isMtMk4_30(struct XsDeviceId const* thisPtr);
165 XSTYPES_DLL_API int XsDeviceId_isMtMk4_X00(struct XsDeviceId const* thisPtr);
166 XSTYPES_DLL_API int XsDeviceId_isMtMk4_100(struct XsDeviceId const* thisPtr);
167 XSTYPES_DLL_API int XsDeviceId_isMtMk4_200(struct XsDeviceId const* thisPtr);
168 XSTYPES_DLL_API int XsDeviceId_isMtMk4_300(struct XsDeviceId const* thisPtr);
169 XSTYPES_DLL_API int XsDeviceId_isMtMk4_400(struct XsDeviceId const* thisPtr);
170 XSTYPES_DLL_API int XsDeviceId_isMtMk4_500(struct XsDeviceId const* thisPtr);
171 XSTYPES_DLL_API int XsDeviceId_isMtMk4_600(struct XsDeviceId const* thisPtr);
172 XSTYPES_DLL_API int XsDeviceId_isMtMk4_700(struct XsDeviceId const* thisPtr);
173 XSTYPES_DLL_API int XsDeviceId_isMtMk4_710(struct XsDeviceId const* thisPtr);
174 XSTYPES_DLL_API int XsDeviceId_isMtMk4_800(struct XsDeviceId const* thisPtr);
175 XSTYPES_DLL_API int XsDeviceId_isMtMk4_900(struct XsDeviceId const* thisPtr);
176 XSTYPES_DLL_API int XsDeviceId_isMtMk5(struct XsDeviceId const* thisPtr);
177 XSTYPES_DLL_API int XsDeviceId_isMtMk5_X0(struct XsDeviceId const* thisPtr);
178 XSTYPES_DLL_API int XsDeviceId_isMtMk5_10(struct XsDeviceId const* thisPtr);
179 XSTYPES_DLL_API int XsDeviceId_isMtMk5_20(struct XsDeviceId const* thisPtr);
180 XSTYPES_DLL_API int XsDeviceId_isMtMk5_30(struct XsDeviceId const* thisPtr);
181 XSTYPES_DLL_API int XsDeviceId_isMtMk5_X00(struct XsDeviceId const* thisPtr);
182 XSTYPES_DLL_API int XsDeviceId_isMtMk5_100(struct XsDeviceId const* thisPtr);
183 XSTYPES_DLL_API int XsDeviceId_isMtMk5_200(struct XsDeviceId const* thisPtr);
184 XSTYPES_DLL_API int XsDeviceId_isMtMk5_300(struct XsDeviceId const* thisPtr);
185 XSTYPES_DLL_API int XsDeviceId_isMtMk5_710(struct XsDeviceId const* thisPtr);
186 //============================================================================================================
187 
188 #ifdef __cplusplus
189 } // extern "C"
190 #endif
191 
193 {
194 #ifdef __cplusplus
195 
196  inline XsDeviceId(const char* productCode, uint16_t hardwareVersion, uint32_t productVariant, uint64_t serialNumber, uint16_t subDevice = 0)
197  : m_deviceId(serialNumber)
198  , m_productVariant(productVariant)
199  , m_hardwareVersion(hardwareVersion)
200  , m_subDevice(subDevice)
201  {
202  memset(m_productCode, 0, sizeof(m_productCode));
203  if (productCode)
204  {
206  std::strncpy(m_productCode, productCode, XSDEVICEID_PRODUCT_CODE_LEN);
207  }
208  }
209 
211  inline XsDeviceId(uint64_t serialNumber = 0)
212  : m_deviceId(serialNumber)
213  , m_productVariant(0)
214  , m_hardwareVersion(0)
215  , m_subDevice(0)
216  {
217  memset(m_productCode, 0, sizeof(m_productCode));
218  }
219 
221  inline explicit XsDeviceId(XsDeviceId const& parent, uint16_t subDevice)
222  {
223  memcpy(static_cast<void*>(this), static_cast<void const*>(&parent), sizeof(XsDeviceId));
224  m_subDevice = subDevice;
225  }
226 
228  inline XsDeviceId(const XsDeviceId& other)
229  {
230  memcpy(static_cast<void*>(this), static_cast<void const*>(&other), sizeof(XsDeviceId));
231  }
233  inline const XsDeviceId& operator=(const XsDeviceId& other)
234  {
235  if (this != &other)
236  memcpy(static_cast<void*>(this), static_cast<void const*>(&other), sizeof(XsDeviceId));
237  return *this;
238  }
239 
241  static inline uint64_t legacyBit()
242  {
243  return XsDeviceId_legacyBit(nullptr);
244  }
246  inline bool isLegacyDeviceId() const
247  {
248  return 0 != XsDeviceId_isLegacyDeviceId(this);
249  }
251  inline uint64_t toInt() const
252  {
253  return m_deviceId;
254  }
256  inline XsString productCode() const
257  {
258  XsString tmp(m_productCode);
259  return tmp;
260  }
262  inline uint32_t productVariant() const
263  {
264  return m_productVariant;
265  }
267  inline uint16_t hardwareVersion() const
268  {
269  return m_hardwareVersion;
270  }
275  inline uint16_t subDevice() const
276  {
277  return m_subDevice;
278  }
280  inline uint32_t legacyDeviceId() const
281  {
282  return static_cast<uint32_t>(m_deviceId);
283  }
285  inline bool isMtiX() const
286  {
287  return 0 != XsDeviceId_isMtiX(this);
288  }
290  inline bool isMtiX0() const
291  {
292  return 0 != XsDeviceId_isMtiX0(this);
293  }
295  inline bool isMtiX00() const
296  {
297  return 0 != XsDeviceId_isMtiX00(this);
298  }
300  inline bool isMtigX00() const
301  {
302  return 0 != XsDeviceId_isMtigX00(this);
303  }
305  inline bool isMtigX10() const
306  {
307  return 0 != XsDeviceId_isMtigX10(this);
308  }
310  inline bool isMti3X0() const
311  {
312  return 0 != XsDeviceId_isMti3X0(this);
313  }
315  inline bool isMti6X0() const
316  {
317  return 0 != XsDeviceId_isMti6X0(this);
318  }
320  inline bool isMti8X0() const
321  {
322  return 0 != XsDeviceId_isMti8X0(this);
323  }
325  inline bool isGlove() const
326  {
327  return 0 != XsDeviceId_isGlove(this);
328  }
330  inline XsHandId side() const
331  {
332  return XsDeviceId_side(this);
333  }
335  inline bool isDot() const
336  {
337  return 0 != XsDeviceId_isDot(this);
338  }
340  inline bool isRugged() const
341  {
342  return 0 != XsDeviceId_isRugged(this);
343  }
345  inline bool isMtw() const
346  {
347  return 0 != XsDeviceId_isMtw(this);
348  }
350  inline bool isMtw2() const
351  {
352  return 0 != XsDeviceId_isMtw2(this);
353  }
355  inline bool isMtx() const
356  {
357  return 0 != XsDeviceId_isMtx(this);
358  }
360  inline bool isMtx2() const
361  {
362  return 0 != XsDeviceId_isMtx2(this);
363  }
365  inline bool isBodyPack() const
366  {
367  return 0 != XsDeviceId_isBodyPack(this);
368  }
370  inline bool isBodyPackV1() const
371  {
372  return 0 != XsDeviceId_isBodyPackV1(this);
373  }
375  inline bool isBodyPackV2() const
376  {
377  return 0 != XsDeviceId_isBodyPackV2(this);
378  }
380  inline bool isWirelessMaster() const
381  {
382  return 0 != XsDeviceId_isWirelessMaster(this);
383  }
385  inline bool isAwindaX() const
386  {
387  return 0 != XsDeviceId_isAwindaX(this);
388  }
390  inline bool isAwindaXStation() const
391  {
392  return 0 != XsDeviceId_isAwindaXStation(this);
393  }
395  inline bool isAwindaXDongle() const
396  {
397  return 0 != XsDeviceId_isAwindaXDongle(this);
398  }
400  inline bool isAwindaXOem() const
401  {
402  return 0 != XsDeviceId_isAwindaXOem(this);
403  }
405  inline bool isAwinda2() const
406  {
407  return 0 != XsDeviceId_isAwinda2(this);
408  }
410  inline bool isAwinda2Station() const
411  {
412  return 0 != XsDeviceId_isAwinda2Station(this);
413  }
415  inline bool isAwinda2Dongle() const
416  {
417  return 0 != XsDeviceId_isAwinda2Dongle(this);
418  }
420  inline bool isAwinda2Oem() const
421  {
422  return 0 != XsDeviceId_isAwinda2Oem(this);
423  }
425  inline bool isSyncStationX() const
426  {
427  return 0 != XsDeviceId_isSyncStationX(this);
428  }
430  inline bool isSyncStation2() const
431  {
432  return 0 != XsDeviceId_isSyncStation2(this);
433  }
435  inline bool isHilDevice() const
436  {
437  return 0 != XsDeviceId_isHilDevice(this);
438  }
440  inline bool isImu() const
441  {
442  return 0 != XsDeviceId_isImu(this);
443  }
445  inline bool isVru() const
446  {
447  return 0 != XsDeviceId_isVru(this);
448  }
450  inline bool isAhrs() const
451  {
452  return 0 != XsDeviceId_isAhrs(this);
453  }
455  inline bool isGnss() const
456  {
457  return 0 != XsDeviceId_isGnss(this);
458  }
460  inline bool isRtk() const
461  {
462  return 0 != XsDeviceId_isRtk(this);
463  }
465  inline bool hasInternalGnss() const
466  {
467  return 0 != XsDeviceId_hasInternalGnss(this);
468  }
470  inline bool isContainerDevice() const
471  {
472  return 0 != XsDeviceId_isContainerDevice(this);
473  }
475  inline bool isMt() const
476  {
477  return 0 != XsDeviceId_isMt(this);
478  }
480  inline bool isMti() const
481  {
482  return 0 != XsDeviceId_isMti(this);
483  }
485  inline bool isMtig() const
486  {
487  return 0 != XsDeviceId_isMtig(this);
488  }
490  inline bool isMtMark4() const
491  {
492  return 0 != XsDeviceId_isMtMark4(this);
493  }
495  inline bool isMtMark5() const
496  {
497  return 0 != XsDeviceId_isMtMark5(this);
498  }
500  inline XsString toString() const
501  {
502  XsString tmp;
503  XsDeviceId_toString(this, &tmp);
504  return tmp;
505  }
507  inline void fromString(const XsString& str)
508  {
509  XsDeviceId_fromString(this, &str);
510  }
511 
516  inline XsString toDeviceTypeString(bool makeType = true) const
517  {
518  XsString tmp;
519  XsDeviceId_toDeviceTypeString(this, &tmp, makeType ? 1 : 0);
520  return tmp;
521  }
522 
525  inline void fromDeviceTypeString(const XsString& str)
526  {
528  }
529 
531  inline bool isValid() const
532  {
533  return 0 != XsDeviceId_isValid(this);
534  }
536  inline bool contains(const XsDeviceId& other) const
537  {
538  return 0 != XsDeviceId_contains(this, &other);
539  }
541  inline bool isType() const
542  {
543  return 0 != XsDeviceId_isType(this);
544  }
546  inline XsString typeName() const
547  {
548  XsString rv;
549  XsDeviceId_typeName(this, &rv);
550  return rv;
551  }
553  inline XsDeviceId type() const
554  {
555  XsDeviceId xtype;
556  XsDeviceId_type(this, &xtype);
557  return xtype;
558  }
563  inline XsDeviceId deviceType(bool detailed = true) const
564  {
565  XsDeviceId xtype;
566  XsDeviceId_deviceType(this, detailed ? 1 : 0, &xtype);
567  return xtype;
568  }
573  inline XsDeviceId deviceTypeMask(bool detailed = true) const
574  {
575  XsDeviceId xtype;
576  XsDeviceId_deviceTypeMask(this, detailed ? 1 : 0, &xtype);
577  return xtype;
578  }
579 
581  inline bool operator==(const XsDeviceId& other) const
582  {
583  if (isLegacyDeviceId() || other.isLegacyDeviceId())
584  return toInt() == other.toInt(); // there are no legacy devices with a sub-device
585  else
586  {
587  return (toInt() == other.toInt() &&
590  m_subDevice == other.m_subDevice &&
591  (strcmp(m_productCode, other.m_productCode) == 0)
592  );
593  }
594  }
596  inline bool operator!=(const XsDeviceId& other) const
597  {
598  return !(*this == other);
599  }
601  inline bool operator<(const XsDeviceId& other) const
602  {
603  if (isLegacyDeviceId() || other.isLegacyDeviceId())
604  return toInt() < other.toInt();
605  else
606  {
607  int pdiff = strcmp(m_productCode, other.m_productCode);
608  if (pdiff < 0)
609  return true;
610  else if (pdiff > 0)
611  return false;
612  else
613  {
615  return true;
616  else if (m_hardwareVersion > other.m_hardwareVersion)
617  return false;
618  else
619  {
621  return true;
622  else if (m_productVariant > other.m_productVariant)
623  return false;
624  else
625  {
626  if (toInt() < other.toInt())
627  return true;
628  else if (toInt() > other.toInt())
629  return false;
630  else
631  return m_subDevice < other.m_subDevice;
632  }
633  }
634  }
635  }
636  }
638  inline bool operator<=(const XsDeviceId& other) const
639  {
640  if (isLegacyDeviceId())
641  return toInt() <= other.toInt();
642  else
643  {
644  int pdiff = strcmp(m_productCode, other.m_productCode);
645  if (pdiff > 0)
646  return false;
647  else
648  {
650  return false;
651  else
652  {
654  return false;
655  else
656  {
657  if (toInt() < other.toInt())
658  return true;
659  else if (toInt() > other.toInt())
660  return false;
661  else
662  return m_subDevice <= other.m_subDevice;
663  }
664  }
665  }
666  }
667  }
669  inline bool operator>(const XsDeviceId& other) const
670  {
671  if (isLegacyDeviceId())
672  return toInt() > other.toInt();
673  else
674  {
675  int pdiff = strcmp(m_productCode, other.m_productCode);
676  if (pdiff > 0)
677  return true;
678  else if (pdiff < 0)
679  return false;
680  else
681  {
683  return true;
684  else if (m_hardwareVersion < other.m_hardwareVersion)
685  return false;
686  else
687  {
689  return true;
690  else if (m_productVariant < other.m_productVariant)
691  return false;
692  else
693  {
694  if (toInt() > other.toInt())
695  return true;
696  else if (toInt() < other.toInt())
697  return false;
698  else
699  return m_subDevice > other.m_subDevice;
700  }
701  }
702  }
703  }
704  }
706  inline bool operator>=(const XsDeviceId& other) const
707  {
708  if (isLegacyDeviceId())
709  return toInt() >= other.toInt();
710  else
711  {
712  int pdiff = strcmp(m_productCode, other.m_productCode);
713  if (pdiff < 0)
714  return false;
715  else
716  {
718  return false;
719  else
720  {
722  return false;
723  else
724  {
725  if (toInt() > other.toInt())
726  return true;
727  else if (toInt() < other.toInt())
728  return false;
729  else
730  return m_subDevice >= other.m_subDevice;
731  }
732  }
733  }
734  }
735  }
736 
737 
738  //============================================================================================================
739  //============================================================================================================
740  //==== Deprecated methods follow =====
741  //============================================================================================================
742  //============================================================================================================
744 
746  XSDEPRECATED inline bool isMtMk4() const
747  {
748  return 0 != XsDeviceId_isMtMk4(this);
749  }
751  XSDEPRECATED inline bool isMtMk4_X() const
752  {
753  return 0 != XsDeviceId_isMtMk4_X(this);
754  }
756  XSDEPRECATED inline bool isMtMk4_1() const
757  {
758  return 0 != XsDeviceId_isMtMk4_1(this);
759  }
761  XSDEPRECATED inline bool isMtMk4_2() const
762  {
763  return 0 != XsDeviceId_isMtMk4_2(this);
764  }
766  XSDEPRECATED inline bool isMtMk4_3() const
767  {
768  return 0 != XsDeviceId_isMtMk4_3(this);
769  }
771  XSDEPRECATED inline bool isMtMk4_7() const
772  {
773  return 0 != XsDeviceId_isMtMk4_7(this);
774  }
776  XSDEPRECATED inline bool isMtMk4_X0() const
777  {
778  return 0 != XsDeviceId_isMtMk4_X0(this);
779  }
781  XSDEPRECATED inline bool isMtMk4_10() const
782  {
783  return 0 != XsDeviceId_isMtMk4_10(this);
784  }
786  XSDEPRECATED inline bool isMtMk4_20() const
787  {
788  return 0 != XsDeviceId_isMtMk4_20(this);
789  }
791  XSDEPRECATED inline bool isMtMk4_30() const
792  {
793  return 0 != XsDeviceId_isMtMk4_30(this);
794  }
796  XSDEPRECATED inline bool isMtMk4_X00() const
797  {
798  return 0 != XsDeviceId_isMtMk4_X00(this);
799  }
801  XSDEPRECATED inline bool isMtMk4_100() const
802  {
803  return 0 != XsDeviceId_isMtMk4_100(this);
804  }
806  XSDEPRECATED inline bool isMtMk4_200() const
807  {
808  return 0 != XsDeviceId_isMtMk4_200(this);
809  }
811  XSDEPRECATED inline bool isMtMk4_300() const
812  {
813  return 0 != XsDeviceId_isMtMk4_300(this);
814  }
816  XSDEPRECATED inline bool isMtMk4_400() const
817  {
818  return 0 != XsDeviceId_isMtMk4_400(this);
819  }
821  XSDEPRECATED inline bool isMtMk4_500() const
822  {
823  return 0 != XsDeviceId_isMtMk4_500(this);
824  }
826  XSDEPRECATED inline bool isMtMk4_600() const
827  {
828  return 0 != XsDeviceId_isMtMk4_600(this);
829  }
831  XSDEPRECATED inline bool isMtMk4_700() const
832  {
833  return 0 != XsDeviceId_isMtMk4_700(this);
834  }
836  XSDEPRECATED inline bool isMtMk4_710() const
837  {
838  return 0 != XsDeviceId_isMtMk4_710(this);
839  }
841  XSDEPRECATED inline bool isMtMk4_800() const
842  {
843  return 0 != XsDeviceId_isMtMk4_800(this);
844  }
846  XSDEPRECATED inline bool isMtMk4_900() const
847  {
848  return 0 != XsDeviceId_isMtMk4_900(this);
849  }
851  XSDEPRECATED inline bool isMtMk5() const
852  {
853  return 0 != XsDeviceId_isMtMk5(this);
854  }
856  XSDEPRECATED inline bool isMtMk5_X0() const
857  {
858  return 0 != XsDeviceId_isMtMk5_X0(this);
859  }
861  XSDEPRECATED inline bool isMtMk5_10() const
862  {
863  return 0 != XsDeviceId_isMtMk5_10(this);
864  }
866  XSDEPRECATED inline bool isMtMk5_20() const
867  {
868  return 0 != XsDeviceId_isMtMk5_20(this);
869  }
871  XSDEPRECATED inline bool isMtMk5_30() const
872  {
873  return 0 != XsDeviceId_isMtMk5_30(this);
874  }
876  XSDEPRECATED inline bool isMtMk5_X00() const
877  {
878  return 0 != XsDeviceId_isMtMk5_X00(this);
879  }
881  XSDEPRECATED inline bool isMtMk5_100() const
882  {
883  return 0 != XsDeviceId_isMtMk5_100(this);
884  }
886  XSDEPRECATED inline bool isMtMk5_200() const
887  {
888  return 0 != XsDeviceId_isMtMk5_200(this);
889  }
891  XSDEPRECATED inline bool isMtMk5_300() const
892  {
893  return 0 != XsDeviceId_isMtMk5_300(this);
894  }
896  XSDEPRECATED inline bool isMtMk5_710() const
897  {
898  return 0 != XsDeviceId_isMtMk5_710(this);
899  }
900 
901  //============================================================================================================
902 
903 private:
904 #endif
905  uint64_t m_deviceId;
908  uint16_t m_hardwareVersion;
909  uint16_t m_subDevice;
910 };
911 
912 typedef struct XsDeviceId XsDeviceId;
913 
914 #if defined(__cplusplus) && !defined(XSENS_NO_STL)
915 namespace std
916 {
917 template<typename _CharT, typename _Traits>
918 basic_ostream<_CharT, _Traits>& operator<<(basic_ostream<_CharT, _Traits>& o, XsDeviceId const& xd)
919 {
920  return (o << xd.toString());
921 }
922 }
923 
924 inline XsString& operator<<(XsString& o, XsDeviceId const& xd)
925 {
926  o.append(xd.toString());
927  return o;
928 }
929 
935 static std::string makeNiceProductCode(char const* pc, int maxSz = 20)
936 {
937  if (maxSz <= 0 && pc)
938  maxSz = 20;
939  std::string result(pc ? pc : "", (unsigned int) maxSz);
940  std::string::size_type thingy = result.find(" ");
941  if (thingy != std::string::npos && (int) thingy < maxSz)
942  result.erase(result.begin() + (unsigned)thingy, result.end());
943  return result;
944 }
950 inline static std::string makeNiceProductCode(uint8_t const* pc, int maxSz = 20)
951 {
952  return makeNiceProductCode((char const*) pc, maxSz);
953 }
954 #endif
955 
956 #endif
XsDeviceId_isMtMk5_10
XSTYPES_DLL_API int XsDeviceId_isMtMk5_10(struct XsDeviceId const *thisPtr)
Test if this device ID represents an MTMk5 10.
Definition: xsdeviceid.c:1271
xsstring.h
XsDeviceId_isAwindaX
XSTYPES_DLL_API int XsDeviceId_isAwindaX(struct XsDeviceId const *thisPtr)
Test if this device ID represents an Awinda device.
Definition: xsdeviceid.c:423
XsDeviceId_isMtMk4_100
XSTYPES_DLL_API int XsDeviceId_isMtMk4_100(struct XsDeviceId const *thisPtr)
Test if this device ID represents an MTMk4 100.
Definition: xsdeviceid.c:1160
XsDeviceId_isMt
XSTYPES_DLL_API int XsDeviceId_isMt(struct XsDeviceId const *thisPtr)
Test if this device ID represents an MT device (any Mti, Mtig, Mtx or Mtw)
Definition: xsdeviceid.c:664
XsDeviceId_isMtMk5_X0
XSTYPES_DLL_API int XsDeviceId_isMtMk5_X0(struct XsDeviceId const *thisPtr)
Test if this device ID represents an MTMk5 10 series.
Definition: xsdeviceid.c:1262
XsDeviceId_isMtMk4_X
XSTYPES_DLL_API int XsDeviceId_isMtMk4_X(struct XsDeviceId const *thisPtr)
Test if this device ID represents an MTMk4 1 series.
Definition: xsdeviceid.c:1070
XsDeviceId_isAwindaXDongle
XSTYPES_DLL_API int XsDeviceId_isAwindaXDongle(struct XsDeviceId const *thisPtr)
Test if this device ID represents an Awinda Dongle.
Definition: xsdeviceid.c:439
XsDeviceId::m_productCode
char m_productCode[XSDEVICEID_PRODUCT_CODE_LEN]
The productcode of a device.
Definition: xsdeviceid.h:906
XsDeviceId_deviceTypeMask
XSTYPES_DLL_API void XsDeviceId_deviceTypeMask(struct XsDeviceId const *thisPtr, int detailed, struct XsDeviceId *type)
Returns the mask which can be used to get the detailed device type (eg 10, 300 and Awinda2 Master)
Definition: xsdeviceid.c:1024
XsDeviceId_isBodyPackV2
XSTYPES_DLL_API int XsDeviceId_isBodyPackV2(struct XsDeviceId const *thisPtr)
Test if this device ID represents a bodypack V2 device.
Definition: xsdeviceid.c:397
XsDeviceId_isMtMk4_10
XSTYPES_DLL_API int XsDeviceId_isMtMk4_10(struct XsDeviceId const *thisPtr)
Test if this device ID represents an MTMk4 10.
Definition: xsdeviceid.c:1124
XsDeviceId_isLegacyDeviceId
XSTYPES_DLL_API int XsDeviceId_isLegacyDeviceId(struct XsDeviceId const *thisPtr)
Test if the device ID represents a legacy device identification.
Definition: xsdeviceid.c:90
XsDeviceId_isMtMk5_300
XSTYPES_DLL_API int XsDeviceId_isMtMk5_300(struct XsDeviceId const *thisPtr)
Test if this device ID represents an MTMk5 300.
Definition: xsdeviceid.c:1325
XsDeviceId_isAwinda2Station
XSTYPES_DLL_API int XsDeviceId_isAwinda2Station(struct XsDeviceId const *thisPtr)
Test if this device ID represents an Awinda2 Station.
Definition: xsdeviceid.c:466
xshandid.h
XsDeviceId_swap
XSTYPES_DLL_API void XsDeviceId_swap(struct XsDeviceId *a, struct XsDeviceId *b)
Swap the contents of a with those of b.
Definition: xsdeviceid.c:813
XsDeviceId_isMtMk4_500
XSTYPES_DLL_API int XsDeviceId_isMtMk4_500(struct XsDeviceId const *thisPtr)
Test if this device ID represents an MTMk4 500.
Definition: xsdeviceid.c:1196
XsDeviceId_isAwindaXOem
XSTYPES_DLL_API int XsDeviceId_isAwindaXOem(struct XsDeviceId const *thisPtr)
Test if this device ID represents an Awinda OEM board.
Definition: xsdeviceid.c:447
XsDeviceId_isMtMk4_700
XSTYPES_DLL_API int XsDeviceId_isMtMk4_700(struct XsDeviceId const *thisPtr)
Test if this device ID represents an MTMk4 700.
Definition: xsdeviceid.c:1217
XsDeviceId_isBodyPackV1
XSTYPES_DLL_API int XsDeviceId_isBodyPackV1(struct XsDeviceId const *thisPtr)
Test if this device ID represents a bodypack V1 device.
Definition: xsdeviceid.c:386
XsDeviceId_isMtx
XSTYPES_DLL_API int XsDeviceId_isMtx(struct XsDeviceId const *thisPtr)
Test if this device ID represents an MTx.
Definition: xsdeviceid.c:356
XsDeviceId_isSyncStation2
XSTYPES_DLL_API int XsDeviceId_isSyncStation2(struct XsDeviceId const *thisPtr)
Test if this device ID represents a SyncStation v2.
Definition: xsdeviceid.c:504
XsDeviceId_isMti3X0
XSTYPES_DLL_API int XsDeviceId_isMti3X0(struct XsDeviceId const *thisPtr)
Test if the device ID represents an MTi-3X0 device.
Definition: xsdeviceid.c:228
XsDeviceId_isType
XSTYPES_DLL_API int XsDeviceId_isType(struct XsDeviceId const *thisPtr)
XsDeviceId_isMtMk5_710
XSTYPES_DLL_API int XsDeviceId_isMtMk5_710(struct XsDeviceId const *thisPtr)
Test if this device ID represents an MTMk5 710.
Definition: xsdeviceid.c:1334
XsHandId
XsHandId
This is an enumerator that contains the left and right hand.
Definition: xshandid.h:75
XsDeviceId_toString
XSTYPES_DLL_API void XsDeviceId_toString(struct XsDeviceId const *thisPtr, XsString *str)
XsDeviceId_isMtMk4_300
XSTYPES_DLL_API int XsDeviceId_isMtMk4_300(struct XsDeviceId const *thisPtr)
Test if this device ID represents an MTMk4 300.
Definition: xsdeviceid.c:1178
XsDeviceId_isMti
XSTYPES_DLL_API int XsDeviceId_isMti(struct XsDeviceId const *thisPtr)
Test if this device ID represents an MTi device (1, 10 or 100 series, 1 includes MTi-7)
Definition: xsdeviceid.c:672
XsDeviceId_isMtMk5_30
XSTYPES_DLL_API int XsDeviceId_isMtMk5_30(struct XsDeviceId const *thisPtr)
Test if this device ID represents an MTMk5 30.
Definition: xsdeviceid.c:1289
XsDeviceId_isMtiX0
XSTYPES_DLL_API int XsDeviceId_isMtiX0(struct XsDeviceId const *thisPtr)
Test if the device ID represents an Mti 10-series device.
Definition: xsdeviceid.c:114
XsDeviceId_isMtMk4_200
XSTYPES_DLL_API int XsDeviceId_isMtMk4_200(struct XsDeviceId const *thisPtr)
Test if this device ID represents an MTMk4 200.
Definition: xsdeviceid.c:1169
XsDeviceId_isBodyPack
XSTYPES_DLL_API int XsDeviceId_isBodyPack(struct XsDeviceId const *thisPtr)
Test if this device ID represents a bodypack (any version) device.
Definition: xsdeviceid.c:375
XsDeviceId_isMtMk4_400
XSTYPES_DLL_API int XsDeviceId_isMtMk4_400(struct XsDeviceId const *thisPtr)
Test if this device ID represents an MTMk4 400.
Definition: xsdeviceid.c:1187
XsDeviceId_isMtMark4
XSTYPES_DLL_API int XsDeviceId_isMtMark4(struct XsDeviceId const *thisPtr)
Test if this device ID represents an Mk4 generation MT device.
Definition: xsdeviceid.c:688
XsDeviceId_deviceType
XSTYPES_DLL_API void XsDeviceId_deviceType(struct XsDeviceId const *thisPtr, int detailed, struct XsDeviceId *type)
Returns the device type identified by this id (eg 10, 300 and Awinda2 Master)
Definition: xsdeviceid.c:973
XsDeviceId_isMtMk4_X0
XSTYPES_DLL_API int XsDeviceId_isMtMk4_X0(struct XsDeviceId const *thisPtr)
Test if this device ID represents an MTMk4 10 series.
Definition: xsdeviceid.c:1115
XsDeviceId_isMtMk4
XSTYPES_DLL_API int XsDeviceId_isMtMk4(struct XsDeviceId const *thisPtr)
Test if this device ID represents an MTMk4.
Definition: xsdeviceid.c:1059
XsDeviceId_isAwinda2
XSTYPES_DLL_API int XsDeviceId_isAwinda2(struct XsDeviceId const *thisPtr)
Test if this device ID represents an Awinda2 device.
Definition: xsdeviceid.c:455
XsDeviceId_isMtw2
XSTYPES_DLL_API int XsDeviceId_isMtw2(struct XsDeviceId const *thisPtr)
Test if this device ID represents an MTw2.
Definition: xsdeviceid.c:345
XsDeviceId_isRtk
XSTYPES_DLL_API int XsDeviceId_isRtk(struct XsDeviceId const *thisPtr)
Test if this device ID represents an RTK (capable) device.
Definition: xsdeviceid.c:639
XsDeviceId_isMtMk4_900
XSTYPES_DLL_API int XsDeviceId_isMtMk4_900(struct XsDeviceId const *thisPtr)
Test if this device ID represents an MTMk4 900.
Definition: xsdeviceid.c:1244
XsDeviceId_isWirelessMaster
XSTYPES_DLL_API int XsDeviceId_isWirelessMaster(struct XsDeviceId const *thisPtr)
Test if this device ID represents a Wireless Master device (Awinda Station, Awinda Dongle,...
Definition: xsdeviceid.c:408
XsDeviceId_isImu
XSTYPES_DLL_API int XsDeviceId_isImu(struct XsDeviceId const *thisPtr)
Test if this device ID represents an IMU.
Definition: xsdeviceid.c:523
XsDeviceId_isMtMk4_7
XSTYPES_DLL_API int XsDeviceId_isMtMk4_7(struct XsDeviceId const *thisPtr)
Test if this device ID represents an MTMk4 7.
Definition: xsdeviceid.c:1106
XsDeviceId_isMtMk4_600
XSTYPES_DLL_API int XsDeviceId_isMtMk4_600(struct XsDeviceId const *thisPtr)
Test if this device ID represents an MTMk4 600.
Definition: xsdeviceid.c:1205
XsDeviceId_isAwinda2Oem
XSTYPES_DLL_API int XsDeviceId_isAwinda2Oem(struct XsDeviceId const *thisPtr)
Test if this device ID represents an Awinda2 OEM board.
Definition: xsdeviceid.c:488
XsDeviceId_isMtMk4_20
XSTYPES_DLL_API int XsDeviceId_isMtMk4_20(struct XsDeviceId const *thisPtr)
Test if this device ID represents an MTMk4 20.
Definition: xsdeviceid.c:1133
operator==
bool operator==(const XsFilterProfile &lhs, const XsFilterProfile &rhs)
Returns true if lhs has the same type as rhs.
Definition: scenariomatchpred.h:81
XsDeviceId_isMtMk4_1
XSTYPES_DLL_API int XsDeviceId_isMtMk4_1(struct XsDeviceId const *thisPtr)
Test if this device ID represents an MTMk4 1.
Definition: xsdeviceid.c:1079
XsDeviceId_legacyBit
XSTYPES_DLL_API uint64_t XsDeviceId_legacyBit(struct XsDeviceId const *thisPtr)
Definition: xsdeviceid.c:81
XsDeviceId_isValid
XSTYPES_DLL_API int XsDeviceId_isValid(struct XsDeviceId const *thisPtr)
Test if the device ID is a valid id (not 0).
Definition: xsdeviceid.c:801
XsDeviceId_isMtMark5
XSTYPES_DLL_API int XsDeviceId_isMtMark5(struct XsDeviceId const *thisPtr)
Test if this device ID represents an Mk5 generation MT device.
Definition: xsdeviceid.c:699
XsDeviceId_isMtMk4_X00
XSTYPES_DLL_API int XsDeviceId_isMtMk4_X00(struct XsDeviceId const *thisPtr)
Test if this device ID represents an MTMk4 100 series (including 700 and 710)
Definition: xsdeviceid.c:1151
XsDeviceId_isAwindaXStation
XSTYPES_DLL_API int XsDeviceId_isAwindaXStation(struct XsDeviceId const *thisPtr)
Test if this device ID represents an Awinda Station.
Definition: xsdeviceid.c:431
uint32_t
unsigned int uint32_t
Definition: pstdint.h:485
XsDeviceId::m_productVariant
uint32_t m_productVariant
The product variant of a device.
Definition: xsdeviceid.h:907
XsDeviceId_isMtMk4_710
XSTYPES_DLL_API int XsDeviceId_isMtMk4_710(struct XsDeviceId const *thisPtr)
Test if this device ID represents either an MTMk4 710 or Mk5 710.
Definition: xsdeviceid.c:1226
XsDeviceId_isAhrs
XSTYPES_DLL_API int XsDeviceId_isAhrs(struct XsDeviceId const *thisPtr)
Test if this device ID represents an AHRS.
Definition: xsdeviceid.c:579
operator>
bool operator>(const TransformStorage &lhs, const TransformStorage &rhs)
XsDeviceId_isMti6X0
XSTYPES_DLL_API int XsDeviceId_isMti6X0(struct XsDeviceId const *thisPtr)
Test if the device ID represents an MTi-600 series device.
Definition: xsdeviceid.c:194
XsDeviceId_isMtx2
XSTYPES_DLL_API int XsDeviceId_isMtx2(struct XsDeviceId const *thisPtr)
Test if this device ID represents an MTx2.
Definition: xsdeviceid.c:364
XsDeviceId_isMtMk5_200
XSTYPES_DLL_API int XsDeviceId_isMtMk5_200(struct XsDeviceId const *thisPtr)
Test if this device ID represents an MTMk5 200.
Definition: xsdeviceid.c:1316
XsDeviceId_isMtMk5_20
XSTYPES_DLL_API int XsDeviceId_isMtMk5_20(struct XsDeviceId const *thisPtr)
Test if this device ID represents an MTMk5 20.
Definition: xsdeviceid.c:1280
XsDeviceId_isMtMk4_800
XSTYPES_DLL_API int XsDeviceId_isMtMk4_800(struct XsDeviceId const *thisPtr)
Test if this device ID represents an MTMk4 800.
Definition: xsdeviceid.c:1235
XsDeviceId_isSyncStationX
XSTYPES_DLL_API int XsDeviceId_isSyncStationX(struct XsDeviceId const *thisPtr)
Test if this device ID represents a SyncStation.
Definition: xsdeviceid.c:496
XsDeviceId_isMtMk5
XSTYPES_DLL_API int XsDeviceId_isMtMk5(struct XsDeviceId const *thisPtr)
Test if this device ID represents an MTMk5.
Definition: xsdeviceid.c:1253
XsDeviceId_isMtig
XSTYPES_DLL_API int XsDeviceId_isMtig(struct XsDeviceId const *thisPtr)
Test if this device ID represents an MTig device (700 or 710 series)
Definition: xsdeviceid.c:680
XsDeviceId
struct XsDeviceId XsDeviceId
Definition: xsdeviceid.h:912
XsDeviceId_side
XSTYPES_DLL_API XsHandId XsDeviceId_side(struct XsDeviceId const *thisPtr)
Return the side the device should be worn on.
Definition: xsdeviceid.c:261
XsDeviceId_isDot
XSTYPES_DLL_API int XsDeviceId_isDot(struct XsDeviceId const *thisPtr)
Test if the device ID represents a Dot series device.
Definition: xsdeviceid.c:291
XsDeviceId_isMtMk5_100
XSTYPES_DLL_API int XsDeviceId_isMtMk5_100(struct XsDeviceId const *thisPtr)
Test if this device ID represents an MTMk5 100.
Definition: xsdeviceid.c:1307
xstypesconfig.h
XsDeviceId
Contains an Xsens device ID and provides operations for determining the type of device.
Definition: xsdeviceid.h:192
XsDeviceId_fromDeviceTypeString
XSTYPES_DLL_API void XsDeviceId_fromDeviceTypeString(struct XsDeviceId *thisPtr, XsString const *str)
Read a device ID from the supplied string.
Definition: xsdeviceid.c:780
XsDeviceId_type
XSTYPES_DLL_API void XsDeviceId_type(struct XsDeviceId const *thisPtr, struct XsDeviceId *type)
Returns the type of device identified by this id.
Definition: xsdeviceid.c:954
pstdint.h
XsDeviceId_isMtMk4_30
XSTYPES_DLL_API int XsDeviceId_isMtMk4_30(struct XsDeviceId const *thisPtr)
Test if this device ID represents an MTMk4 30.
Definition: xsdeviceid.c:1142
XsDeviceId_isMtMk5_X00
XSTYPES_DLL_API int XsDeviceId_isMtMk5_X00(struct XsDeviceId const *thisPtr)
Test if this device ID represents an MTMk5 100 series.
Definition: xsdeviceid.c:1298
XsDeviceId_isHilDevice
XSTYPES_DLL_API int XsDeviceId_isHilDevice(struct XsDeviceId const *thisPtr)
Test if this device ID represents a Hardware In the Loop test device.
Definition: xsdeviceid.c:512
XsDeviceId_isRugged
XSTYPES_DLL_API int XsDeviceId_isRugged(struct XsDeviceId const *thisPtr)
Test if this device ID represents an Rugged Version.
Definition: xsdeviceid.c:307
std
XsDeviceId::m_subDevice
uint16_t m_subDevice
The index of a sub-device, ie a finger in an Xsens Glove. 1-based, 0 = the whole device (default)
Definition: xsdeviceid.h:909
XsDeviceId_isMtMk4_2
XSTYPES_DLL_API int XsDeviceId_isMtMk4_2(struct XsDeviceId const *thisPtr)
Test if this device ID represents an MTMk4 2.
Definition: xsdeviceid.c:1088
XsDeviceId_isContainerDevice
XSTYPES_DLL_API int XsDeviceId_isContainerDevice(struct XsDeviceId const *thisPtr)
Test if this device ID represents any of the container devices such as Bodypack and Awinda Station.
Definition: xsdeviceid.c:656
XsDeviceId_typeName
XSTYPES_DLL_API void XsDeviceId_typeName(struct XsDeviceId const *thisPtr, XsString *str)
XSTYPES_DLL_API
#define XSTYPES_DLL_API
Definition: xstypesconfig.h:65
XsDeviceId_contains
XSTYPES_DLL_API int XsDeviceId_contains(struct XsDeviceId const *a, struct XsDeviceId const *b)
XSDEPRECATED
#define XSDEPRECATED
Definition: xstypedefs.h:153
operator<<
std::ostream & operator<<(std::ostream &os, JlHexLogger< char > const &hex)
Definition: journaller.cpp:388
XsDeviceId::m_hardwareVersion
uint16_t m_hardwareVersion
The hardware version of a device.
Definition: xsdeviceid.h:908
XsDeviceId_toDeviceTypeString
XSTYPES_DLL_API void XsDeviceId_toDeviceTypeString(struct XsDeviceId const *thisPtr, XsString *str, int makeType)
XsDeviceId::m_deviceId
uint64_t m_deviceId
The serialnumber of a device.
Definition: xsdeviceid.h:905
XsDeviceId_isMtiX
XSTYPES_DLL_API int XsDeviceId_isMtiX(struct XsDeviceId const *thisPtr)
Test if the device ID represents an Mti 1-series device.
Definition: xsdeviceid.c:98
XsDeviceId_hasInternalGnss
XSTYPES_DLL_API int XsDeviceId_hasInternalGnss(struct XsDeviceId const *thisPtr)
Test if this device ID represents a device with internal GNSS receiver.
Definition: xsdeviceid.c:321
XsDeviceId_isGnss
XSTYPES_DLL_API int XsDeviceId_isGnss(struct XsDeviceId const *thisPtr)
Test if this device ID represents an GNSS (capable) device.
Definition: xsdeviceid.c:607
XSDEVICEID_PRODUCT_CODE_LEN
#define XSDEVICEID_PRODUCT_CODE_LEN
Definition: xsdeviceid.h:77
XsDeviceId_isAwinda2Dongle
XSTYPES_DLL_API int XsDeviceId_isAwinda2Dongle(struct XsDeviceId const *thisPtr)
Test if this device ID represents an Awinda2 Dongle.
Definition: xsdeviceid.c:477
XSENS_MSC_WARNING_SUPPRESS
#define XSENS_MSC_WARNING_SUPPRESS(...)
Definition: xstypesconfig.h:89
XsDeviceId_isVru
XSTYPES_DLL_API int XsDeviceId_isVru(struct XsDeviceId const *thisPtr)
Test if this device ID represents a VRU.
Definition: xsdeviceid.c:551
XsDeviceId_isMtw
XSTYPES_DLL_API int XsDeviceId_isMtw(struct XsDeviceId const *thisPtr)
Test if this device ID represents an MTw.
Definition: xsdeviceid.c:337
XsDeviceId_isGlove
XSTYPES_DLL_API int XsDeviceId_isGlove(struct XsDeviceId const *thisPtr)
Test if the device ID represents a Glove series device.
Definition: xsdeviceid.c:239
XsString
A 0-terminated managed string of characters.
XsDeviceId_isMtiX00
XSTYPES_DLL_API int XsDeviceId_isMtiX00(struct XsDeviceId const *thisPtr)
Test if the device ID represents an Mti 100-series device.
Definition: xsdeviceid.c:130
XsDeviceId_isMtigX10
XSTYPES_DLL_API int XsDeviceId_isMtigX10(struct XsDeviceId const *thisPtr)
Test if the device ID represents an Mtig 710 device.
Definition: xsdeviceid.c:174
XsDeviceId_fromString
XSTYPES_DLL_API void XsDeviceId_fromString(struct XsDeviceId *thisPtr, XsString const *str)
Read a device ID from the supplied string.
Definition: xsdeviceid.c:738
XsDeviceId_isMti8X0
XSTYPES_DLL_API int XsDeviceId_isMti8X0(struct XsDeviceId const *thisPtr)
Test if the device ID represents an MTi-800 series device.
Definition: xsdeviceid.c:211
XsDeviceId_isMtigX00
XSTYPES_DLL_API int XsDeviceId_isMtigX00(struct XsDeviceId const *thisPtr)
Test if the device ID represents an Mtig 700 device.
Definition: xsdeviceid.c:154
XSDEPRECATED_START
#define XSDEPRECATED_START
Definition: xstypedefs.h:136
XsDeviceId_isMtMk4_3
XSTYPES_DLL_API int XsDeviceId_isMtMk4_3(struct XsDeviceId const *thisPtr)
Test if this device ID represents an MTMk4 3.
Definition: xsdeviceid.c:1097


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