com.ibm.jusb.os.linux
Class LinuxSetInterfaceRequest

java.lang.Object
  extended by com.ibm.jusb.os.linux.LinuxSetInterfaceRequest

public class LinuxSetInterfaceRequest
extends java.lang.Object

Interface for interface-changing Requests.

Author:
Dan Streetman

Nested Class Summary
static interface LinuxRequest.Completion
           
 
Field Summary
static int LINUX_CLAIM_INTERFACE_REQUEST
           
static int LINUX_IS_CLAIMED_INTERFACE_REQUEST
           
static int LINUX_ISOCHRONOUS_REQUEST
           
static int LINUX_PIPE_REQUEST
           
static int LINUX_RELEASE_INTERFACE_REQUEST
           
static int LINUX_SET_CONFIGURATION_REQUEST
           
static int LINUX_SET_INTERFACE_REQUEST
           
 
Constructor Summary
LinuxSetInterfaceRequest()
           
 
Method Summary
 byte bmRequestType()
           
 byte bRequest()
           
 void completeUsbIrp()
          Complete the UsbIrp
 boolean getAcceptShortPacket()
           
 LinuxRequest.Completion getCompletion()
           
 byte[] getData()
           
 byte getDirection()
           
 byte getEndpointAddress()
           
 int getError()
           
 int getInterface()
           
 int getLength()
           
 int getOffset()
           
 int getPipeType()
           
 int getSetting()
           
 byte[] getSetupPacket()
           
 int getType()
          Get the type of this request.
 long getUrbAddress()
           
 UsbIrpImp getUsbIrpImp()
           
 boolean isCompleted()
           
 void notifyCompleted()
          Notify waiteers of completion.
 void setActualLength(int len)
           
 void setCompleted(boolean c)
          Set completed.
 void setCompletion(LinuxRequest.Completion c)
           
 void setEndpointAddress(byte addr)
           
 void setError(int error)
           
 void setPipeType(byte type)
           
 void setUrbAddress(long address)
           
 void setUsbIrpImp(UsbControlIrpImp irp)
           
 void setUsbIrpImp(UsbIrpImp irp)
           
 void waitUntilCompleted()
          Wait forever until completed.
 void waitUntilCompleted(long timeout)
          Wait until completed.
 short wIndex()
           
 short wValue()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LINUX_PIPE_REQUEST

public static final int LINUX_PIPE_REQUEST
See Also:
Constant Field Values

LINUX_SET_INTERFACE_REQUEST

public static final int LINUX_SET_INTERFACE_REQUEST
See Also:
Constant Field Values

LINUX_SET_CONFIGURATION_REQUEST

public static final int LINUX_SET_CONFIGURATION_REQUEST
See Also:
Constant Field Values

LINUX_CLAIM_INTERFACE_REQUEST

public static final int LINUX_CLAIM_INTERFACE_REQUEST
See Also:
Constant Field Values

LINUX_IS_CLAIMED_INTERFACE_REQUEST

public static final int LINUX_IS_CLAIMED_INTERFACE_REQUEST
See Also:
Constant Field Values

LINUX_RELEASE_INTERFACE_REQUEST

public static final int LINUX_RELEASE_INTERFACE_REQUEST
See Also:
Constant Field Values

LINUX_ISOCHRONOUS_REQUEST

public static final int LINUX_ISOCHRONOUS_REQUEST
See Also:
Constant Field Values
Constructor Detail

LinuxSetInterfaceRequest

public LinuxSetInterfaceRequest()
Method Detail

getType

public int getType()
Get the type of this request.

Returns:
This request's type.

getInterface

public int getInterface()
Returns:
The interface number

getSetting

public int getSetting()
Returns:
The interface setting

setUsbIrpImp

public void setUsbIrpImp(UsbControlIrpImp irp)
Parameters:
irp - The UsbControlIrpImp

setUsbIrpImp

public void setUsbIrpImp(UsbIrpImp irp)
Parameters:
irp - The (Control)UsbIrpImp

bmRequestType

public byte bmRequestType()
Returns:
The bmRequestType

bRequest

public byte bRequest()
Returns:
The bRequest

wValue

public short wValue()
Returns:
The wValue

wIndex

public short wIndex()
Returns:
The wIndex

getSetupPacket

public byte[] getSetupPacket()
Returns:
The setup packet

getDirection

public byte getDirection()
Returns:
The direction of this request

getData

public byte[] getData()
Returns:
this request's data buffer

getOffset

public int getOffset()
Returns:
The offset of the data

getLength

public int getLength()
Returns:
The length of the data

getAcceptShortPacket

public boolean getAcceptShortPacket()
Returns:
if Short Packet Detection should be enabled

setActualLength

public void setActualLength(int len)
Parameters:
len - The actual length.

getUsbIrpImp

public UsbIrpImp getUsbIrpImp()
Returns:
the assocaited UsbIrpImp

getUrbAddress

public long getUrbAddress()
Returns:
the address of the assocaited URB

setUrbAddress

public void setUrbAddress(long address)
Parameters:
address - the address of the assocaited URB

setCompleted

public void setCompleted(boolean c)
Set completed.

Parameters:
c - If this is completed or not

completeUsbIrp

public void completeUsbIrp()
Complete the UsbIrp


setPipeType

public void setPipeType(byte type)
Parameters:
type - The pipe type.

setEndpointAddress

public void setEndpointAddress(byte addr)
Parameters:
addr - The endpoint address

getPipeType

public int getPipeType()
Returns:
The type of pipe

getEndpointAddress

public byte getEndpointAddress()
Returns:
the endpoint address

getError

public int getError()
Returns:
The error that occured, or 0 if none occurred.

setError

public void setError(int error)
Parameters:
error - The number of the error that occurred.

waitUntilCompleted

public void waitUntilCompleted()
Wait forever until completed.


waitUntilCompleted

public void waitUntilCompleted(long timeout)
Wait until completed.


isCompleted

public boolean isCompleted()
Returns:
If this is completed.

notifyCompleted

public void notifyCompleted()
Notify waiteers of completion.


setCompletion

public void setCompletion(LinuxRequest.Completion c)
Parameters:
c - The Completion.

getCompletion

public LinuxRequest.Completion getCompletion()
Returns:
The Completion