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