com.ibm.jusb.os.linux
Class LinuxUsbServices

java.lang.Object
  extended by com.ibm.jusb.os.AbstractUsbServices
      extended by com.ibm.jusb.os.linux.LinuxUsbServices
All Implemented Interfaces:
UsbServices

public class LinuxUsbServices
extends com.ibm.jusb.os.AbstractUsbServices
implements UsbServices

UsbServices implementation for Linux platform.

Author:
Dan Streetman

Field Summary
static int MAX_FIRST_UPDATE_DELAY
           
static int TOPOLOGY_UPDATE_DELAY
           
static String TOPOLOGY_UPDATE_DELAY_KEY
           
static int TOPOLOGY_UPDATE_NEW_DEVICE_DELAY
           
static String TOPOLOGY_UPDATE_NEW_DEVICE_DELAY_KEY
           
static boolean TOPOLOGY_UPDATE_USE_POLLING
           
static String TOPOLOGY_UPDATE_USE_POLLING_KEY
           
protected  int topologyUpdateDelay
           
protected  int topologyUpdateNewDeviceDelay
           
protected  boolean topologyUpdateUsePolling
           
static String TRACE_DEFAULT
           
static String TRACE_FILENAME
           
static String TRACE_HOTPLUG
           
static String TRACE_LEVEL
           
static String TRACE_OUTPUT
           
static String TRACE_URB
           
static String TRACE_XFER
           
static String TRACING
           
 
Fields inherited from class com.ibm.jusb.os.AbstractUsbServices
listenerImp
 
Constructor Summary
LinuxUsbServices()
           
 
Method Summary
 String getApiVersion()
           
 String getImpDescription()
           
 String getImpVersion()
           
 UsbHub getRootUsbHub()
           
protected  boolean isUsbDevicesEqual(com.ibm.jusb.UsbDeviceImp dev1, com.ibm.jusb.UsbDeviceImp dev2)
          Return if the specified devices appear to be equal.
protected  void setActiveConfigAndInterfaceSettings(com.ibm.jusb.UsbDeviceImp device)
          Find and set the active config and interface settings for this device.
 
Methods inherited from class com.ibm.jusb.os.AbstractUsbServices
addUsbServicesListener, getRootUsbHubImp, removeUsbServicesListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface javax.usb.UsbServices
addUsbServicesListener, removeUsbServicesListener
 

Field Detail

topologyUpdateUsePolling

protected boolean topologyUpdateUsePolling

topologyUpdateDelay

protected int topologyUpdateDelay

topologyUpdateNewDeviceDelay

protected int topologyUpdateNewDeviceDelay

MAX_FIRST_UPDATE_DELAY

public static final int MAX_FIRST_UPDATE_DELAY
See Also:
Constant Field Values

TOPOLOGY_UPDATE_DELAY

public static final int TOPOLOGY_UPDATE_DELAY
See Also:
Constant Field Values

TOPOLOGY_UPDATE_DELAY_KEY

public static final String TOPOLOGY_UPDATE_DELAY_KEY
See Also:
Constant Field Values

TOPOLOGY_UPDATE_NEW_DEVICE_DELAY

public static final int TOPOLOGY_UPDATE_NEW_DEVICE_DELAY
See Also:
Constant Field Values

TOPOLOGY_UPDATE_NEW_DEVICE_DELAY_KEY

public static final String TOPOLOGY_UPDATE_NEW_DEVICE_DELAY_KEY
See Also:
Constant Field Values

TOPOLOGY_UPDATE_USE_POLLING

public static final boolean TOPOLOGY_UPDATE_USE_POLLING
See Also:
Constant Field Values

TOPOLOGY_UPDATE_USE_POLLING_KEY

public static final String TOPOLOGY_UPDATE_USE_POLLING_KEY
See Also:
Constant Field Values

TRACING

public static final String TRACING
See Also:
Constant Field Values

TRACE_OUTPUT

public static final String TRACE_OUTPUT
See Also:
Constant Field Values

TRACE_FILENAME

public static final String TRACE_FILENAME
See Also:
Constant Field Values

TRACE_LEVEL

public static final String TRACE_LEVEL
See Also:
Constant Field Values

TRACE_DEFAULT

public static final String TRACE_DEFAULT
See Also:
Constant Field Values

TRACE_HOTPLUG

public static final String TRACE_HOTPLUG
See Also:
Constant Field Values

TRACE_XFER

public static final String TRACE_XFER
See Also:
Constant Field Values

TRACE_URB

public static final String TRACE_URB
See Also:
Constant Field Values
Constructor Detail

LinuxUsbServices

public LinuxUsbServices()
                 throws UsbException
Throws:
UsbException
Method Detail

getRootUsbHub

public UsbHub getRootUsbHub()
                     throws UsbException
Specified by:
getRootUsbHub in interface UsbServices
Overrides:
getRootUsbHub in class com.ibm.jusb.os.AbstractUsbServices
Returns:
The virtual USB root hub
Throws:
UsbException

getApiVersion

public String getApiVersion()
Specified by:
getApiVersion in interface UsbServices
Returns:
The minimum API version this supports.

getImpVersion

public String getImpVersion()
Specified by:
getImpVersion in interface UsbServices
Returns:
The version number of this implementation.

getImpDescription

public String getImpDescription()
Specified by:
getImpDescription in interface UsbServices
Returns:
Get a description of this UsbServices implementation.

isUsbDevicesEqual

protected boolean isUsbDevicesEqual(com.ibm.jusb.UsbDeviceImp dev1,
                                    com.ibm.jusb.UsbDeviceImp dev2)
Return if the specified devices appear to be equal.

If either of the device's descriptors are null, this returns false.

Parameters:
dev1 - The first device.
dev2 - The second device.
Returns:
If the devices appear to be equal.

setActiveConfigAndInterfaceSettings

protected void setActiveConfigAndInterfaceSettings(com.ibm.jusb.UsbDeviceImp device)
Find and set the active config and interface settings for this device.

Parameters:
device - The UsbDeviceImp.


Copyright © 2013. All Rights Reserved.