|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.acces.aiousb.USBDeviceManager
public class USBDeviceManager
Class USBDeviceManager manages all the USB devices on the bus. It scans the bus and builds a list of all the devices found. It also initializes and terminates use of the underlying AIOUSB module.
Field Summary | |
---|---|
static int |
PICO_DIO16RO8
|
static int |
SUCCESS
Indicates that underlying AIOUSB module operation succeeded. |
static int |
USB_AI12_128
|
static int |
USB_AI12_128A
|
static int |
USB_AI12_128E
|
static int |
USB_AI12_16
|
static int |
USB_AI12_16A
|
static int |
USB_AI12_16E
|
static int |
USB_AI12_32
|
static int |
USB_AI12_32A
|
static int |
USB_AI12_32E
|
static int |
USB_AI12_64
|
static int |
USB_AI12_64A
|
static int |
USB_AI12_64E
|
static int |
USB_AI12_64M
|
static int |
USB_AI12_64MA
|
static int |
USB_AI12_64ME
|
static int |
USB_AI12_96
|
static int |
USB_AI12_96A
|
static int |
USB_AI12_96E
|
static int |
USB_AI16_128A
|
static int |
USB_AI16_128E
|
static int |
USB_AI16_16A
|
static int |
USB_AI16_16E
|
static int |
USB_AI16_32A
|
static int |
USB_AI16_32E
|
static int |
USB_AI16_64A
|
static int |
USB_AI16_64E
|
static int |
USB_AI16_64MA
|
static int |
USB_AI16_64ME
|
static int |
USB_AI16_96A
|
static int |
USB_AI16_96E
|
static int |
USB_AO12_12
|
static int |
USB_AO12_12A
|
static int |
USB_AO12_16
|
static int |
USB_AO12_16A
|
static int |
USB_AO12_4
|
static int |
USB_AO12_4A
|
static int |
USB_AO12_8
|
static int |
USB_AO12_8A
|
static int |
USB_AO16_12
|
static int |
USB_AO16_12A
|
static int |
USB_AO16_16
|
static int |
USB_AO16_16A
|
static int |
USB_AO16_4
|
static int |
USB_AO16_4A
|
static int |
USB_AO16_8
|
static int |
USB_AO16_8A
|
static int |
USB_CTR_15
|
static int |
USB_DA12_8A
|
static int |
USB_DA12_8A_REV_A
|
static int |
USB_DA12_8E
|
static int |
USB_DI16A
|
static int |
USB_DI16A_REV_A1
|
static int |
USB_DI16A_REV_A2
|
static int |
USB_DIO_16A
|
static int |
USB_DIO_16H
|
static int |
USB_DIO_32
|
static int |
USB_DIO_48
|
static int |
USB_DIO_96
|
static int |
USB_DIO16RO8
|
static int |
USB_DO16A
|
static int |
USB_DO16A_REV_A1
|
static int |
USB_IDIO_16
|
static int |
USB_IDIO_4
|
static int |
USB_IDIO_8
|
static int |
USB_IDO_16
|
static int |
USB_II_16
|
static int |
USB_II_16_OLD
|
static int |
USB_II_8
|
static int |
USB_II_8_OLD
|
static int |
USB_IIRO_16
|
static int |
USB_IIRO_4
|
static int |
USB_IIRO_8
|
static int |
USB_IIRO4_2SM
|
static int |
USB_IIRO4_COM
|
static int |
USB_RO_16
|
static java.lang.String |
VERSION_DATE
The version date of this Java class library. |
static java.lang.String |
VERSION_NUMBER
The version number of this Java class library. |
Constructor Summary | |
---|---|
USBDeviceManager()
Constructor for USB device manager. |
Method Summary | |
---|---|
USBDeviceManager |
close()
"Closes" the USB device manager for use. |
java.lang.String |
getAIOUSBVersion()
Gets the version number of the underlying AIOUSB module. |
java.lang.String |
getAIOUSBVersionDate()
Gets the version date of the underlying AIOUSB module. |
java.util.Vector<USBDevice> |
getDeviceByProductID(int productID)
Gets a list of all the devices found on the bus matching the specified product ID. |
java.util.Vector<USBDevice> |
getDeviceByProductID(int minProductID,
int maxProductID)
Gets a list of all the devices found on the bus matching the specified product ID range. |
java.util.Vector<USBDevice> |
getDeviceBySerialNumber(long serialNumber)
Gets a list of all the devices found on the bus matching the specified serial number. |
static java.lang.String |
getResultCodeAsString(int result)
Gets the string representation of an AIOUSB result code, useful mainly for debugging purposes. |
boolean |
isOpen()
Tells if the USB device manager has been "opened" for use (see open() ). |
void |
listDevices()
Prints the properties of all the devices found on the bus to the standard output device. |
USBDeviceManager |
open()
"Opens" the USB device manager for use. |
java.io.PrintStream |
print(java.io.PrintStream stream)
Prints the properties of this device manager and all of the devices found on the bus to the specified print stream. |
USBDeviceManager |
printDevices()
Prints the properties of this device manager and all of the devices found on the bus to the standard output device. |
USBDeviceManager |
scanForDevices()
Re-scans the bus for devices. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String VERSION_NUMBER
public static final java.lang.String VERSION_DATE
public static final int SUCCESS
public static final int USB_DA12_8A_REV_A
public static final int USB_DA12_8A
public static final int USB_DA12_8E
public static final int USB_DIO_32
public static final int USB_DIO_48
public static final int USB_DIO_96
public static final int USB_DI16A_REV_A1
public static final int USB_DO16A_REV_A1
public static final int USB_DI16A_REV_A2
public static final int USB_DIO_16H
public static final int USB_DI16A
public static final int USB_DO16A
public static final int USB_DIO_16A
public static final int USB_IIRO_16
public static final int USB_II_16
public static final int USB_RO_16
public static final int USB_IIRO_8
public static final int USB_II_8
public static final int USB_IIRO_4
public static final int USB_IDIO_16
public static final int USB_II_16_OLD
public static final int USB_IDO_16
public static final int USB_IDIO_8
public static final int USB_II_8_OLD
public static final int USB_IDIO_4
public static final int USB_CTR_15
public static final int USB_IIRO4_2SM
public static final int USB_IIRO4_COM
public static final int USB_DIO16RO8
public static final int PICO_DIO16RO8
public static final int USB_AI16_16A
public static final int USB_AI16_16E
public static final int USB_AI12_16A
public static final int USB_AI12_16
public static final int USB_AI12_16E
public static final int USB_AI16_64MA
public static final int USB_AI16_64ME
public static final int USB_AI12_64MA
public static final int USB_AI12_64M
public static final int USB_AI12_64ME
public static final int USB_AI16_32A
public static final int USB_AI16_32E
public static final int USB_AI12_32A
public static final int USB_AI12_32
public static final int USB_AI12_32E
public static final int USB_AI16_64A
public static final int USB_AI16_64E
public static final int USB_AI12_64A
public static final int USB_AI12_64
public static final int USB_AI12_64E
public static final int USB_AI16_96A
public static final int USB_AI16_96E
public static final int USB_AI12_96A
public static final int USB_AI12_96
public static final int USB_AI12_96E
public static final int USB_AI16_128A
public static final int USB_AI16_128E
public static final int USB_AI12_128A
public static final int USB_AI12_128
public static final int USB_AI12_128E
public static final int USB_AO16_16A
public static final int USB_AO16_16
public static final int USB_AO16_12A
public static final int USB_AO16_12
public static final int USB_AO16_8A
public static final int USB_AO16_8
public static final int USB_AO16_4A
public static final int USB_AO16_4
public static final int USB_AO12_16A
public static final int USB_AO12_16
public static final int USB_AO12_12A
public static final int USB_AO12_12
public static final int USB_AO12_8A
public static final int USB_AO12_8
public static final int USB_AO12_4A
public static final int USB_AO12_4
Constructor Detail |
---|
public USBDeviceManager()
open()
before using the device manager.
Method Detail |
---|
public java.io.PrintStream print(java.io.PrintStream stream)
stream
- the print stream where properties will be printed.
public USBDeviceManager printDevices()
OperationFailedException
public java.lang.String getAIOUSBVersion()
public java.lang.String getAIOUSBVersionDate()
public void listDevices()
printDevices()
but is implemented
by the underlying AIOUSB module and produces different output than printDevices(). Mainly
useful for diagnostic purposes.
public static java.lang.String getResultCodeAsString(int result)
OperationFailedException
is thrown in response to an AIOUSB failure.
result
- an AIOUSB result code.
public boolean isOpen()
open()
).
public USBDeviceManager open()
close()
must be called. It is possible to call close() and then call open() again, which effectively
reinitializes everything.
OperationFailedException
public USBDeviceManager close()
open()
was properly called, close() must be called. Close() terminates
use of the underlying AIOUSB module and discards the list of devices found. You must terminate use of
all USB devices before calling close()! You can call open() again to reinitialize things
and reestablish connections to USB devices.
OperationFailedException
public USBDeviceManager scanForDevices()
open()
. You must terminate use of all USB devices before calling
scanForDevices()! After calling scanForDevices() you can reestablish
connections to USB devices.
OperationFailedException
public java.util.Vector<USBDevice> getDeviceByProductID(int productID)
productID
- the product ID to search for.
public java.util.Vector<USBDevice> getDeviceByProductID(int minProductID, int maxProductID)
minProductID
- the minimum product ID to search for.maxProductID
- the maximum product ID to search for.
java.lang.IllegalArgumentException
public java.util.Vector<USBDevice> getDeviceBySerialNumber(long serialNumber)
serialNumber
- the serial number to search for.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |