Go to the documentation of this file.
65 #ifndef XSDEVICECONFIGURATION_H
66 #define XSDEVICECONFIGURATION_H
84 #define XSDEVICEINFO_INITIALIZER { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }
85 #define XSDEVICECONFIGURATION_INITIALIZER { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }
135 class XsDeviceConfigurationException :
public XsException
138 XsDeviceConfigurationException() : XsException(
"Invalid device configuration") {}
201 inline bool empty()
const
233 inline bool containsDevice(
const XsDeviceId& deviceId)
const
246 throw XsDeviceConfigurationException();
248 return deviceInfo(busId);
259 throw XsDeviceConfigurationException();
261 return deviceInfo(busId);
273 throw XsDeviceConfigurationException();
279 throw XsDeviceConfigurationException();
293 throw XsDeviceConfigurationException();
299 throw XsDeviceConfigurationException();
326 inline void setNumberOfDevices(
XsSize count)
334 inline XsSize numberOfDevices()
const
342 inline XsSize deviceCount()
const
344 return numberOfDevices();
#define XS_BID_MASTER
The bus identifier of the master device.
char m_filterType
The filter type.
uint8_t m_fwRevRevision
The revision version of the firmware.
void XsDeviceConfiguration_assign(XsDeviceConfiguration *thisPtr, XsSize numberOfDevices, const XsDeviceConfiguration *src)
Reinitializes the XsDeviceConfiguration with space for numberOfDevices devices and copies them from s...
uint16_t m_filterProfile
The currently chosen filter profile.
void XsDeviceConfiguration_destruct(XsDeviceConfiguration *thisPtr)
Clears and frees data in the XsDeviceConfiguration.
Structure containing a full device configuration as returned by the ReqConfig message.
uint64_t m_deviceId
This device ID.
int XsDeviceConfiguration_empty(const XsDeviceConfiguration *thisPtr)
Returns true if the XsDeviceConfiguration is empty.
void XsDeviceConfiguration_writeToMessage(const XsDeviceConfiguration *thisPtr, XsMessage *msg)
Creates a message msg that represents the XsDeviceConfiguration.
uint8_t m_reserved[8]
Reserved space.
uint8_t m_reserved1[8]
Reserved space.
void XsDeviceConfiguration_copy(XsDeviceConfiguration *copy, XsDeviceConfiguration const *src)
Copy the XsDeviceConfiguration to copy.
void XsDeviceConfiguration_construct(XsDeviceConfiguration *thisPtr)
Initializes the XsDeviceConfiguration object.
Device information for the main device in an XsDeviceConfiguration.
uint8_t m_filterMinor
The filter minor version.
uint8_t m_time[8]
The time.
uint8_t m_filterMajor
The filter major version.
uint64_t m_masterDeviceId
The master device ID.
size_t XsSize
XsSize must be unsigned number!
Structure for storing a single message.
uint8_t m_fwRevMajor
The major version of the firmware.
XsMasterDeviceConfiguration m_masterInfo
The master info.
Contains an Xsens device ID and provides operations for determining the type of device.
XsMtDeviceConfiguration *const m_deviceInfo
The list of device infos.
Device information for MT devices in an XsDeviceConfiguration.
XsSize XsDeviceConfiguration_findDevice(const XsDeviceConfiguration *thisPtr, const XsDeviceId *deviceId)
Returns a (naive) bus ID if deviceId is available in this configuration, 0 otherwise.
uint8_t m_reserved2[44]
Reserved space.
uint16_t m_outputSkipFactor
The output skip factor.
uint8_t m_date[8]
The date.
const uint16_t m_numberOfDevices
The currently allocated number of devices.
uint8_t m_fwRevMinor
The minor version of the firmware.
void XsDeviceConfiguration_readFromMessage(XsDeviceConfiguration *thisPtr, const XsMessage *msg)
Sets up a XsDeviceConfiguration based upon msg.
uint8_t m_productCode[20]
The master product code.
struct XsDeviceConfiguration XsDeviceConfiguration
uint16_t m_samplingPeriod
The sampling period.