usb.windows
Class NonJUSB

java.lang.Object
  |
  +--usb.core.Device
        |
        +--usb.windows.DeviceImpl
              |
              +--usb.windows.NonJUSB
All Implemented Interfaces:
DeviceSPI, java.io.Serializable

public class NonJUSB
extends DeviceImpl
implements DeviceSPI

Provides all functionality from the DeviceImpl class. A device in that class is not using the jUSB driver and is therefore not suited for the jUSB API

See Also:
Serialized Form

Field Summary
 
Fields inherited from class usb.windows.DeviceImpl
configuration, descriptor, EXTERNAL_HUB, NO_DEVICE_CONNECTED, USB_DEVICE
 
Fields inherited from class usb.core.Device
DEVICE_REMOTE_WAKEUP, DEVICE_SELFPOWERED
 
Constructor Summary
NonJUSB(USB bus, DeviceImpl hub, java.lang.String devicePath, int address, java.lang.String driverKeyName, java.lang.String friendlyDevName, java.lang.String uniqueID, int portIndex)
          Creates a new instance of NonJUSB devices, such as an external hub or an usb device
 
Method Summary
 void claimInterface(int ifnum)
          Never available, because this device does not use the jUSB driver.
 int clearHalt(byte ep)
          Never available, because this device does not use the jUSB driver.
 java.lang.String getClaimer(int ifnum)
          Never available, because this device does not use the jUSB driver.
 byte[] getConfigBuf(int n)
          Never available, because this device does not use the jUSB driver.
 java.lang.String getSpeed()
          Never available, because this device does not use the jUSB driver.
 byte[] readBulk(int ep, int length)
          Never available, because this device does not use the jUSB driver.
 byte[] readControl(byte type, byte request, short value, short index, short length)
          Never available, because this device does not use the jUSB driver.
 byte[] readIntr(int ep, int len)
          Never available, because this device does not use the jUSB driver.
 void releaseInterface(int ifnum)
          Never available, because this device does not use the jUSB driver.
 void setInterface(int ifnum, int alt)
          Never available, because this device does not use the jUSB driver.
 void writeBulk(int ep, byte[] buf)
          Never available, because this device does not use the jUSB driver.
 void writeControl(byte type, byte request, short value, short index, byte[] buf)
          Never available, because this device does not use the jUSB driver.
 void writeIntr(int ep, byte[] buf)
          Never available, because this device does not use the jUSB driver.
 
Methods inherited from class usb.windows.DeviceImpl
closeHandle, getChild, getConfiguration, getConfiguration, getConfigurationDescriptor, getDeviceDescriptor, getDeviceDescriptor, getDeviceFriendlyName, getDevicePath, getDriverKeyName, getFriendlyDeviceName, getHub, getHubPortNum, getNumPorts, getUniqueDeviceID, openHandle, printByteArray
 
Methods inherited from class usb.core.Device
control, getAddress, getBus, getPortIdentifier, getSPI, getString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface usb.core.DeviceSPI
getChild
 

Constructor Detail

NonJUSB

public NonJUSB(USB bus,
               DeviceImpl hub,
               java.lang.String devicePath,
               int address,
               java.lang.String driverKeyName,
               java.lang.String friendlyDevName,
               java.lang.String uniqueID,
               int portIndex)
        throws java.io.IOException
Creates a new instance of NonJUSB devices, such as an external hub or an usb device

Method Detail

claimInterface

public void claimInterface(int ifnum)
                    throws java.io.IOException
Never available, because this device does not use the jUSB driver.

Specified by:
claimInterface in interface DeviceSPI
Parameters:
ifnum - Number from the descriptor, returned by Interface.getNumber().
java.io.IOException
See Also:
DeviceSPI.releaseInterface(int)

clearHalt

public int clearHalt(byte ep)
              throws java.io.IOException
Never available, because this device does not use the jUSB driver.

Specified by:
clearHalt in interface DeviceSPI
Parameters:
ep - Endpoint address and direction, as returned by Endpoint.getEndpoint().
java.io.IOException

getClaimer

public java.lang.String getClaimer(int ifnum)
                            throws java.io.IOException
Never available, because this device does not use the jUSB driver.

Specified by:
getClaimer in interface DeviceSPI
Parameters:
ifnum - Number from the descriptor, returned by Interface.getNumber().
Returns:
Driver name, or null to indicate the interface is not in use by any driver. Driver names are not standardized between host operating systems.
java.io.IOException

getConfigBuf

public byte[] getConfigBuf(int n)
                    throws java.io.IOException
Never available, because this device does not use the jUSB driver.

Specified by:
getConfigBuf in interface DeviceSPI
Parameters:
n - Number of the configuration, from zero to the limit specified by DeviceDescriptor.getNumConfigurations()
java.io.IOException

readBulk

public byte[] readBulk(int ep,
                       int length)
                throws java.io.IOException
Never available, because this device does not use the jUSB driver.

Specified by:
readBulk in interface DeviceSPI
Parameters:
ep - Endpoint direction and address, as specified in an endpoint descriptor by Endpoint.getEndpoint().
length - How many bytes to read.
Returns:
The bytes actually read.
java.io.IOException

readControl

public byte[] readControl(byte type,
                          byte request,
                          short value,
                          short index,
                          short length)
                   throws java.io.IOException
Never available, because this device does not use the jUSB driver.

Specified by:
readControl in interface DeviceSPI
Parameters:
type - Masked together using three constants from ControlMessage: DIR_TO_HOST, a TYPE_*, and a RECIP_*.
request - bRequest field, either standard (from table 9-3 in the USB 2.0 specification) for TYPE_STANDARD, or else as specified in the class or vendor device type specification.
value - sixteen bit field associated with request
index - sixteen bit field associated with request
length - How much data should be read; may be zero to indicate that no READ phase follows the SETUP packet.
Returns:
The data read from the device. If this is shorter than the requested length, the caller must determine whether to treat that as an error. For example, it's typical to request a full size string descriptor, expecting to get back only the bytes that exist, rather than read a partial descriptor to learn the size, and then reading the whole thing.
java.io.IOException

readIntr

public byte[] readIntr(int ep,
                       int len)
                throws java.io.IOException
Never available, because this device does not use the jUSB driver.

Specified by:
readIntr in interface DeviceSPI
Parameters:
ep - Endpoint direction and address, as specified in an endpoint descriptor by Endpoint.getEndpoint().
Returns:
The bytes actually read.
java.io.IOException

releaseInterface

public void releaseInterface(int ifnum)
                      throws java.io.IOException
Never available, because this device does not use the jUSB driver.

Specified by:
releaseInterface in interface DeviceSPI
Parameters:
ifnum - Number from the descriptor, returned by Interface.getNumber().
java.io.IOException
See Also:
DeviceSPI.claimInterface(int)

setInterface

public void setInterface(int ifnum,
                         int alt)
                  throws java.io.IOException
Never available, because this device does not use the jUSB driver.

Specified by:
setInterface in interface DeviceSPI
Parameters:
ifnum - Number from the descriptor, returned by Interface.getNumber().
alt - Number from the descriptor, returned by Interface.getAlternateSetting().
java.io.IOException

writeBulk

public void writeBulk(int ep,
                      byte[] buf)
               throws java.io.IOException
Never available, because this device does not use the jUSB driver.

Specified by:
writeBulk in interface DeviceSPI
Parameters:
ep - Endpoint direction and address, as specified in an endpoint descriptor by Endpoint.getEndpoint().
buf - The bytes to write.
java.io.IOException

writeControl

public void writeControl(byte type,
                         byte request,
                         short value,
                         short index,
                         byte[] buf)
                  throws java.io.IOException
Never available, because this device does not use the jUSB driver.

Specified by:
writeControl in interface DeviceSPI
Parameters:
type - Masked together using three constants from ControlMessage: DIR_TO_DEVICE, a TYPE_*, and a RECIP_*.
request - bRequest field, either standard (from table 9-3 in the USB 2.0 specification) for TYPE_STANDARD, or else as specified in the class or vendor device type specification.
value - sixteen bit field associated with request
index - sixteen bit field associated with request
buf - The data to be written. Length may be zero to indicate that no WRITe phase follows the SETUP packet.
java.io.IOException

writeIntr

public void writeIntr(int ep,
                      byte[] buf)
               throws java.io.IOException
Never available, because this device does not use the jUSB driver.

Specified by:
writeIntr in interface DeviceSPI
Parameters:
ep - Endpoint direction and address, as specified in an endpoint descriptor by Endpoint.getEndpoint().
buf - The bytes to write.
java.io.IOException

getSpeed

public java.lang.String getSpeed()
Never available, because this device does not use the jUSB driver.

Overrides:
getSpeed in class DeviceImpl