A Scanner class. More...
#include <scanner.hpp>
Public Member Functions | |
std::vector< struct usb_device * > | find_devices (uint16_t vendor, uint16_t product) |
int | get_manufacturer (std::string &manufacturer) |
int | get_manufacturer (unsigned int index, std::string &manufacturer) |
int | get_product (std::string &product) |
int | get_product (unsigned int index, std::string &product) |
int | get_serial_id (std::string &serial_id) |
int | get_serial_id (unsigned int index, std::string &serial_id) |
int | reset () |
int | retrieve () |
int | scan () |
Private Attributes | |
std::vector< std::map< std::string, std::string > > | descriptions |
std::vector< struct usb_device * > | devices |
bool | retrieved |
bool | scanned |
|
inline |
find_devices with given vendor and device id by using libusb library
[in] | vendor | vendor id of targeted usb device |
[in] | product | product id of targeted usb device |
Definition at line 68 of file scanner.hpp.
|
inline |
[out] | manufacturer | manufacturer name of of ftdi device |
Definition at line 200 of file scanner.hpp.
|
inline |
[in] | index | index of scanned device |
[out] | manufacturer | manufacturer name of ftdi device |
Definition at line 162 of file scanner.hpp.
|
inline |
[out] | product | product name of of ftdi device |
Definition at line 209 of file scanner.hpp.
|
inline |
[in] | index | index of scanned device |
[out] | product | product name of ftdi device |
Definition at line 177 of file scanner.hpp.
|
inline |
[out] | serial_id | serial number of ftdi device |
Definition at line 191 of file scanner.hpp.
|
inline |
[in] | index | index of scanned device |
[out] | serial_id | serial number of ftdi device |
Definition at line 147 of file scanner.hpp.
|
inline |
reset the connected usb device to recall it to standard tty interface
Definition at line 215 of file scanner.hpp.
|
inline |
Retrieve descriptions of scanned devices. Retrived desctiptions are stored internally.
Definition at line 110 of file scanner.hpp.
|
inline |
Scan the usb device that have given vendor and product id.
Definition at line 93 of file scanner.hpp.
|
private |
Container for usb data of devices found. such as serial_number, product name, manufacture name
Definition at line 234 of file scanner.hpp.
|
private |
Container for data structure of usb devices found
Definition at line 233 of file scanner.hpp.
|
private |
flags to indicated current status of calss
Definition at line 232 of file scanner.hpp.
|
private |
flags to indicated current status of calss
Definition at line 231 of file scanner.hpp.