USB::Busses Class Reference
Class representing all the busses on the machine. More...
#include <usbpp.h>
Public Member Functions | |
Busses () | |
void | rescan (void) |
Update method. | |
std::list< Device * > | match (u_int8_t Class) |
find all devices with matching device class designator | |
std::list< Device * > | match (DeviceIDList) |
find all devices with matching device IDs |
Detailed Description
Class representing all the busses on the machine.This class is essentially a list of Bus class instances
Definition at line 789 of file usbpp.h.
Member Function Documentation
|
Update method. This method can be called to rescan the various devices attached to the various busses. You should use it to update if things change. Unfortunately there is no way to automatically detect this change in a portable way, so worst case is that you need to call this using some kind of timer in the background. Definition at line 26 of file usbpp.cpp. References USB::Endpoint::setDescriptor(), USB::AltSetting::setDescriptor(), USB::Configuration::setDescriptor(), USB::Device::setDescriptor(), USB::Device::setDevHandle(), USB::Bus::setDirectoryName(), USB::Device::setFileName(), USB::Interface::setInterfaceNumber(), USB::Interface::setNumAltSettings(), USB::Endpoint::setParent(), USB::Interface::setParent(), USB::Device::setProduct(), USB::Device::setSerialNumber(), USB::Device::setVendor(), and USB::Device::string(). Referenced by Busses(). |
|
find all devices with matching device class designator This method searches every device on every bus, and returns a list of pointers to the devices that have a matching device class code Definition at line 113 of file usbpp.cpp. References USB::Device::devClass(). |
|
find all devices with matching device IDs This method searches every device on every bus, and returns a list of pointers to the devices that have a matching device ID. That is, if the (vendor, product) tuple of a device matches one of the tuples on the list, then the device will be added to the list of matches. An example of usage is shown below: USB::Busses buslist; USB::Device *device; std::list<USB::Device> miceFound; USB::DeviceIDList mouseList; mouseList.append(USB::DeviceID(VENDOR_LOGITECH, 0xC00E)); // Wheel Mouse Optical mouseList.append(USB::DeviceID(VENDOR_LOGITECH, 0xC012)); // MouseMan Dual Optical mouseList.append(USB::DeviceID(VENDOR_LOGITECH, 0xC506)); // MX700 Optical Mouse miceFound = buslist.match(mouseList); for ( device = miceFound.first(); device; device = miceFound.next() ) { // do something with each mouse that matched } FIXME: This is incorrect now Definition at line 133 of file usbpp.cpp. References USB::Device::idProduct(), and USB::Device::idVendor(). |
The documentation for this class was generated from the following files: