All Downloads are FREE. Search and download functionalities are using the official Maven repository.

net.codecrete.usb.UsbAlternateInterface Maven / Gradle / Ivy

//
// Java Does USB
// Copyright (c) 2022 Manuel Bleichenbacher
// Licensed under MIT License
// https://opensource.org/licenses/MIT
//

package net.codecrete.usb;

import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Unmodifiable;

import java.util.List;

/**
 * USB alternate interface setting.
 * 

* Instances of this class describe an alternate setting of a USB interface. *

*/ public interface UsbAlternateInterface { /** * Gets the alternate setting number. *

* It is equal to the {@code bAlternateSetting} field of the interface descriptor. * * @return the alternate setting number */ int getNumber(); /** * Gets the interface class. *

* Interface classes are defined by the USB standard. *

* * @return the interface class */ int getClassCode(); /** * Gets the interface subclass. *

* Interface subclasses are defined by the USB standard. *

* * @return the interface subclass */ int getSubclassCode(); /** * Gets the interface protocol. *

* Interface protocols are defined by the USB standard. *

* * @return the interface protocol */ int getProtocolCode(); /** * 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. *

* * @return a list of endpoints. */ @NotNull @Unmodifiable List getEndpoints(); /** * Gets the endpoint with the specified number and direction. * * @param endpointNumber endpoint number (in the range between 1 and 127, without the direction bit) * @param direction endpoint direction * @return the endpoint * @exception UsbException if the endpoint does not exist */ @NotNull UsbEndpoint getEndpoint(int endpointNumber, UsbDirection direction); }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy