|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface UsbConfiguration
Interface for a USB configuration.
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.
Method Summary | |
---|---|
boolean |
containsUsbInterface(byte number)
If the specified UsbInterface is contained in this UsbConfiguration. |
java.lang.String |
getConfigurationString()
Get the configuration String. |
UsbConfigurationDescriptor |
getUsbConfigurationDescriptor()
Get the configuration descriptor. |
UsbDevice |
getUsbDevice()
Get the parent UsbDevice that this UsbConfiguration belongs to. |
UsbInterface |
getUsbInterface(byte number)
Get the UsbInterface with the specified interface number. |
java.util.List |
getUsbInterfaces()
Get all UsbInterfaces for this configuration. |
boolean |
isActive()
If this UsbConfiguration is active. |
Method Detail |
---|
boolean isActive()
java.util.List getUsbInterfaces()
The returned UsbInterface settings depend on whether this configuration (and by association its contained interfaces) is active or not:
UsbInterface.getSetting(byte number)
.
UsbInterface getUsbInterface(byte number)
The returned interface setting will be the current active
alternate setting if this configuration (and thus the contained interface)
is active
. If this configuration is not active,
the returned interface setting will be an implementation-dependent alternate setting.
To get a specific alternate setting, use
UsbInterface.getSetting(byte number)
.
If the specified UsbInterface does not exist, this returns null.
number
- The number of the interface to get.
boolean containsUsbInterface(byte number)
number
- The interface number.
UsbDevice getUsbDevice()
UsbConfigurationDescriptor getUsbConfigurationDescriptor()
The descriptor may be cached.
java.lang.String getConfigurationString() throws UsbException, java.io.UnsupportedEncodingException, UsbDisconnectedException
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.
UsbException
- If there was an error getting the UsbStringDescriptor.
java.io.UnsupportedEncodingException
- If the string encoding is not supported.
UsbDisconnectedException
- If the device has been disconnected.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |