#include <UsbDevice.h>
|
| typedef boost::function< void(const void *data, int size)> | Callback |
| |
|
| int | bulkRead (void *data, int size, unsigned char endpoint, int timeout) |
| |
| bool | bulkWrite (const void *data, int size, unsigned char endpoint, int timeout) |
| |
| void | close () |
| |
| int | getLastError (std::string &str) const |
| |
| Location | getLocation () const |
| |
| int | interruptRead (void *data, int size, unsigned char endpoint, int timeout) |
| |
| bool | interruptWrite (const void *data, int size, unsigned char endpoint, int timeout) |
| |
| bool | isOpen () const |
| |
| void | listDevices (std::vector< Location > &list) const |
| |
| bool | open (const Location &location=Location()) |
| |
| void | setDebugLevel (uint8_t level) |
| |
| void | setDevceIds (uint16_t vid, uint16_t pid, uint8_t mi) |
| |
| void | startBulkReadThread (Callback callback, unsigned char endpoint) |
| |
| void | startInterruptReadThread (Callback callback, unsigned char endpoint) |
| |
| void | stopBulkReadThread (unsigned char endpoint) |
| |
| void | stopInterruptReadThread (unsigned char endpoint) |
| |
| | UsbDevice () |
| |
| | UsbDevice (uint16_t vid, uint16_t pid) |
| |
| | UsbDevice (uint16_t vid, uint16_t pid, uint8_t mi) |
| |
| | ~UsbDevice () |
| |
Definition at line 58 of file UsbDevice.h.
◆ Callback
◆ UsbDevice() [1/3]
| lusb::UsbDevice::UsbDevice |
( |
uint16_t |
vid, |
|
|
uint16_t |
pid, |
|
|
uint8_t |
mi |
|
) |
| |
◆ UsbDevice() [2/3]
| lusb::UsbDevice::UsbDevice |
( |
uint16_t |
vid, |
|
|
uint16_t |
pid |
|
) |
| |
◆ UsbDevice() [3/3]
| lusb::UsbDevice::UsbDevice |
( |
| ) |
|
◆ ~UsbDevice()
| lusb::UsbDevice::~UsbDevice |
( |
| ) |
|
◆ bulkRead()
| int lusb::UsbDevice::bulkRead |
( |
void * |
data, |
|
|
int |
size, |
|
|
unsigned char |
endpoint, |
|
|
int |
timeout |
|
) |
| |
◆ bulkReadThread()
| void lusb::UsbDevice::bulkReadThread |
( |
Callback |
callback, |
|
|
unsigned char |
endpoint |
|
) |
| |
|
private |
◆ bulkWrite()
| bool lusb::UsbDevice::bulkWrite |
( |
const void * |
data, |
|
|
int |
size, |
|
|
unsigned char |
endpoint, |
|
|
int |
timeout |
|
) |
| |
◆ close()
| void lusb::UsbDevice::close |
( |
| ) |
|
◆ closeDevice()
| void lusb::UsbDevice::closeDevice |
( |
| ) |
|
|
private |
◆ getLastError()
| int lusb::UsbDevice::getLastError |
( |
std::string & |
str | ) |
const |
◆ getLocation()
| Location lusb::UsbDevice::getLocation |
( |
| ) |
const |
|
inline |
◆ handleError()
| bool lusb::UsbDevice::handleError |
( |
int |
err | ) |
|
|
private |
◆ init()
| void lusb::UsbDevice::init |
( |
| ) |
|
|
private |
◆ interruptRead()
| int lusb::UsbDevice::interruptRead |
( |
void * |
data, |
|
|
int |
size, |
|
|
unsigned char |
endpoint, |
|
|
int |
timeout |
|
) |
| |
◆ interruptReadThread()
| void lusb::UsbDevice::interruptReadThread |
( |
Callback |
callback, |
|
|
unsigned char |
endpoint |
|
) |
| |
|
private |
◆ interruptWrite()
| bool lusb::UsbDevice::interruptWrite |
( |
const void * |
data, |
|
|
int |
size, |
|
|
unsigned char |
endpoint, |
|
|
int |
timeout |
|
) |
| |
◆ isOpen()
| bool lusb::UsbDevice::isOpen |
( |
| ) |
const |
|
inline |
◆ listDevices() [1/3]
| void lusb::UsbDevice::listDevices |
( |
const std::vector< UsbIds > & |
ids, |
|
|
std::vector< Location > & |
list |
|
) |
| |
|
static |
◆ listDevices() [2/3]
| void lusb::UsbDevice::listDevices |
( |
std::vector< Location > & |
list | ) |
const |
◆ listDevices() [3/3]
| void lusb::UsbDevice::listDevices |
( |
uint16_t |
vid, |
|
|
uint16_t |
pid, |
|
|
std::vector< Location > & |
list |
|
) |
| |
|
static |
◆ open()
◆ setDebugLevel()
| void lusb::UsbDevice::setDebugLevel |
( |
uint8_t |
level | ) |
|
◆ setDevceIds()
| void lusb::UsbDevice::setDevceIds |
( |
uint16_t |
vid, |
|
|
uint16_t |
pid, |
|
|
uint8_t |
mi |
|
) |
| |
◆ startBulkReadThread()
| void lusb::UsbDevice::startBulkReadThread |
( |
Callback |
callback, |
|
|
unsigned char |
endpoint |
|
) |
| |
◆ startInterruptReadThread()
| void lusb::UsbDevice::startInterruptReadThread |
( |
Callback |
callback, |
|
|
unsigned char |
endpoint |
|
) |
| |
◆ stopBulkReadThread()
| void lusb::UsbDevice::stopBulkReadThread |
( |
unsigned char |
endpoint | ) |
|
◆ stopInterruptReadThread()
| void lusb::UsbDevice::stopInterruptReadThread |
( |
unsigned char |
endpoint | ) |
|
◆ throwError()
| void lusb::UsbDevice::throwError |
( |
int |
err | ) |
|
|
private |
◆ bulk_threads_
| boost::thread lusb::UsbDevice::bulk_threads_[128] |
|
private |
◆ bulk_threads_enable_
| bool lusb::UsbDevice::bulk_threads_enable_[128] |
|
private |
◆ ctx_
| libusb_context* lusb::UsbDevice::ctx_ |
|
private |
◆ error_code_
| int lusb::UsbDevice::error_code_ |
|
private |
◆ error_str_
| std::string lusb::UsbDevice::error_str_ |
|
private |
◆ interrupt_threads_
| boost::thread lusb::UsbDevice::interrupt_threads_[128] |
|
private |
◆ interrupt_threads_enable_
| bool lusb::UsbDevice::interrupt_threads_enable_[128] |
|
private |
◆ libusb_handle_
| libusb_device_handle* lusb::UsbDevice::libusb_handle_ |
|
private |
◆ location_
◆ mi_
| uint8_t lusb::UsbDevice::mi_ |
|
private |
◆ open_
| bool lusb::UsbDevice::open_ |
|
private |
◆ pid_
| uint16_t lusb::UsbDevice::pid_ |
|
private |
◆ throw_errors_
| bool lusb::UsbDevice::throw_errors_ |
◆ vid_
| uint16_t lusb::UsbDevice::vid_ |
|
private |
The documentation for this class was generated from the following files: