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 UsbEndpoint
s, which are the channels by which the host transfers data with the device.
Summary
Inherited constants | |
---|---|
Public methods | |
---|---|
open Int | |
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() |
open Unit |
writeToParcel(parcel: Parcel, flags: Int) |
Properties | |
---|---|
static Parcelable.Creator<UsbConfiguration!> |
Public methods
describeContents
open fun describeContents(): Int
Return | |
---|---|
Int |
a bitmask indicating the set of special object types marshaled by this Parcelable object instance. Value is either 0 or android.os.Parcelable#CONTENTS_FILE_DESCRIPTOR |
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 UsbInterface
s 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
Return | |
---|---|
String |
a string representation of the object. |
writeToParcel
open fun writeToParcel(
parcel: Parcel,
flags: Int
): Unit
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 android.os.Parcelable#PARCELABLE_WRITE_RETURN_VALUE , and android.os.Parcelable.PARCELABLE_ELIDE_DUPLICATES |