USB::Interface Class Reference
Class representing an interface of a Device. More...
#include <usbpp.h>
Collaboration diagram for USB::Interface:

Public Member Functions | |
Interface () | |
int | driverName (std::string &driver) |
get the current driver for an interface | |
u_int8_t | numAltSettings (void) |
Number of Alternative Settings that this interface has. | |
AltSetting * | firstAltSetting (void) |
First AltSetting for the Interface. | |
AltSetting * | nextAltSetting (void) |
Next AltSetting for the Interface. | |
AltSetting * | lastAltSetting (void) |
Last AltSetting for the Interface. | |
Friends | |
class | Busses |
Busses is a friend because it fills in the descriptor type information on initialisation and rescan. |
Detailed Description
Class representing an interface of a Device.The Interface class represents a USB interface for a device attached to a Universal Serial Bus.
Interfaces are the main element of the USB class structure.
- Author:
- Brad Hards
Definition at line 165 of file usbpp.h.
Member Function Documentation
|
get the current driver for an interface
Definition at line 386 of file usbpp.cpp. References USB::Device::handle(). |
|
Number of Alternative Settings that this interface has. This is a simple accessor method that specifies the number alternative settings that this device interface has. |
|
First AltSetting for the Interface. This method returns a pointer to the first AltSetting for the Interface. See nextAltSetting() for an example of how it might be used.
|
|
Next AltSetting for the Interface. This method returns a pointer to the next AltSetting for the Interface. If you want to iterate through each AltSetting on a device, you can use something like the following: USB::Configuration *this_Configuration; this_Configuration = device->firstConfiguration(); for (i=0; i < device->numConfigurations(); i++) { this_Configuration->dumpDescriptor(); USB::Interface *this_Interface; this_Interface = this_Configuration->firstInterface(); for (j=0; j < this_Configuration->numInterfaces(); j++) { USB::AltSetting *this_AltSetting; this_AltSetting = this_Interface->firstAltSetting(); for (k=0; k < this_Interface->numAltSettings(); k++) { // do something with this_AltSetting this_AltSetting = this_Interface->nextAltSetting(); } this_Interface = this_Configuration->nextInterface(); } this_Configuration = device->nextConfiguration(); }
|
|
Last AltSetting for the Interface. This method returns a pointer to the last AltSetting for the Interface.
|
Friends And Related Function Documentation
|
Busses is a friend because it fills in the descriptor type information on initialisation and rescan.
|
The documentation for this class was generated from the following files: