Go to the documentation of this file.
10 #define USBINTERFACE_H
25 #define _strnicmp strncasecmp
UsbInterface()
Default constructor, initializes all members to their default values.
uint32_t getTimeout(void) const
Return the current timeout value.
struct XsByteArray XsByteArray
XsResultValue open(const XsPortInfo &portInfo, uint32_t readBufSize=0, uint32_t writeBufSize=0)
Open a communication channel to the given USB port name.
bool isOpen(void) const
Return whether the USB communication port is open or not.
Private object for UsbInterface.
void setRawIo(bool enable)
Sets the RAWIO mode of the USB interface.
uint8_t usbAddress() const
The address of the device (libusb/linux only)
GLuint GLsizei GLsizei * length
XsResultValue
Xsens result values.
bool getRawIo(void)
Retrieves the state of the RAWIO mode of the USB interface.
XsResultValue setTimeout(uint32_t ms)
Set the default timeout value to use in blocking operations.
XsResultValue closeUsb(void)
Close the USB communication port.
XsResultValue getLastResult(void) const
Return the error code of the last operation.
GLsizei GLsizei GLenum GLenum const GLvoid * data
An IoInterface for dealing specifically with Xsens USB devices.
virtual XsResultValue writeData(const XsByteArray &data, XsSize *written=nullptr)
Write the data to the USB port.
uint8_t usbBus() const
The USB bus number this device is on (libusb/linux only)
size_t XsSize
XsSize must be unsigned number!
#define XSENS_DISABLE_COPY(className)
Add this macro to the start of a class definition to prevent automatic creation of copy functions.
virtual XsResultValue readData(XsSize maxLength, XsByteArray &data)
Read data from the USB port and put it into the data buffer.
void getPortName(XsString &portname) const
Retrieve the port name that was last successfully opened.
XsResultValue flushData(void)
Flush all data in the buffers to and from the device.
~UsbInterface()
Destructor, de-initializes, frees memory allocated for buffers, etc.
XsResultValue close(void)
Close the USB communication port.
XsResultValue waitForData(XsSize maxLength, void *data, XsSize *length=nullptr)
Wait for data to arrive or a timeout to occur.
virtual XsResultValue waitForData(XsSize maxLength, XsByteArray &data)
Wait for data to arrive or a timeout to occur.
unsigned __int32 uint32_t
Page generated by Doxygen 1.8.17 for MRPT 1.9.9 Git: ad3a9d8ae Tue May 1 23:10:22 2018 -0700 at miƩ 12 jul 2023 10:03:34 CEST | |