This represents a configuration of a USB device. The device may have multiple configurations, and must have at least one configuration; only one configuration (if any) can be currently active. If the device is in an unconfigured state none of its configurations are active. If this configuration is not active, its device model (UsbInterfaces, UsbEndpoints, and UsbPipes) may be browsed, but no action can be taken.
See the USB 1.1 specification sec 9.6.2 for more information on USB device configurations.
| Modifier and Type | Method and Description |
|---|---|
| public boolean | Returns: If this configuration contains the specified UsbInterface.The interface number. number)If the specified UsbInterface is contained in this UsbConfiguration. |
| public String | |
| public UsbConfigurationDescriptor | Returns: The configuration descriptor.Get the configuration descriptor. |
| public UsbDevice | Returns: the UsbDevice that this UsbConfiguration belongs to.Get the parent UsbDevice that this UsbConfiguration belongs to. |
| public UsbInterface | Returns: The specified UsbInterface, or null.The number of the interface to get. number)Get the UsbInterface with the specified interface number. |
| public List | Returns: All UsbInterfaces for this configuration.Get all UsbInterfaces for this configuration. |
| public boolean |
| containsUsbInterface | back to summary |
|---|---|
| public boolean containsUsbInterface(byte number) If the specified UsbInterface is contained in this UsbConfiguration.
| |
| getConfigurationString | back to summary |
|---|---|
| public String getConfigurationString() throws UsbException, UnsupportedEncodingException, UsbDisconnectedException Get the configuration String. This is a convienence method. The String may be cached. If the device does not support strings or does not define the configuration string, this returns null.
| |
| getUsbConfigurationDescriptor | back to summary |
|---|---|
| public UsbConfigurationDescriptor getUsbConfigurationDescriptor() Get the configuration descriptor. The descriptor may be cached.
| |
| getUsbDevice | back to summary |
|---|---|
| public UsbDevice getUsbDevice() Get the parent UsbDevice that this UsbConfiguration belongs to.
| |
| getUsbInterface | back to summary |
|---|---|
| public UsbInterface getUsbInterface(byte number) Get the UsbInterface with the specified interface number.
The returned interface setting will be the current active
alternate setting if this configuration (and thus the contained interface)
is If the specified UsbInterface does not exist, this returns null.
| |
| getUsbInterfaces | back to summary |
|---|---|
| public List Get all UsbInterfaces for this configuration. The returned UsbInterface settings depend on whether this configuration (and by association its contained interfaces) is active or not:
| |
| isActive | back to summary |
|---|---|
| public boolean isActive() If this UsbConfiguration is active.
| |