Go to the documentation of this file.
65 #ifndef XSCONTROL_DEF_H
66 #define XSCONTROL_DEF_H
126 #ifndef XsensThreadReturn
127 #define XsensThreadReturn XSENS_THREAD_RETURN // for generator
128 #define XsensThreadParam XSENS_THREAD_PARAM // for generator
149 #ifndef XSENS_NO_PORT_NUMBERS
156 #ifndef XSENS_NO_PORT_NUMBERS
174 virtual std::vector<XsDeviceId>
mtDeviceIds()
const;
175 virtual std::vector<XsDeviceId>
deviceIds()
const;
std::vector< XsDevice * > m_deviceList
This list contains device-information and cached data per device.
XsResultValue startRestoreCommunication(const XsString &portName)
Starts restore communication procedure.
XsDeviceId dockDeviceId(const XsDeviceId &deviceId) const
Get the device ID of the dock device for the given deviceId.
A readers-writer mutex class.
class XSNOEXPORT EmtsManager
A class that represents a vector of real numbers.
void close()
Close all ports and files.
XsDeviceId lastHardwareErrorDeviceId() const
bool m_useFakeMessages
Boolean variable for enabling/disabling the use of fake messages.
A list of uint8_t values.
bool openPort(const XsString &portname, XsBaudRate baudrate, uint32_t timeout=0, bool detectRs485=false)
Open a communication channel on serial port with the given portname.
Structure that contains callback functions for the Xsens Device API.
bool setInitialPositionLLA(const XsVector &lla)
Sets the current GNSS position of the system.
XsOption disabledOptions() const
Return the currently explicitly disabled options.
virtual bool isDeviceDocked(const XsDeviceId &deviceId) const
Test if the given deviceId is docked.
virtual bool loadFilterProfiles(const XsString &filename)
Load filter profile definitions from a settings file with the given filename.
int mainDeviceCount() const
Get the number of main devices.
void setOptionsForce(XsOption enabled)
Peristently enable or disable options.
Structure containing a full device configuration as returned by the ReqConfig message.
bool openCustomPort(int channelId, uint32_t channelLatency, bool detectRs485=false)
Open a custom communication channel.
virtual std::vector< XsDeviceId > deviceIds() const
Get the device IDs of all the connected devices.
void closePort(const XsString &portname)
Close the serial port with the given portname.
bool openLogFile(const XsString &filename)
Open the log file with the given filename.
void stopRestoreCommunication()
Stops restore communication procedure.
bool openPortWithCredentials(XsPortInfo &portinfo, XsString const &id, XsString const &key, uint32_t timeout=0)
Open a communication channel using the details in the supplied XsPortInfo structure using the supplie...
Contains an interpreted data message. The class provides easy access to the contained data through it...
High level Motion Tracker (MT) management class.
void closeCustomPort(int channelId)
Closes a custom communication channel.
XsResultValue lastResult() const
Get the result value of the last operation.
XdaCommunicatorFactory * m_communicatorFactory
The communicator factory object.
DeviceFactory * m_deviceFactory
The device factory object.
Intimately entangled class with XsControl that allows broadcasting to all main devices.
static XSNOEXPORT XsControl * construct()
void removeCallbackHandler(XsCallbackPlainC *cb, bool chain=true)
Remove a handler from the list.
XsDevicePtrArray mainDevices() const
Returns all main XsDevice interface objects.
XsOption
Xda options, used to control the kind of data processing done by XDA.
XsResultValue
Xsens result values.
RestoreCommunication * m_restoreCommunication
The restore communication object.
void setOptions(XsOption enable, XsOption disable)
Peristently enable or disable options.
XsOption m_optionsDisable
Contsins all disabled options.
void closePortByIndex(uint32_t index)
volatile std::atomic_bool m_recording
AwindaStationIndication of threads started or not.
~XsControl()
Destroy this XsControl object.
XsOption enabledOptions() const
Return the currently enabled options.
A structure for storing all xsens sync settings.
Contains information about an available filter profile.
A base struct for a communication interface.
XsDeviceId m_lastHwErrorDeviceId
Contains the XsDevice ID of the device that caused the last hardware error.
enum XsBaudRate XsBaudRate
Communication speed.
Pure virtual base class for N-argument specific function forwarding.
Contains a descriptor for opening a communication port to an Xsens device.
Macros and types for use in the Xsens communication protocol and Xsens Device API classes.
LastResultManager m_lastResult
The last result of an operation.
XSNOEXPORT void destruct()
std::map< int, ProxyCommunicator * > m_proxyChannels
This map contains the proxy channels.
XsString lastResultText() const
Get the accompanying error text for the value returned by lastResult()
XsOption m_optionsEnable
Contains all enable options.
virtual std::vector< XsDeviceId > mtDeviceIds() const
Get the device IDs of the available MTs.
Communicator * findXbusInterface(const XsDeviceId &deviceId) const
Find the xs3 info of the given id.
virtual XsDevice *XSNOCOMEXPORT addMasterDevice(Communicator *communicator)
virtual void removeExistingDevice(XsDeviceId const &deviceId)
std::vector< XsDeviceId > mainDeviceIds() const
Get the device IDs of the available main devices.
virtual bool XSNOEXPORT finalizeOpenPort(Communicator *communicator, XsPortInfo &portinfo, uint32_t timeout, bool detectRs485)
XsDevice * getDeviceFromLocationId(uint16_t locationId) const
Get the device of the device on the given locationId.
virtual int mtCount() const
Get the number of connected MTs.
void updateRecordingState()
XsDevice * broadcast() const
Returns the broadcast device.
Structure for storing a single message.
XsDevice * device(const XsDeviceId &deviceId) const
Returns the XsDevice interface object associated with the supplied deviceId.
A list of XsPortInfo values.
void gotoMeasurement()
Place all sensors connected through a serial port into Measurement Mode.
int deviceCount() const
Get the number of connected devices.
XsResultValue lastHardwareError() const
Get the last hardware error code.
XsResultValue m_lastHwError
Contains the last serious error reported by CMT3.
Contains an Xsens device ID and provides operations for determining the type of device.
A list of XsDevicePtr values.
XsPortInfo customPortInfo(int channelId) const
Returns the port information for a custom communication channel.
void clearHardwareError()
Clear the last hardware error.
void gotoConfig()
Place all sensors connected through a serial port into Configuration Mode.
virtual bool isDeviceWireless(const XsDeviceId &deviceId) const
Test if the given deviceId is an MTw and if it is wirelessly connected.
void flushInputBuffers()
Clear the inbound data buffers of all devices.
Performs restore communication procedure with a provided COM port.
XsControl()
Construct a new Xsens Device API control object.
void setPersistentSettings(XsDevice *dev)
virtual bool openImarPort_internal(const XsString &portname, XsBaudRate baudrate, int imarType, uint32_t timeout=0)
Open a communication channel on serial port with the given portname.
This class manages a result code with optional additional text.
A class that represents a fixed size (3) vector.
XsDevice * findDevice(const XsDeviceId &deviceId) const
XDA communication factory.
xsens::MutexReadWrite m_portMutex
Controls access to the serial ports, also used to suspend the thread.
Class that delegates callbacks to registered XsCallbackHandlerItems.
XsVector3 m_latLonAlt
This vector contains the latitude, longitude and altitude.
static XsString resultText(XsResultValue resultCode)
Get a descriptive text for the given resultCode.
BroadcastDevice * m_broadcaster
The broadcast device object.
A Factory for the devices.
A 0-terminated managed string of characters.
void transmissionReceived(int channelId, const XsByteArray &data)
Feed data coming back from an Xsens device over a custom channel into XDA.
xsens::Mutex m_runMutex
Always held by the thread when it is running.
void clearCallbackHandlers(bool chain=true)
Clear the callback list.
void addCallbackHandler(XsCallbackPlainC *cb, bool chain=true)
Add a handler to the list.
class XSNOEXPORT NetworkScanner