class axl::io::UsbDevice
#include <axl_io_UsbDevice.h>
class UsbDevice
{
public:
// enums
enum Def;
// construction
UsbDevice();
~UsbDevice();
// methods
libusb_device*
getDevice();
libusb_device_handle*
getOpenHandle();
bool
isOpen();
uint8_t
getDeviceAddress();
uint8_t
getBusNumber();
libusb_speed
getDeviceSpeed();
size_t
getMaxPacketSize(uint_t endpointId);
size_t
getMaxIsoPacketSize(uint_t endpointId);
void
refDevice();
void
unrefDevice();
void
setDevice(libusb_device* device);
void
close();
bool
open();
bool
open(libusb_device* device);
bool
open(
uint_t vendorId,
uint_t productId
);
bool
open(
libusb_context* context,
uint_t vendorId,
uint_t productId
);
uint_t
getConfiguration();
bool
setConfiguration(uint_t configurationId);
bool
claimInterface(uint_t ifaceId);
bool
releaseInterface(uint_t ifaceId);
bool
setInterfaceAltSetting(
uint_t ifaceId,
uint_t altSettingId
);
bool
clearHalt(uint_t endpointId);
bool
resetDevice();
bool
isKernelDriverActive(uint_t ifaceId);
bool
attachKernelDriver(uint_t ifaceId);
bool
detachKernelDriver(uint_t ifaceId);
bool
setAutoDetachKernelDriver(bool isAutoDetach);
sl::Array<char>
getDescriptor(
libusb_descriptor_type descriptorType,
uint_t descriptorId
);
bool
getDescriptor(
libusb_descriptor_type descriptorType,
uint_t descriptorId,
sl::Array<char>* descriptor
);
bool
getDeviceDescriptor(libusb_device_descriptor* descriptor);
bool
getConfigDescriptor(
uint_t configurationId,
UsbConfigDescriptor* desc
);
bool
getActiveConfigDescriptor(UsbConfigDescriptor* desc);
sl::String
getStringDesrciptor(
uint_t stringId,
uint_t langId
);
bool
getStringDesrciptor(
uint_t stringId,
uint_t langId,
sl::String* string
);
sl::String
getStringDesrciptor(uint_t stringId);
bool
getStringDesrciptor(
uint_t stringId,
sl::String* string
);
size_t
controlTransfer(
uint_t requestType,
uint_t requestCode,
uint_t value,
uint_t index,
void* p,
size_t size,
uint_t timeout = -1
);
size_t
bulkTransfer(
uint_t endpointId,
void* p,
size_t size,
uint_t timeout = -1
);
size_t
interruptTransfer(
uint_t endpointId,
void* p,
size_t size,
uint_t timeout = -1
);
};