com.ibm.jusb.os.linux
Class LinuxSetConfigurationRequest

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

public class LinuxSetConfigurationRequest
extends Object

Interface for configuration-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
LinuxSetConfigurationRequest()
           
 
Method Summary
 byte bmRequestType()
           
 byte bRequest()
           
 void completeUsbIrp()
          Complete the UsbIrp
protected  void executeCompletion()
          Run the Completion.
 boolean getAcceptShortPacket()
           
 LinuxRequest.Completion getCompletion()
           
 int getConfiguration()
           
 byte[] getData()
           
 byte getDirection()
           
 byte getEndpointAddress()
           
 int getError()
           
 int getLength()
           
 int getOffset()
           
 int getPipeType()
           
 byte[] getSetupPacket()
           
 int getType()
          Get the type of this request.
 long getUrbAddress()
           
 com.ibm.jusb.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(com.ibm.jusb.UsbControlIrpImp irp)
           
 void setUsbIrpImp(com.ibm.jusb.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
clone, equals, finalize, 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

LinuxSetConfigurationRequest

public LinuxSetConfigurationRequest()
Method Detail

getType

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

Returns:
This request's type.

getConfiguration

public int getConfiguration()
Returns:
The configuration number

setUsbIrpImp

public void setUsbIrpImp(com.ibm.jusb.UsbControlIrpImp irp)
Parameters:
irp - The UsbControlIrpImp

setUsbIrpImp

public void setUsbIrpImp(com.ibm.jusb.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 com.ibm.jusb.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.


executeCompletion

protected void executeCompletion()
Run the Completion.


setCompletion

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

getCompletion

public LinuxRequest.Completion getCompletion()
Returns:
The Completion


Copyright © 2013. All Rights Reserved.