AIOUSB::USB_DIO_16_Family Class Reference

#include <USB_DIO_16_Family.hpp>

Inheritance diagram for AIOUSB::USB_DIO_16_Family:

Inheritance graph
[legend]
Collaboration diagram for AIOUSB::USB_DIO_16_Family:

Collaboration graph
[legend]

List of all members.

Public Member Functions

virtual std::ostream & print (std::ostream &out)
DigitalIOSubsystemdio ()
DIOStreamSubsystemdiostream ()

Static Public Member Functions

static StringArray getSupportedProductNames ()
static IntArray getSupportedProductIDs ()
static bool isSupportedProductID (int productID)

Protected Member Functions

 USB_DIO_16_Family (int productID, int deviceIndex)
virtual ~USB_DIO_16_Family ()

Protected Attributes

DigitalIOSubsystem digitalIOSubsystem
DIOStreamSubsystem dioStreamSubsystem

Friends

class USBDeviceManager


Detailed Description

Class USB_DIO_16_Family represents a USB-DIO-16-family device, which encompasses the following product IDs:
USB_DI16A_REV_A1, USB_DO16A_REV_A1, USB_DI16A_REV_A2, USB_DIO_16H, USB_DI16A, USB_DO16A, USB_DIO_16A.

Instances of class USB_DIO_16_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( int productID ) const, to obtain a reference to a USB_DIO_16_Family instance. You can then cast the USBDevice reference obtained from one of those methods to a USB_DIO_16_Family and make use of this class' methods, like so:
USBDeviceArray devices = deviceManager.getDeviceByProductID( USB_DIO_16H, USB_DIO_16A );
if( devices.size() > 0 )
  USB_DIO_16_Family &device = *( USB_DIO_16_Family * ) devices.at( 0 );

Constructor & Destructor Documentation

AIOUSB::USB_DIO_16_Family::USB_DIO_16_Family ( int  productID,
int  deviceIndex 
) [protected]

AIOUSB::USB_DIO_16_Family::~USB_DIO_16_Family (  )  [protected, virtual]


Member Function Documentation

DigitalIOSubsystem& AIOUSB::USB_DIO_16_Family::dio (  )  [inline]

Gets a reference to the digital I/O subsystem of this device.

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

DIOStreamSubsystem& AIOUSB::USB_DIO_16_Family::diostream (  )  [inline]

Gets a reference to the digital I/O streaming subsystem of this device.

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

IntArray AIOUSB::USB_DIO_16_Family::getSupportedProductIDs (  )  [static]

Gets an array of all the product IDs supported by this USB device family.

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

StringArray AIOUSB::USB_DIO_16_Family::getSupportedProductNames (  )  [static]

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 USBDeviceManager::open() method is called.

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

bool AIOUSB::USB_DIO_16_Family::isSupportedProductID ( int  productID  )  [static]

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.

ostream & AIOUSB::USB_DIO_16_Family::print ( std::ostream &  out  )  [virtual]

Prints the properties of this device and all of its subsystems. Mainly useful for diagnostic purposes.

Parameters:
out the print stream where properties will be printed.
Returns:
The print stream.

Reimplemented from AIOUSB::USBDevice.


Friends And Related Function Documentation

friend class USBDeviceManager [friend]

Reimplemented from AIOUSB::USBDevice.


Member Data Documentation


doxygen