UsbEndpoint
open class UsbEndpoint : Parcelable
kotlin.Any | |
↳ | android.hardware.usb.UsbEndpoint |
A class representing an endpoint on a UsbInterface
. Endpoints are the channels for sending and receiving data over USB. Typically bulk endpoints are used for sending non-trivial amounts of data. Interrupt endpoints are used for sending small amounts of data, typically events, separately from the main data streams. The endpoint zero is a special endpoint for control messages sent from the host to device. Isochronous endpoints are currently unsupported.
Summary
Inherited constants | |
---|---|
Public methods | |
---|---|
open Int | |
open Int |
Returns the endpoint's address field. |
open Int |
Returns the endpoint's attributes field. |
open Int |
Returns the endpoint's direction. |
open Int |
Extracts the endpoint's endpoint number from its address |
open Int |
Returns the endpoint's interval field. |
open Int |
Returns the endpoint's maximum packet size. |
open Int |
getType() Returns the endpoint's type. |
open String |
toString() |
open Unit |
writeToParcel(parcel: Parcel, flags: Int) |
Properties | |
---|---|
static Parcelable.Creator<UsbEndpoint!> |
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 |
getAddress
open fun getAddress(): Int
Returns the endpoint's address field. The address is a bitfield containing both the endpoint number as well as the data direction of the endpoint. the endpoint number and direction can also be accessed via getEndpointNumber
and getDirection
.
Return | |
---|---|
Int |
the endpoint's address |
getAttributes
open fun getAttributes(): Int
Returns the endpoint's attributes field.
Return | |
---|---|
Int |
the endpoint's attributes |
getDirection
open fun getDirection(): Int
Returns the endpoint's direction. Returns UsbConstants.USB_DIR_OUT
if the direction is host to device, and UsbConstants.USB_DIR_IN
if the direction is device to host.
Return | |
---|---|
Int |
the endpoint's direction |
getEndpointNumber
open fun getEndpointNumber(): Int
Extracts the endpoint's endpoint number from its address
Return | |
---|---|
Int |
the endpoint's endpoint number |
getInterval
open fun getInterval(): Int
Returns the endpoint's interval field.
Return | |
---|---|
Int |
the endpoint's interval |
getMaxPacketSize
open fun getMaxPacketSize(): Int
Returns the endpoint's maximum packet size.
Return | |
---|---|
Int |
the endpoint's maximum packet size |
getType
open fun getType(): Int
Returns the endpoint's type. Possible results are:
UsbConstants.USB_ENDPOINT_XFER_CONTROL
(endpoint zero)UsbConstants.USB_ENDPOINT_XFER_ISOC
(isochronous endpoint)UsbConstants.USB_ENDPOINT_XFER_BULK
(bulk endpoint)UsbConstants.USB_ENDPOINT_XFER_INT
(interrupt endpoint)
Return | |
---|---|
Int |
the endpoint's type |
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 |