IT. Expert System.

Android Reference

UsbInterface


android.hardware.usb

Class UsbInterface

  • All Implemented Interfaces:
    Parcelable


    public class UsbInterface
    extends Object
    implements Parcelable
    A class representing an interface on a UsbDevice. USB devices 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.

    Developer Guides

    For more information about communicating with USB hardware, read the USB developer guide.

    • Constructor Detail

      • UsbInterface

        public UsbInterface(int id,
                    int Class,
                    int subClass,
                    int protocol,
                    Parcelable[] endpoints)
        UsbInterface should only be instantiated by UsbService implementation
    • Method Detail

      • getId

        public int getId()
        Returns the interface's ID field. This is an integer that uniquely identifies the interface on the device.
        Returns:
        the interface's ID
      • getInterfaceClass

        public int getInterfaceClass()
        Returns the interface's class field. Some useful constants for USB classes can be found in UsbConstants
        Returns:
        the interface's class
      • getInterfaceSubclass

        public int getInterfaceSubclass()
        Returns the interface's subclass field.
        Returns:
        the interface's subclass
      • getInterfaceProtocol

        public int getInterfaceProtocol()
        Returns the interface's protocol field.
        Returns:
        the interface's protocol
      • getEndpointCount

        public int getEndpointCount()
        Returns the number of UsbEndpoints this interface contains.
        Returns:
        the number of endpoints
      • getEndpoint

        public UsbEndpoint getEndpoint(int index)
        Returns the UsbEndpoint at the given index.
        Returns:
        the endpoint
      • toString

        public String toString()
        Description copied from class: Object
        Returns a string containing a concise, human-readable description of this object. Subclasses are encouraged to override this method and provide an implementation that takes into account the object's type and data. The default implementation is equivalent to the following expression:
           getClass().getName() + '@' + Integer.toHexString(hashCode())

        See Writing a useful toString method if you intend implementing your own toString method.

        Overrides:
        toString in class Object
        Returns:
        a printable representation of this object.
      • describeContents

        public int describeContents()
        Description copied from interface: Parcelable
        Describe the kinds of special objects contained in this Parcelable's marshalled representation.
        Specified by:
        describeContents in interface Parcelable
        Returns:
        a bitmask indicating the set of special object types marshalled by the Parcelable.


Content

Android Reference

Java basics

Java Enterprise Edition (EE)

Java Standard Edition (SE)

SQL

HTML

PHP

CSS

Java Script

MYSQL

JQUERY

VBS

REGEX

C

C++

C#

Design patterns

RFC (standard status)

RFC (proposed standard status)

RFC (draft standard status)

RFC (informational status)

RFC (experimental status)

RFC (best current practice status)

RFC (historic status)

RFC (unknown status)

IT dictionary

License.
All information of this service is derived from the free sources and is provided solely in the form of quotations. This service provides information and interfaces solely for the familiarization (not ownership) and under the "as is" condition.
Copyright 2016 © ELTASK.COM. All rights reserved.
Site is optimized for mobile devices.
Downloads: 1475 / . Delta: 0.03318 с