com.acces.aiousb
Class USB_AI16_Family

java.lang.Object
  extended by com.acces.aiousb.USBDevice
      extended by com.acces.aiousb.USB_AI16_Family

public class USB_AI16_Family
extends USBDevice

Class USB_AI16_Family represents a USB-AI16-family device, which encompasses the following product IDs:
USB_AI16_16A, USB_AI16_16E, USB_AI12_16A, USB_AI12_16, USB_AI12_16E, USB_AI16_64MA, USB_AI16_64ME, USB_AI12_64MA,
USB_AI12_64M, USB_AI12_64ME, USB_AI16_32A, USB_AI16_32E, USB_AI12_32A, USB_AI12_32, USB_AI12_32E, USB_AI16_64A,
USB_AI16_64E, USB_AI12_64A, USB_AI12_64, USB_AI12_64E, USB_AI16_96A, USB_AI16_96E, USB_AI12_96A, USB_AI12_96,
USB_AI12_96E, USB_AI16_128A, USB_AI16_128E, USB_AI12_128A, USB_AI12_128, USB_AI12_128E.

Instances of class USB_AI16_Family are automatically created by the USB device manager when they are detected on the bus. You should use one of the USBDeviceManager search methods, such as USBDeviceManager.getDeviceByProductID(), to obtain a reference to a USB_AI16_Family instance. You can then cast the USBDevice reference obtained from one of those methods to a USB_AI16_Family and make use of this class' methods, like so:

USBDevice[] devices = deviceManager.getDeviceByProductID( USBDeviceManager.USB_AI12_32A, USBDeviceManager.USB_AI12_32E );
if( devices.length > 0 )
  USB_AI16_Family device = ( USB_AI16_Family ) devices[ 0 ];


Field Summary
 
Fields inherited from class com.acces.aiousb.USBDevice
CLEAR_FIFO_METHOD_AUTO, CLEAR_FIFO_METHOD_IMMEDIATE, CLEAR_FIFO_METHOD_IMMEDIATE_AND_ABORT, CLEAR_FIFO_METHOD_WAIT, CUSTOM_EEPROM_SIZE
 
Method Summary
 AnalogInputSubsystem adc()
          Gets a reference to the analog input subsystem of this device.
 CounterSubsystem ctr()
          Gets a reference to the counter/timer subsystem of this device.
 DigitalIOSubsystem dio()
          Gets a reference to the digital I/O subsystem of this device.
static int[] getSupportedProductIDs()
          Gets an array of all the product IDs supported by this USB device family.
static java.lang.String[] getSupportedProductNames()
          Gets an array of all the product names supported by this USB device family.
static boolean isSupportedProductID(int productID)
          Tells if a given product ID is supported by this USB device family.
 java.io.PrintStream print(java.io.PrintStream stream)
          Prints the properties of this device and all of its subsystems.
 
Methods inherited from class com.acces.aiousb.USBDevice
customEEPROMRead, customEEPROMWrite, getCommTimeout, getDeviceIndex, getName, getProductID, getSerialNumber, reset, setCommTimeout
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getSupportedProductNames

public static java.lang.String[] getSupportedProductNames()
Gets an array of all the product names supported by this USB device family.

Although this method is static, an instance of USBDeviceManager must be created and be "open" for use before this method can be used. This stipulation is imposed because the underlying library must be initialized in order for product name/ID lookups to succeed, and that initialization occurs only when an instance of USBDeviceManager is created and its open() method is called.

Returns:
An array of product names, sorted in ascending order of product ID.

getSupportedProductIDs

public static int[] getSupportedProductIDs()
Gets an array of all the product IDs supported by this USB device family.

Returns:
An array of product IDs, sorted in ascending order.

isSupportedProductID

public static boolean isSupportedProductID(int productID)
Tells if a given product ID is supported by this USB device family.

Parameters:
productID - the product ID to check.
Returns:
True if the given product ID is supported by this USB device family; otherwise, false.

print

public java.io.PrintStream print(java.io.PrintStream stream)
Prints the properties of this device and all of its subsystems. Mainly useful for diagnostic purposes.

Overrides:
print in class USBDevice
Parameters:
stream - the print stream where properties will be printed.
Returns:
The print stream.

adc

public AnalogInputSubsystem adc()
Gets a reference to the analog input subsystem of this device.

Returns:
A reference to the analog input subsystem.

dio

public DigitalIOSubsystem dio()
Gets a reference to the digital I/O subsystem of this device.

Returns:
A reference to the digital I/O subsystem.

ctr

public CounterSubsystem ctr()
Gets a reference to the counter/timer subsystem of this device.

Returns:
A reference to the counter/timer subsystem.