|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object javax.usb.util.DefaultUsbIrp com.ibm.jusb.UsbIrpImp com.ibm.jusb.UsbControlIrpImp
public class UsbControlIrpImp
UsbControlIrp implementation.
This is the same as UsbIrpImp, except this contains Control-specific setup packet information.
This does not extend javax.usb.util.DefaultUsbControlIrp.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class com.ibm.jusb.UsbIrpImp |
---|
UsbIrpImp.UsbIrpImpListener |
Constructor Summary | |
---|---|
UsbControlIrpImp(byte bmRequestType,
byte bRequest,
short wValue,
short wIndex)
Constructor. |
|
UsbControlIrpImp(UsbControlIrp controlUsbIrp)
Constructor. |
Method Summary | |
---|---|
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. |
Methods inherited from class com.ibm.jusb.UsbIrpImp |
---|
checkUsbIrp, getUsbIrp, getUsbIrpImpListener, hasUsbIrp, setCreateShortPacketException, setUsbIrp, setUsbIrpImpListener |
Methods inherited from class javax.usb.util.DefaultUsbIrp |
---|
getAcceptShortPacket, getActualLength, getData, getLength, getOffset, getUsbException, isComplete, isUsbException, setAcceptShortPacket, setActualLength, setComplete, setData, setData, setLength, setOffset, setUsbException, waitUntilComplete, waitUntilComplete |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface javax.usb.UsbIrp |
---|
getAcceptShortPacket, getActualLength, getData, getLength, getOffset, getUsbException, isComplete, isUsbException, setAcceptShortPacket, setActualLength, setComplete, setData, setData, setLength, setOffset, setUsbException, waitUntilComplete, waitUntilComplete |
Constructor Detail |
---|
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.Method Detail |
---|
public byte bmRequestType()
bmRequestType
in interface UsbControlIrp
public byte bRequest()
bRequest
in interface UsbControlIrp
public short wValue()
wValue
in interface UsbControlIrp
public short wIndex()
wIndex
in interface UsbControlIrp
public 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
.
complete
in interface UsbIrp
complete
in class UsbIrpImp
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:
bmRequestType
bRequest
wValue
's LSB (Least Significant Byte)wValue
's MSB (Most Significant Byte)wIndex
's LSBwIndex
's MSBwLength
's LSBwLength
's MSB
public UsbDeviceImp getUsbDeviceImp()
public void setUsbDeviceImp(UsbDeviceImp device)
device
- The UsbDeviceImp.public static void checkUsbControlIrp(UsbControlIrp irp) throws java.lang.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.
java.lang.IllegalArgumentException
- If the UsbControlIrp is not valid.
UsbException
- If the UsbControlIrp is not ready for submission.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |