public class UsbControlIrpImp extends UsbIrpImp implements UsbControlIrp
This is the same as UsbIrpImp, except this contains Control-specific setup packet information.
This does not extend javax.usb.util.DefaultUsbControlIrp.
UsbIrpImp.UsbIrpImpListener| Modifier and Type | Field and Description |
|---|---|
protected byte |
bmRequestType |
protected byte |
bRequest |
protected UsbDeviceImp |
usbDeviceImp |
protected short |
wIndex |
protected short |
wValue |
createShortPacketException, usbIrp, usbIrpImpListeneracceptShortPacket, actualLength, complete, data, length, offset, usbException| Constructor and Description |
|---|
UsbControlIrpImp(byte bmRequestType,
byte bRequest,
short wValue,
short wIndex)
Constructor.
|
UsbControlIrpImp(UsbControlIrp controlUsbIrp)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
byte |
bmRequestType()
Get the bmRequestType.
|
byte |
bRequest()
Get the bRequest.
|
static void |
checkUsbControlIrp(UsbControlIrp irp)
Check the specified UsbControlIrp.
|
void |
complete()
Complete this submission.
|
byte[] |
getSetupPacket()
Get the setup packet (Control header).
|
UsbDeviceImp |
getUsbDeviceImp()
Get the UsbDeviceImp.
|
boolean |
isSetConfiguration()
If this is a SET_CONFIGURATION UsbIrp.
|
boolean |
isSetInterface()
If this is a SET_INTERFACE UsbIrp.
|
void |
setUsbDeviceImp(UsbDeviceImp device)
Set the UsbDeviceImp.
|
short |
wIndex()
Get the wIndex.
|
short |
wLength()
Get the wLength.
|
short |
wValue()
Get the wValue.
|
checkShortPacketException, checkUsbIrp, completeUsbIrp, getUsbIrp, getUsbIrpImpListener, hasUsbIrp, setCreateShortPacketException, setUsbIrp, setUsbIrpImpListenergetAcceptShortPacket, getActualLength, getData, getLength, getOffset, getUsbException, isComplete, isUsbException, setAcceptShortPacket, setActualLength, setComplete, setData, setData, setLength, setOffset, setUsbException, waitUntilComplete, waitUntilCompleteclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetAcceptShortPacket, getActualLength, getData, getLength, getOffset, getUsbException, isComplete, isUsbException, setAcceptShortPacket, setActualLength, setComplete, setData, setData, setLength, setOffset, setUsbException, waitUntilComplete, waitUntilCompleteprotected byte bmRequestType
protected byte bRequest
protected short wValue
protected short wIndex
protected UsbDeviceImp usbDeviceImp
public UsbControlIrpImp(byte bmRequestType,
byte bRequest,
short wValue,
short wIndex)
bmRequestType - The bmRequestType.bRequest - The bRequest.wValue - The wValue.wIndex - The wIndex.public UsbControlIrpImp(UsbControlIrp controlUsbIrp)
controlUsbIrp - The UsbControlIrp this should wrap.public byte bmRequestType()
bmRequestType in interface UsbControlIrppublic byte bRequest()
bRequest in interface UsbControlIrppublic short wValue()
wValue in interface UsbControlIrppublic short wIndex()
wIndex in interface UsbControlIrppublic short wLength()
public void complete()
If this is a successful set configuration request,
this will set the active configuration number.
If this is a successful set interface request,
this will set the active setting number.
Then, it will perform the superclass's complete.
public boolean isSetConfiguration()
public boolean isSetInterface()
public byte[] getSetupPacket()
This creates a new byte[] constructed using the Control-specific methods in this class. See the USB 1.1 specification section 9.3; specifically, the setup packet is constructed as such:
public UsbDeviceImp getUsbDeviceImp()
public void setUsbDeviceImp(UsbDeviceImp device)
device - The UsbDeviceImp.public static void checkUsbControlIrp(UsbControlIrp irp) throws IllegalArgumentException, UsbException
This may be used to check the validity of an UsbControlIrp. This will throw an IllegalArgumentException if the UsbControlIrp does not behave as specified in the UsbControlIrp interface documentation. This will throw an UsbException if the UsbControlIrp is in a state not ready for submission, such as being complete or having a UsbException.
IllegalArgumentException - If the UsbControlIrp is not valid.UsbException - If the UsbControlIrp is not ready for submission.Copyright © 2014 LSST. All Rights Reserved.