Main MRPT website > C++ reference for MRPT 1.9.9
List of all members | Classes | Public Member Functions | Static Public Member Functions | Public Attributes
UsbInterfacePrivate Class Reference

Detailed Description

Private object for UsbInterface.

Definition at line 35 of file usbinterface.cpp.

Classes

class  UsbContext
 A context manager for libusb. More...
 

Public Member Functions

XsResultValue libusbErrorToXrv (int libusbError, XsResultValue hint=XRV_ERROR)
 Map a libusb_error to XsResultValue. More...
 
const char * libusbErrorToString (int libusbError)
 Convert a libusb error to a human-readable string. More...
 

Static Public Member Functions

static UsbContextgetContextManager ()
 

Public Attributes

uint32_t m_endTime
 The time at which an operation will end in ms, used by several functions. More...
 
XsResultValue m_lastResult
 The last result of an operation. More...
 
uint32_t m_timeout
 
int m_interfaceCount
 
int m_interface
 
int m_dataInEndPoint
 
int m_dataOutEndPoint
 
char m_portname [256]
 
libusb_device_handle * m_deviceHandle
 

Member Function Documentation

◆ getContextManager()

static UsbContext& UsbInterfacePrivate::getContextManager ( )
inlinestatic

◆ libusbErrorToString()

const char* UsbInterfacePrivate::libusbErrorToString ( int  libusbError)
inline

Convert a libusb error to a human-readable string.

Definition at line 173 of file usbinterface.cpp.

Referenced by UsbInterface::readData(), and UsbInterface::writeData().

Here is the caller graph for this function:

◆ libusbErrorToXrv()

XsResultValue UsbInterfacePrivate::libusbErrorToXrv ( int  libusbError,
XsResultValue  hint = XRV_ERROR 
)
inline

Map a libusb_error to XsResultValue.

param libusbError [in] the result code to convert param hint give a hint for the code to return when in doubt

Definition at line 122 of file usbinterface.cpp.

References XRV_INVALIDOPERATION, XRV_INVALIDPARAM, XRV_NOPORTOPEN, XRV_NOTFOUND, XRV_NOTIMPLEMENTED, XRV_OK, XRV_OUTOFMEMORY, XRV_TIMEOUT, and XRV_UNEXPECTEDMSG.

Referenced by UsbInterface::open(), UsbInterface::readData(), and UsbInterface::writeData().

Here is the caller graph for this function:

Member Data Documentation

◆ m_dataInEndPoint

int UsbInterfacePrivate::m_dataInEndPoint

◆ m_dataOutEndPoint

int UsbInterfacePrivate::m_dataOutEndPoint

◆ m_deviceHandle

libusb_device_handle* UsbInterfacePrivate::m_deviceHandle

◆ m_endTime

uint32_t UsbInterfacePrivate::m_endTime

The time at which an operation will end in ms, used by several functions.

Definition at line 45 of file usbinterface.cpp.

Referenced by UsbInterface::closeUsb(), UsbInterface::flushData(), UsbInterface::open(), and UsbInterface::UsbInterface().

◆ m_interface

int UsbInterfacePrivate::m_interface

Definition at line 54 of file usbinterface.cpp.

Referenced by UsbInterface::closeUsb(), and UsbInterface::open().

◆ m_interfaceCount

int UsbInterfacePrivate::m_interfaceCount

Definition at line 53 of file usbinterface.cpp.

Referenced by UsbInterface::closeUsb(), and UsbInterface::open().

◆ m_lastResult

XsResultValue UsbInterfacePrivate::m_lastResult

◆ m_portname

char UsbInterfacePrivate::m_portname[256]

◆ m_timeout

uint32_t UsbInterfacePrivate::m_timeout

The default timeout value to use during blocking operations. A value of 0 means that all operations become non-blocking.

Definition at line 51 of file usbinterface.cpp.

Referenced by UsbInterface::getTimeout(), UsbInterface::readData(), UsbInterface::setTimeout(), UsbInterface::UsbInterface(), and UsbInterface::waitForData().




Page generated by Doxygen 1.8.14 for MRPT 1.9.9 Git: ae4571287 Thu Nov 23 00:06:53 2017 +0100 at dom oct 27 23:51:55 CET 2019