Interface UsbAlternateInterface
public interface UsbAlternateInterface
USB alternate interface setting.
Instances of this class describe an alternate setting of a USB interface.
-
Method Summary
Modifier and TypeMethodDescriptionintGets the interface class.@NotNull UsbEndpointgetEndpoint(int endpointNumber, UsbDirection direction) Gets the endpoint with the specified number and direction.@NotNull @Unmodifiable List<UsbEndpoint> Gets the endpoints of this alternate interface settings.intGets the alternate setting number.intGets the interface protocol.intGets the interface subclass.
-
Method Details
-
getNumber
int getNumber()Gets the alternate setting number.It is equal to the
bAlternateSettingfield of the interface descriptor.- Returns:
- the alternate setting number
-
getClassCode
int getClassCode()Gets the interface class.Interface classes are defined by the USB standard.
- Returns:
- the interface class
-
getSubclassCode
int getSubclassCode()Gets the interface subclass.Interface subclasses are defined by the USB standard.
- Returns:
- the interface subclass
-
getProtocolCode
int getProtocolCode()Gets the interface protocol.Interface protocols are defined by the USB standard.
- Returns:
- the interface protocol
-
getEndpoints
Gets the endpoints of this alternate interface settings.The endpoint list does not include endpoint 0, which is always available and reserved for control transfers.
The returned list is sorted by endpoint number.
- Returns:
- a list of endpoints.
-
getEndpoint
Gets the endpoint with the specified number and direction.- Parameters:
endpointNumber- endpoint number (in the range between 1 and 127, without the direction bit)direction- endpoint direction- Returns:
- the endpoint
- Throws:
UsbException- if the endpoint does not exist
-