Record Class UsbControlTransfer
java.lang.Object
java.lang.Record
net.codecrete.usb.UsbControlTransfer
- Record Components:
requestType- request type (bits 5 and 6 ofbmRequestType)recipient- recipient (bits 0–4 ofbmRequestType)request- request code (value between 0 and 255, calledbRequestin USB specification)value- value (value between 0 and 65535, calledwValuein USB specification)index- index (value between 0 and 65535, calledwIndexin USB specification).
public record UsbControlTransfer(UsbRequestType requestType, UsbRecipient recipient, int request, int value, int index)
extends Record
USB control transfer parameters.
See description of "Setup Data" in the chapter "USB Device Requests" of the USB specification for additional information.
For control requests directed to an interface or endpoint,
the lower byte of index contains the interface or endpoint number.
-
Constructor Summary
ConstructorsConstructorDescriptionUsbControlTransfer(UsbRequestType requestType, UsbRecipient recipient, int request, int value, int index) Creates an instance of aUsbControlTransferrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.intindex()Returns the value of theindexrecord component.Returns the value of therecipientrecord component.intrequest()Returns the value of therequestrecord component.Returns the value of therequestTyperecord component.final StringtoString()Returns a string representation of this record class.intvalue()Returns the value of thevaluerecord component.
-
Constructor Details
-
UsbControlTransfer
public UsbControlTransfer(UsbRequestType requestType, UsbRecipient recipient, int request, int value, int index) Creates an instance of aUsbControlTransferrecord class.- Parameters:
requestType- the value for therequestTyperecord componentrecipient- the value for therecipientrecord componentrequest- the value for therequestrecord componentvalue- the value for thevaluerecord componentindex- the value for theindexrecord component
-
-
Method Details
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
requestType
Returns the value of therequestTyperecord component.- Returns:
- the value of the
requestTyperecord component
-
recipient
-
request
-
value
-
index
-