jAER project on SourceForge

net.sf.jaer.hardwareinterface.usb.linux
Class HardwareInterfaceFactoryLinux

java.lang.Object
  extended by net.sf.jaer.hardwareinterface.usb.linux.HardwareInterfaceFactoryLinux
All Implemented Interfaces:
HardwareInterfaceFactoryInterface

public class HardwareInterfaceFactoryLinux
extends java.lang.Object
implements HardwareInterfaceFactoryInterface

Makes hardware interfaces under linux.

Author:
tobi

Method Summary
 HardwareInterface getFirstAvailableInterface()
          Gets the first available interface.
 HardwareInterface getInterface(int n)
          build list of devices and return the n'th one, 0 based
 int getNumInterfacesAvailable()
          Says how many total of all types of hardware are available
static java.util.List getUsbDevicesWithId(javax.usb.UsbDevice usbDevice, short vendorId, short productId)
          Get a List of all devices that match the specified vendor and product id.
static javax.usb.UsbHub getVirtualRootUsbHub()
          Get the virtual root UsbHub.
static HardwareInterfaceFactoryLinux instance()
          Use this instance to access the methods, e.g.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

instance

public static HardwareInterfaceFactoryLinux instance()
Use this instance to access the methods, e.g. HardwareInterfaceFactoryLinux.instance().getNumInterfacesAvailable().

Returns:
the singleton instance.

getNumInterfacesAvailable

public int getNumInterfacesAvailable()
Says how many total of all types of hardware are available

Specified by:
getNumInterfacesAvailable in interface HardwareInterfaceFactoryInterface
Returns:
number of devices

getFirstAvailableInterface

public HardwareInterface getFirstAvailableInterface()
Description copied from interface: HardwareInterfaceFactoryInterface
Gets the first available interface.

Specified by:
getFirstAvailableInterface in interface HardwareInterfaceFactoryInterface
Returns:
first available interface, starting with CypressFX2 and then going to SiLabsC8051F320

getInterface

public HardwareInterface getInterface(int n)
build list of devices and return the n'th one, 0 based

Specified by:
getInterface in interface HardwareInterfaceFactoryInterface
Parameters:
n - the number starting from 0
Returns:
the HardwareInterface

getVirtualRootUsbHub

public static javax.usb.UsbHub getVirtualRootUsbHub()
Get the virtual root UsbHub.

Returns:
The virtual root UsbHub.

getUsbDevicesWithId

public static java.util.List getUsbDevicesWithId(javax.usb.UsbDevice usbDevice,
                                                 short vendorId,
                                                 short productId)
Get a List of all devices that match the specified vendor and product id.

Parameters:
usbDevice - The UsbDevice to check.
vendorId - The vendor id to match.
productId - The product id to match.

jAER project on SourceForge