USB::Configuration Class Reference
Class representing a configuration of a Device. More...
#include <usbpp.h>
Inherits list.
Public Member Functions | |
void | dumpDescriptor (void) |
Configuration descriptor information output. | |
u_int8_t | numInterfaces (void) |
Number of Interfaces that this device has. | |
Interface * | firstInterface (void) |
First Interface for the Configuration. | |
Interface * | nextInterface (void) |
Next Interface for the Configuration. | |
Interface * | lastInterface (void) |
Last Interface for the Configuration. | |
Friends | |
class | Busses |
Busses is a friend because it fills in the descriptor type information on initialisation and rescan. |
Detailed Description
Class representing a configuration of a Device.The Configuration class represents a single configuration of a device attached to a Universal Serial Bus.
Definition at line 308 of file usbpp.h.
Member Function Documentation
void USB::Configuration::dumpDescriptor | ( | void | ) |
Configuration descriptor information output.
This method dumps out the various characteristics of the configuration to standard output.
It is mostly useful for debugging.
u_int8_t USB::Configuration::numInterfaces | ( | void | ) |
Number of Interfaces that this device has.
This is a simple accessor method that specifies the number Interfaces that this device configuration has.
Definition at line 339 of file usbpp.cpp.
Referenced by USB::Busses::rescan().
Interface * USB::Configuration::firstInterface | ( | void | ) |
First Interface for the Configuration.
This method returns a pointer to the first Interface for the Configuration.
See nextInterface() for an example of how it might be used.
- See also:
- nextInterface(), lastInterface(), numInterfaces()
Interface * USB::Configuration::nextInterface | ( | void | ) |
Next Interface for the Configuration.
This method returns a pointer to the next Interface for the Configuration.
If you want to iterate through each Interface 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_Interface = this_Configuration->firstInterface(); for (j=0; j < this_Configuration->numInterfaces(); j++) { // do something with this_Interface this_Interface = this_Configuration->nextInterface(); } this_Configuration->nextConfiguration(); }
- See also:
- firstInterface(), lastInterface(), numInterfaces()
Interface * USB::Configuration::lastInterface | ( | void | ) |
Last Interface for the Configuration.
This method returns a pointer to the last Interface for the Configuration.
- See also:
- firstInterface(), nextInterface(), numInterfaces()
Friends And Related Function Documentation
friend class Busses [friend] |
The documentation for this class was generated from the following files: