Go to the documentation of this file.
107 return ((deviceFamily != 0) && (deviceFamily < 10));
123 return ((deviceFamily != 0) && ((deviceFamily >= 10) && (deviceFamily < 100)));
139 if ((deviceFamily != 0) && (deviceFamily >= 100 && deviceFamily <= 300))
144 if ((deviceFamily != 0) && (deviceFamily >= 100))
167 return ((deviceFamily != 0) && (deviceFamily == 700));
187 return ((deviceFamily != 0) && (deviceFamily == 710));
204 return ((deviceFamily != 0) && ((deviceFamily > 600) && (deviceFamily < 700)));
221 return ((deviceFamily != 0) && ((deviceFamily > 800) && (deviceFamily < 900)));
538 if (deviceFamily == 0)
541 if (deviceFamily == 6 || deviceFamily == 8)
544 return (deviceFamily == 1);
566 if (deviceFamily == 0)
569 if (deviceFamily == 6 || deviceFamily == 8)
572 return (deviceFamily == 2);
594 if (deviceFamily == 0)
597 if (deviceFamily == 6 || deviceFamily == 8)
600 return (deviceFamily == 3);
621 if (deviceFamily == 7)
623 else if ((deviceFamily == 670) || (deviceFamily == 680) || (deviceFamily == 870) || (deviceFamily == 880))
631 return (deviceFamily == 700 || deviceFamily == 710);
649 return ((deviceFamily == 680) || (deviceFamily == 880));
728 n = (
XsSize)(ptrdiff_t) sprintf(device,
"%010" PRINTF_INT64_MODIFIER
"X/%hu", thisPtr->
m_deviceId, (
unsigned short int) thisPtr->
m_subDevice);
730 n = (
XsSize)(ptrdiff_t) sprintf(device,
"%010" PRINTF_INT64_MODIFIER
"X", thisPtr->
m_deviceId);
742 if (!thisPtr || !str || !str->m_data)
745 if (isalpha(str->m_data[0]))
748 int result = sscanf(str->m_data,
"%" PRINTF_INT64_MODIFIER
"x/%hu", &tmp, &sub);
767 deviceType = *thisPtr;
783 int hwRevH = 0, hwRevL = 0;
785 char productCode[24];
786 if (!thisPtr || !str || !str->m_data)
788 int result = sscanf(str->m_data,
"%24[^_]_%08X.%08X.%d_%d", productCode, &
id, &variant, &hwRevH, &hwRevL);
789 if (result == 5 || result == 3)
792 thisPtr->
m_hardwareVersion = (uint16_t)((uint16_t)hwRevH << 8) + (uint16_t)hwRevL;
826 if (thisPtr == other)
int XsDeviceId_isMtMk5_10(const struct XsDeviceId *thisPtr)
Test if this device ID represents an MTMk5 10.
#define XS_DID_GLOVEMASTER_RIGHT
int XsDeviceId_isAwindaX(const struct XsDeviceId *thisPtr)
Test if this device ID represents an Awinda device.
#define XS_DID_MK4TYPE_MT_100
int XsDeviceId_isMtMk4_100(const struct XsDeviceId *thisPtr)
Test if this device ID represents an MTMk4 100.
#define XS_DID_MK4TYPE_MT_10
int XsDeviceId_isMt(const struct XsDeviceId *thisPtr)
Test if this device ID represents an MT device (any Mti, Mtig, Mtx or Mtw)
int XsDeviceId_isMtMk5_X0(const struct XsDeviceId *thisPtr)
Test if this device ID represents an MTMk5 10 series.
void XsDeviceId_toString(const XsDeviceId *thisPtr, XsString *str)
Get a string with a readable representation of this device ID.
int XsDeviceId_isMtMk4_X(const struct XsDeviceId *thisPtr)
Test if this device ID represents an MTMk4 1 series.
#define XS_DID_TYPEH_AWINDAMASTER
#define XS_DID_TYPEL_MASK
#define XS_DID_TYPEH_MT_X00
int XsDeviceId_isAwindaXDongle(const struct XsDeviceId *thisPtr)
Test if this device ID represents an Awinda Dongle.
#define XS_DID_MK4TYPE_MT_300
#define PRINTF_INT32_MODIFIER
char m_productCode[XSDEVICEID_PRODUCT_CODE_LEN]
The productcode of a device.
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)
int XsDeviceId_isBodyPackV2(const struct XsDeviceId *thisPtr)
Test if this device ID represents a bodypack V2 device.
int XsDeviceId_isMtMk4_10(const struct XsDeviceId *thisPtr)
Test if this device ID represents an MTMk4 10.
int XsDeviceId_isLegacyDeviceId(const struct XsDeviceId *thisPtr)
Test if the device ID represents a legacy device identification.
int XsDeviceId_isMtMk5_300(const struct XsDeviceId *thisPtr)
Test if this device ID represents an MTMk5 300.
#define XS_DID_MK4TYPE_MT_900
int XsDeviceId_isAwinda2Station(const struct XsDeviceId *thisPtr)
Test if this device ID represents an Awinda2 Station.
#define XS_DID_SYNCSTATION(did)
@ XHI_RightHand
The Right Hand.
void XsDeviceId_swap(XsDeviceId *a, XsDeviceId *b)
Swap the contents of a with those of b.
int XsDeviceId_isMtMk4_500(const struct XsDeviceId *thisPtr)
Test if this device ID represents an MTMk4 500.
int XsDeviceId_isAwindaXOem(const struct XsDeviceId *thisPtr)
Test if this device ID represents an Awinda OEM board.
int XsDeviceId_isMtMk4_700(const struct XsDeviceId *thisPtr)
Test if this device ID represents an MTMk4 700.
int XsDeviceId_isBodyPackV1(const struct XsDeviceId *thisPtr)
Test if this device ID represents a bodypack V1 device.
int XsDeviceId_isMtx(const struct XsDeviceId *thisPtr)
Test if this device ID represents an MTx.
int XsDeviceId_isSyncStation2(const struct XsDeviceId *thisPtr)
Test if this device ID represents a SyncStation v2.
int XsDeviceId_isMti3X0(const struct XsDeviceId *thisPtr)
Test if the device ID represents an MTi-3X0 device.
#define XS_DID_MK4TYPE_MT_2_MPU
int XsDeviceId_isMtMk5_710(const struct XsDeviceId *thisPtr)
Test if this device ID represents an MTMk5 710.
XsHandId
This is an enumerator that contains the left and right hand.
int XsDeviceId_isMtMk4_300(const struct XsDeviceId *thisPtr)
Test if this device ID represents an MTMk4 300.
int XsDeviceId_isMti(const struct XsDeviceId *thisPtr)
Test if this device ID represents an MTi device (1, 10 or 100 series, 1 includes MTi-7)
int XsDeviceId_isMtMk5_30(const struct XsDeviceId *thisPtr)
Test if this device ID represents an MTMk5 30.
#define XS_DID_MK4TYPE_MT_20
#define XS_DID_AWINDA2(did)
#define XS_DID_MK4TYPE_MT_700
int XsDeviceId_isMtiX0(const struct XsDeviceId *thisPtr)
Test if the device ID represents an Mti 10-series device.
int XsDeviceId_isMtMk4_200(const struct XsDeviceId *thisPtr)
Test if this device ID represents an MTMk4 200.
#define XS_DID_AWINDA2_STATION(did)
#define XS_DID_MK4TYPE_MT_600
#define XS_DID_MK4TYPE_MT_200
int XsDeviceId_isBodyPack(const struct XsDeviceId *thisPtr)
Test if this device ID represents a bodypack (any version) device.
int XsDeviceId_isMtMk4_400(const struct XsDeviceId *thisPtr)
Test if this device ID represents an MTMk4 400.
int XsDeviceId_isMtMark4(const struct XsDeviceId *thisPtr)
Test if this device ID represents an Mk4 generation MT device.
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)
int XsDeviceId_isMtMk4_X0(const struct XsDeviceId *thisPtr)
Test if this device ID represents an MTMk4 10 series.
int XsDeviceId_isMtMk4(const struct XsDeviceId *thisPtr)
Test if this device ID represents an MTMk4.
int XsDeviceId_isAwinda2(const struct XsDeviceId *thisPtr)
Test if this device ID represents an Awinda2 device.
#define XS_DID_MK4TYPE_MT_330
int XsDeviceId_isMtw2(const struct XsDeviceId *thisPtr)
Test if this device ID represents an MTw2.
int XsDeviceId_isRtk(const struct XsDeviceId *thisPtr)
Test if this device ID represents an RTK (capable) device.
#define XS_DID_FULLTYPE_MASK
int XsDeviceId_isMtMk4_900(const struct XsDeviceId *thisPtr)
Test if this device ID represents an MTMk4 900.
int XsDeviceId_isWirelessMaster(const struct XsDeviceId *thisPtr)
Test if this device ID represents a Wireless Master device (Awinda Station, Awinda Dongle,...
#define XS_DID_BODYPACK(did)
int XsDeviceId_isImu(const struct XsDeviceId *thisPtr)
Test if this device ID represents an IMU.
#define XS_DID_TYPEH_MASK
int XsDeviceId_isMtMk4_7(const struct XsDeviceId *thisPtr)
Test if this device ID represents an MTMk4 7.
int XsDeviceId_isMtMk4_600(const struct XsDeviceId *thisPtr)
Test if this device ID represents an MTMk4 600.
int XsDeviceId_isAwinda2Oem(const struct XsDeviceId *thisPtr)
Test if this device ID represents an Awinda2 OEM board.
int XsDeviceId_isMtMk4_20(const struct XsDeviceId *thisPtr)
Test if this device ID represents an MTMk4 20.
#define XS_DID_MK4TYPE_MT_400
#define XsString_INITIALIZER
int XsDeviceId_isMtMk4_1(const struct XsDeviceId *thisPtr)
Test if this device ID represents an MTMk4 1.
uint64_t XsDeviceId_legacyBit(const struct XsDeviceId *thisPtr)
int XsDeviceId_isValid(const struct XsDeviceId *thisPtr)
Test if the device ID is a valid id (not 0).
int XsDeviceId_isMtMark5(const struct XsDeviceId *thisPtr)
Test if this device ID represents an Mk5 generation MT device.
#define XS_DID_AWINDA2_OEM(did)
void XsDeviceId_typeName(XsDeviceId const *thisPtr, XsString *str)
Returns the name of the type of device identified by this id.
#define XS_DID_MK4TYPE_MASK
int XsDeviceId_isMtMk4_X00(const struct XsDeviceId *thisPtr)
Test if this device ID represents an MTMk4 100 series (including 700 and 710)
int XsDeviceId_isAwindaXStation(const struct XsDeviceId *thisPtr)
Test if this device ID represents an Awinda Station.
uint32_t m_productVariant
The product variant of a device.
#define XS_DID_MK4TYPE_MT_7_MPU
int XsDeviceId_isMtMk4_710(const struct XsDeviceId *thisPtr)
Test if this device ID represents either an MTMk4 710 or Mk5 710.
#define XS_DID_MK4TYPE_MT_320
int XsDeviceId_isAhrs(const struct XsDeviceId *thisPtr)
Test if this device ID represents an AHRS.
int XsDeviceId_isMti6X0(const struct XsDeviceId *thisPtr)
Test if the device ID represents an MTi-600 series device.
#define XS_DID_MK4TYPE_MT_500
int XsDeviceId_isMtx2(const struct XsDeviceId *thisPtr)
Test if this device ID represents an MTx2.
int XsDeviceId_isMtMk5_200(const struct XsDeviceId *thisPtr)
Test if this device ID represents an MTMk5 200.
@ XHI_Unknown
Used as uninitialized or unknown side.
int XsDeviceId_isMtMk5_20(const struct XsDeviceId *thisPtr)
Test if this device ID represents an MTMk5 20.
int XsDeviceId_isMtMk4_800(const struct XsDeviceId *thisPtr)
Test if this device ID represents an MTMk4 800.
int XsDeviceId_isSyncStationX(const struct XsDeviceId *thisPtr)
Test if this device ID represents a SyncStation.
int XsDeviceId_isMtMk5(const struct XsDeviceId *thisPtr)
Test if this device ID represents an MTMk5.
#define XS_DID_AWINDA2_DONGLE(did)
#define XS_DID_TYPEL_COMM_MASK
int XsDeviceId_isMtig(const struct XsDeviceId *thisPtr)
Test if this device ID represents an MTig device (700 or 710 series)
size_t XsSize
XsSize must be unsigned number!
#define XS_DID_MK4TYPE_MT_30
XsHandId XsDeviceId_side(struct XsDeviceId const *thisPtr)
Return the side the device should be worn on.
@ XHI_LeftHand
The Left Hand.
int XsDeviceId_isDot(struct XsDeviceId const *thisPtr)
Test if the device ID represents a Dot series device.
#define XS_DID_MK4TYPE_MT_8_MPU
int XsDeviceId_isMtMk5_100(const struct XsDeviceId *thisPtr)
Test if this device ID represents an MTMk5 100.
#define XS_DID_TYPEH_MT_X0
#define XS_DID_GLOVEMASTER_LEFT
Contains an Xsens device ID and provides operations for determining the type of device.
void XsDeviceId_fromDeviceTypeString(XsDeviceId *thisPtr, const XsString *str)
Read a device ID from the supplied string.
void XsDeviceId_type(struct XsDeviceId const *thisPtr, struct XsDeviceId *type)
Returns the type of device identified by this id.
int XsDeviceId_isMtMk4_30(const struct XsDeviceId *thisPtr)
Test if this device ID represents an MTMk4 30.
#define XS_DID_MK4TYPE_MT_710_RANGE_START
int XsDeviceId_isMtMk5_X00(const struct XsDeviceId *thisPtr)
Test if this device ID represents an MTMk5 100 series.
int XsDeviceId_isHilDevice(const struct XsDeviceId *thisPtr)
Test if this device ID represents a Hardware In the Loop test device.
int XsDeviceId_contains(XsDeviceId const *thisPtr, XsDeviceId const *other)
Returns true if this is equal to other or this is a type-specifier that matches other.
#define XS_DID_MK4TYPE_MT_800
#define XS_DID_ABMCLOCKMASTER
int XsDeviceId_isRugged(struct XsDeviceId const *thisPtr)
Test if this device ID represents an Rugged Version.
uint16_t m_subDevice
The index of a sub-device, ie a finger in an Xsens Glove. 1-based, 0 = the whole device (default)
#define XS_DID_MK4TYPE_MT_1_MPU
int XsDeviceId_isMtMk4_2(const struct XsDeviceId *thisPtr)
Test if this device ID represents an MTMk4 2.
int XsDeviceId_isContainerDevice(const struct XsDeviceId *thisPtr)
Test if this device ID represents any of the container devices such as Bodypack and Awinda Station.
int XsDeviceId_isType(XsDeviceId const *thisPtr)
Returns true if the ID is just a device type, not an actual device ID.
#define XS_DID_MK4TYPE_MT_3_MPU
void XsString_assignCharArray(XsString *thisPtr, const char *src)
This function determines the size of src and copies the contents to the object.
uint16_t m_hardwareVersion
The hardware version of a device.
uint64_t m_deviceId
The serialnumber of a device.
TF2SIMD_FORCE_INLINE tf2Scalar length(const Quaternion &q)
int XsDeviceId_isMtiX(const struct XsDeviceId *thisPtr)
Test if the device ID represents an Mti 1-series device.
int XsDeviceId_hasInternalGnss(struct XsDeviceId const *thisPtr)
Test if this device ID represents a device with internal GNSS receiver.
int XsDeviceId_isGnss(const struct XsDeviceId *thisPtr)
Test if this device ID represents an GNSS (capable) device.
#define XS_DID_TYPEH_MT_3X0
int XsDeviceId_isAwinda2Dongle(const struct XsDeviceId *thisPtr)
Test if this device ID represents an Awinda2 Dongle.
#define XSDEVICEID_INITIALIZER
int XsDeviceId_isVru(const struct XsDeviceId *thisPtr)
Test if this device ID represents a VRU.
#define XS_DID_TYPEH_MT_X_MPU
int XsDeviceId_isMtw(const struct XsDeviceId *thisPtr)
Test if this device ID represents an MTw.
int XsDeviceId_isGlove(const struct XsDeviceId *thisPtr)
Test if the device ID represents a Glove series device.
#define XS_DID_MK4TYPE_MT_310
void XsString_assign(XsString *thisPtr, XsSize count, const char *src)
Reinitializes the XsArray with space for count items and copies them from src.
A 0-terminated managed string of characters.
int XsDeviceId_isMtiX00(const struct XsDeviceId *thisPtr)
Test if the device ID represents an Mti 100-series device.
#define XS_DID_SYNCSTATION2(did)
int XsDeviceId_isMtigX10(const struct XsDeviceId *thisPtr)
Test if the device ID represents an Mtig 710 device.
void XsDeviceId_fromString(XsDeviceId *thisPtr, const XsString *str)
Read a device ID from the supplied string.
int XsDeviceId_isMti8X0(const struct XsDeviceId *thisPtr)
Test if the device ID represents an MTi-800 series device.
int XsDeviceId_isMtigX00(const struct XsDeviceId *thisPtr)
Test if the device ID represents an Mtig 700 device.
void XsDeviceId_toDeviceTypeString(const XsDeviceId *thisPtr, XsString *str, int makeType)
Get a string with a readable representation of this device ID. Either full or as a type.
int XsDeviceId_isMtMk4_3(const struct XsDeviceId *thisPtr)
Test if this device ID represents an MTMk4 3.