Go to the documentation of this file.
65 #ifndef USBINTERFACE_H
66 #define USBINTERFACE_H
~UsbInterface()
Destructor, de-initializes, frees memory allocated for buffers, etc.
A list of uint8_t values.
uint8_t usbBus() const
The USB bus number this device is on (libusb/linux only)
XsResultValue getLastResult(void) const
Return the error code of the last operation.
XsResultValue close(void)
Close the USB communication port.
XsResultValue waitForData(XsFilePos maxLength, void *data, XsFilePos *length=NULL)
Wait for data to arrive or a timeout to occur.
XsResultValue writeData(const XsByteArray &data, XsFilePos *written=NULL) override
Write the data to the USB port.
void getPortName(XsString &portname) const
Retrieve the port name that was last successfully opened.
bool getRawIo(void)
Retrieves the state of the RAWIO mode of the USB interface.
PortOptions
Options for flow control and stopbits which must be used when opening a port.
XsResultValue
Xsens result values.
XsResultValue closeUsb(void)
Close the USB communication port.
uint8_t usbAddress() const
The address of the device (libusb/linux only)
Contains a descriptor for opening a communication port to an Xsens device.
Private object for UsbInterface.
uint32_t getTimeout(void) const
Return the current timeout value.
XsResultValue flushData(void)
Flush all data in the buffers to and from the device.
XsResultValue setTimeout(uint32_t ms)
Set the default timeout value to use in blocking operations.
XsResultValue readData(XsFilePos maxLength, XsByteArray &data) override
Read data from the USB port and put it into the data buffer.
UsbInterface()
Default constructor, initializes all members to their default values.
XSENS_DISABLE_COPY(UsbInterface)
void setRawIo(bool enable)
Sets the RAWIO mode of the USB interface.
XsResultValue open(const XsPortInfo &portInfo, XsFilePos readBufSize=0, XsFilePos writeBufSize=0, PortOptions=PO_XsensDefaults) override
Open a communication channel to the given USB port name.
virtual XsResultValue waitForData(XsFilePos maxLength, XsByteArray &data)
Wait for data to arrive or a timeout to occur.
An IoInterface for dealing specifically with Xsens USB devices.
int64_t XsFilePos
The type that is used for positioning inside a file.
A 0-terminated managed string of characters.
bool isOpen(void) const
Return whether the USB communication port is open or not.