libdrmconf 0.12.1
A library to program DMR radios.
Loading...
Searching...
No Matches
HIDevice::Descriptor Class Reference

Specialization to address a HI device uniquely. More...

#include <hid_libusb.hh>

Inheritance diagram for HIDevice::Descriptor:
Collaboration diagram for HIDevice::Descriptor:

Public Member Functions

 Descriptor (const USBDeviceInfo &info, uint8_t bus, uint8_t device)
 Constructor from interface info, bus number and device address.
 
 Descriptor (const USBDeviceInfo &info, uint32_t locationId, uint16_t device)
 Constructor from interface info, bus number and device address.
 
- Public Member Functions inherited from USBDeviceDescriptor
 USBDeviceDescriptor ()
 Empty constructor.
 
 USBDeviceDescriptor (const USBDeviceDescriptor &other)
 Copy constructor.
 
USBDeviceDescriptoroperator= (const USBDeviceDescriptor &other)
 Assignment.
 
bool isValid () const
 Returns true if the descriptor is still valid.
 
QString description () const
 Returns a human readable description of the device.
 
const QVariant & device () const
 Returns the device information identifying the interface uniquely.
 
QString deviceHandle () const
 Returns a unique string representation of the device information.
 
- Public Member Functions inherited from USBDeviceInfo
 USBDeviceInfo ()
 Empty constructor.
 
 USBDeviceInfo (Class cls, uint16_t vid, uint16_t pid, bool save=true)
 Constructor from class, VID and PID.
 
virtual ~USBDeviceInfo ()
 Destructor.
 
 USBDeviceInfo (const USBDeviceInfo &other)
 Copy constructor.
 
USBDeviceInfooperator= (const USBDeviceInfo &other)
 Assignment.
 
bool operator== (const USBDeviceInfo &other) const
 Comparison.
 
bool operator!= (const USBDeviceInfo &other) const
 Comparison.
 
bool isValid () const
 Returns true if the interface info is valid.
 
Class interfaceClass () const
 Returns the interface class.
 
bool hasVendorID () const
 Retunrs true, if a vendor ID is set.
 
uint16_t vendorId () const
 Returns the vendor ID or 0 if not set.
 
bool hasProductID () const
 Retunrs true, if a product ID is set.
 
uint16_t productId () const
 Returns the product ID or 0 if not set.
 
QString description () const
 Returns a brief human readable description of the interface.
 
QString longDescription () const
 Returns a more extensive human readable description of the interface.
 
bool isSave () const
 Returns true if it is save to send commands to this device without user approval.
 

Additional Inherited Members

- Public Types inherited from USBDeviceInfo
enum class  Class {
  None , Serial , DFU , HID ,
  C7K
}
 Possible interface types. More...
 
- Static Public Member Functions inherited from USBDeviceDescriptor
static QList< USBDeviceDescriptordetect (bool saveOnly=true)
 Searches for all connected radios (may contain false positives).
 
- Protected Member Functions inherited from USBDeviceDescriptor
 USBDeviceDescriptor (const USBDeviceInfo &info, const QString &device)
 Hidden constructor from info and path string.
 
 USBDeviceDescriptor (const USBDeviceInfo &info, const USBDeviceHandle &device)
 Hidden constructor from info and USB device address.
 
bool validSerial () const
 Checks a serial port.
 
bool validRawUSB () const
 Checks a raw USB device.
 
- Protected Attributes inherited from USBDeviceDescriptor
QVariant _device
 Holds some information to identify the radio interface uniquely.
 
- Protected Attributes inherited from USBDeviceInfo
Class _class
 The class of the interface.
 
uint16_t _vid
 The USB vid.
 
uint16_t _pid
 The USB pid.
 
bool _save
 If true, it is save to send commands to the device without user approval.
 

Detailed Description

Specialization to address a HI device uniquely.


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