|
ngscopeclient v0.1
|
Wrapper class for a USB HID connection. More...
#include <HID.h>
Public Member Functions | |
| HID () | |
| Constructor. | |
| bool | Connect (unsigned short vendorId, unsigned short productId, const char *serialNumber=NULL) |
| Open a HID device using a Vendor ID (VID), Product ID (PID) and optionally a serial number. More... | |
| void | Close () |
| Disconnects from the serial port. | |
| virtual | ~HID () |
| Destructor. | |
| int | Read (unsigned char *data, int len) |
| int | Write (const unsigned char *data, int len) |
| hid_device * | GetHandle () |
| std::string | GetManufacturerName () |
| std::string | GetProductName () |
| std::string | GetSerialNumber () |
| bool | IsValid () const |
Protected Attributes | |
| hid_device * | m_handle |
| std::string | m_manufacturerName |
| std::string | m_productName |
| std::string | m_serialNumber |
Wrapper class for a USB HID connection.
| bool HID::Connect | ( | unsigned short | vendorId, |
| unsigned short | productId, | ||
| const char * | serialNumber = NULL |
||
| ) |
Open a HID device using a Vendor ID (VID), Product ID (PID) and optionally a serial number.
If serial_number is NULL, the first device with the specified VID and PID is opened.
| vendorId | The Vendor ID (VID) of the device to open. |
| productId | The Product ID (PID) of the device to open. |
| serialNumber | The Serial Number of the device to open (Optionally NULL). |