Go to the documentation of this file.
75 #define XSENS_VENDOR_ID 0x2639
76 #define FTDI_VENDOR_ID 0x0403 // needed for Xsens USB-serial converters
104 #if defined(_MSC_VER)
105 #pragma warning(push)
106 #pragma warning(disable : 4996)
155 if (portname.size() < 255)
159 #ifndef XSENS_NO_PORT_NUMBERS
185 inline bool empty()
const
191 inline bool operator > (
const XsPortInfo& p)
const
197 inline bool operator < (
const XsPortInfo& p)
const
215 inline int portNumber()
const
229 inline char const* portName_c_str()
const
236 inline void setPortName(
const XsString& portName_)
242 inline bool isUsb()
const
248 inline bool isBluetooth()
const
254 inline bool isNetwork()
const
260 inline XsString networkServiceName()
const
266 inline XsString bluetoothAddress()
const
272 inline int usbBus()
const
278 inline int usbAddress()
const
327 inline void getVidPid(uint16_t& vid, uint16_t& pid)
const
335 inline void setVidPid(uint16_t vid, uint16_t pid)
351 #if defined(_MSC_VER)
355 #if defined(__cplusplus) && !defined(XSENS_NO_STL)
359 template<
typename _CharT,
typename _Traits>
360 basic_ostream<_CharT, _Traits>&
operator<<(basic_ostream<_CharT, _Traits>& o,
XsPortInfo const& xpi)
364 o <<
"port " << xpi.portName();
366 o <<
" at " << xpi.baudrate() <<
" bps";
367 if (xpi.deviceId() != 0)
368 o <<
" (" << xpi.deviceId() <<
")";
int XsPortInfo_usbAddress(const struct XsPortInfo *thisPtr)
The usb address.
const char * XsPortInfo_networkServiceName(const struct XsPortInfo *thisPtr)
Returns the network service name of this port.
XsPortLinesOptions m_linesOptions
The hardware flow control lines options for the port.
int XsPortInfo_usbBus(const struct XsPortInfo *thisPtr)
The usb bus.
XsDeviceId m_deviceId
The device Id of main Xsens device detected on the port.
int XsPortInfo_empty(const struct XsPortInfo *thisPtr)
Returns true if the XsPortInfo object is empty.
XsBaudRate m_baudrate
The baudrate at which an Xsens device was detected, may be XBR_Invalid for pure USB ports.
int XsPortInfo_portNumber(const struct XsPortInfo *thisPtr)
The port number.
bool operator==(const XsFilterProfile &lhs, const XsFilterProfile &rhs)
Returns true if lhs has the same type as rhs.
struct XsPortInfo XsPortInfo
const char * XsPortInfo_bluetoothAddress(const struct XsPortInfo *thisPtr)
Returns the bluetooth address.
enum XsBaudRate XsBaudRate
Communication speed.
Contains a descriptor for opening a communication port to an Xsens device.
uint16_t m_pid
The USB Vendor Id and Hardware Id of this connection, when available.
char m_portName[256]
The port name.
Contains an Xsens device ID and provides operations for determining the type of device.
void XsPortInfo_clear(XsPortInfo *thisPtr)
Initializes the object to the empty state.
int XsPortInfo_isNetwork(const struct XsPortInfo *thisPtr)
Returns true if this port info object contains a network device.
XSTYPES_DLL_API void XsPortInfo_swap(XsPortInfo *a, struct XsPortInfo *b)
Swap the contents of a with those of b.
std::ostream & operator<<(std::ostream &os, JlHexLogger< char > const &hex)
int XsPortInfo_isUsb(const struct XsPortInfo *thisPtr)
Returns true if this port info object contains a USB device.
XBR_Invalid
Not a valid baud rate.
A 0-terminated managed string of characters.
int XsPortInfo_isBluetooth(const struct XsPortInfo *thisPtr)
Returns true if this port info object contains a bluetooth device.