|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--usb.core.Descriptor | +--usb.core.Configuration
Provides access to a USB configuration supported by a device, and to the interfaces associated with that configuration. Some devices do not expose their interface configuration when they're operational, so their interface descriptions may not be available.
Configurations provide a coarse granularity mechanism to select device functionality. For example, one configuration of a telephone might support use of the headset, while another might be a conference call setup. Such configurations may affect device power consumption levels, and hence the ability to work using power supplied from the hub to which they are connected. Not all devices need, or support, multiple configurations. consumption of USB bandwidth.
Most fields of this descriptor are specified in section 9.6.2 of the USB 1.1 specification.
Field Summary | |
static byte |
ATTR_REMOTE_WAKEUP
If this bit is set in an attribute mask, this configuration supports remote wakeup (which must be separately enabled). |
static byte |
ATTR_SELF_POWERED
If this bit is set in an attribute mask, this configuration provides some of its own power in addition to drawing the amount of power described by getMaxPower() . |
Fields inherited from class usb.core.Descriptor |
CLASS_APP_SPECIFIC, CLASS_AUDIO, CLASS_COMM, CLASS_DATA, CLASS_HID, CLASS_HUB, CLASS_MASS_STORAGE, CLASS_PRINTER, CLASS_VENDOR_SPECIFIC, TYPE_CONFIGURATION, TYPE_DEVICE, TYPE_DEVICE_QUALIFIER, TYPE_ENDPOINT, TYPE_HID, TYPE_HUB, TYPE_INTERFACE, TYPE_INTERFACE_POWER, TYPE_OTHER_SPEED, TYPE_PHYSICAL, TYPE_REPORT, TYPE_STRING |
Constructor Summary | |
Configuration(Device device,
byte[] descriptor)
|
Method Summary | |
Configuration |
clone(Device d)
|
int |
getAttributes()
Returns attributes of this configuration. |
java.lang.String |
getConfiguration(int language)
Returns a string describing this configuration, in the specified language; or null if no such string is available. |
int |
getConfigurationValue()
Value passed in a setConfiguration() request to select this configuration. |
Device |
getDevice()
Returns the device with which the configuration is associated |
Interface |
getInterface(int index,
int alt)
Returns the specified interface from this configuration, or null if the device won't provide it. |
int |
getMaxPower()
Returns the maximum amount of power used in this configuration, in units of 2mA. |
int |
getNumInterfaces()
Returns the number of interfaces exposed in this configuration. |
int |
getTotalLength()
Returns the total length of the descriptor for this configuration, including descriptors for interfaces, their endpoints, and other associated elements. |
Methods inherited from class usb.core.Descriptor |
getBCD, getClassName, getDescriptorType, getDescriptorTypeName, getLength, getU16, getU32, getU8, nextDescriptor |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final byte ATTR_SELF_POWERED
getMaxPower()
.public static final byte ATTR_REMOTE_WAKEUP
Constructor Detail |
public Configuration(Device device, byte[] descriptor)
Method Detail |
public Configuration clone(Device d)
public int getTotalLength()
public int getNumInterfaces()
public int getConfigurationValue()
public java.lang.String getConfiguration(int language)
public int getAttributes()
public int getMaxPower()
public Device getDevice()
getDevice
in class Descriptor
public Interface getInterface(int index, int alt) throws java.io.IOException
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |