OpenHantek
Public Types | Public Member Functions
FindDevices Class Reference

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< USBDevicetakeDevice (UniqueUSBid id)
 takeDevice More...
 

Detailed Description

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.

Member Function Documentation

◆ takeDevice()

std::unique_ptr< USBDevice > FindDevices::takeDevice ( UniqueUSBid  id)

takeDevice

Parameters
idThe unique usb id for the current bus layout
Returns
A shared reference to the

◆ updateDeviceList()

int FindDevices::updateDeviceList ( )

Updates the device list. To clear the list, just dispose this object

Returns
If negative it represents a libusb error code otherwise the amount of updates

The documentation for this class was generated from the following files: