UsbConfiguration
open class UsbConfiguration : Parcelable
| kotlin.Any | |
| ↳ | android.hardware.usb.UsbConfiguration |
A class representing a configuration on a UsbDevice. A USB configuration can have one or more interfaces, each one providing a different piece of functionality, separate from the other interfaces. An interface will have one or more UsbEndpoints, which are the channels by which the host transfers data with the device.
Summary
| Inherited constants | |
|---|---|
| Public methods | |
|---|---|
| open Int |
Describe the kinds of special objects contained in this Parcelable instance's marshaled representation. |
| open Int |
getId()Returns the configuration's ID field. |
| open UsbInterface |
getInterface(index: Int)Returns the |
| open Int |
Returns the number of |
| open Int |
Returns the configuration's max power consumption, in milliamps. |
| open String? |
getName()Returns the configuration's name. |
| open Boolean |
Returns the remote-wakeup attribute value configuration's attributes field. |
| open Boolean |
Returns the self-powered attribute value configuration's attributes field. |
| open String |
toString()Returns a string representation of the object. |
| open Unit |
writeToParcel(parcel: Parcel, flags: Int)Flatten this object in to a Parcel. |
| Properties | |
|---|---|
| static Parcelable.Creator<UsbConfiguration!> | |
Public methods
describeContents
open fun describeContents(): Int
Describe the kinds of special objects contained in this Parcelable instance's marshaled representation. For example, if the object will include a file descriptor in the output of writeToParcel(android.os.Parcel,int), the return value of this method must include the CONTENTS_FILE_DESCRIPTOR bit.
| Return | |
|---|---|
Int |
a bitmask indicating the set of special object types marshaled by this Parcelable object instance. Value is either 0 or
|
getId
open fun getId(): Int
Returns the configuration's ID field. This is an integer that uniquely identifies the configuration on the device.
| Return | |
|---|---|
Int |
the configuration's ID |
getInterface
open fun getInterface(index: Int): UsbInterface
Returns the UsbInterface at the given index.
| Return | |
|---|---|
UsbInterface |
the interface. This value cannot be null. |
getInterfaceCount
open fun getInterfaceCount(): Int
Returns the number of UsbInterfaces this configuration contains.
| Return | |
|---|---|
Int |
the number of endpoints |
getMaxPower
open fun getMaxPower(): Int
Returns the configuration's max power consumption, in milliamps.
| Return | |
|---|---|
Int |
the configuration's max power |
getName
open fun getName(): String?
Returns the configuration's name.
| Return | |
|---|---|
String? |
the configuration's name, or null if the property could not be read |
isRemoteWakeup
open fun isRemoteWakeup(): Boolean
Returns the remote-wakeup attribute value configuration's attributes field. This attributes that the device may signal the host to wake from suspend.
| Return | |
|---|---|
Boolean |
the configuration's remote-wakeup attribute |
isSelfPowered
open fun isSelfPowered(): Boolean
Returns the self-powered attribute value configuration's attributes field. This attribute indicates that the device has a power source other than the USB connection.
| Return | |
|---|---|
Boolean |
the configuration's self-powered attribute |
toString
open fun toString(): String
Returns a string representation of the object.
| Return | |
|---|---|
String |
a string representation of the object. |
writeToParcel
open fun writeToParcel(
parcel: Parcel,
flags: Int
): Unit
Flatten this object in to a Parcel.
| Parameters | |
|---|---|
dest |
The Parcel in which the object should be written. This value cannot be null. |
flags |
Int: Additional flags about how the object should be written. May be 0 or PARCELABLE_WRITE_RETURN_VALUE. Value is either 0 or a combination of the following:
|