|
OpenHantek
|
Search for Hantek devices. Use usually want to call updateDeviceList and then retrieve the list via getDevices. You can call updateDeviceList as often as you want. If you have found your favorite device, you want to call takeDevice. The device will not be available in getDevices anymore and this will not change with calls to updateDeviceList.
More...
#include <finddevices.h>
Public Types | |
| typedef std::map< UniqueUSBid, std::unique_ptr< USBDevice > > | DeviceList |
Public Member Functions | |
| FindDevices (libusb_context *context) | |
| int | updateDeviceList () |
| const DeviceList * | getDevices () |
| std::unique_ptr< USBDevice > | takeDevice (UniqueUSBid id) |
| takeDevice More... | |
Private Attributes | |
| libusb_context * | context |
| The usb context used for this device. More... | |
| DeviceList | devices |
| unsigned | findIteration = 0 |
Search for Hantek devices. Use usually want to call updateDeviceList and then retrieve the list via getDevices. You can call updateDeviceList as often as you want. If you have found your favorite device, you want to call takeDevice. The device will not be available in getDevices anymore and this will not change with calls to updateDeviceList.
Do not close the given usb context before this class object is destroyed.
| typedef std::map<UniqueUSBid, std::unique_ptr<USBDevice> > FindDevices::DeviceList |
|
explicit |
| const FindDevices::DeviceList * FindDevices::getDevices | ( | ) |
| std::unique_ptr< USBDevice > FindDevices::takeDevice | ( | UniqueUSBid | id | ) |
takeDevice
| id | The unique usb id for the current bus layout |
| int FindDevices::updateDeviceList | ( | ) |
Updates the device list. To clear the list, just dispose this object
|
private |
The usb context used for this device.
|
private |
|
private |