AIOUSB::DIOStreamSubsystem Class Reference
#include <DIOStreamSubsystem.hpp>
List of all members.
Detailed Description
Class
DIOStreamSubsystem represents the digital I/O streaming subsystem of a device. One accesses this counter/timer subsystem through its parent object, typically through a method such as
diostream() (see USB_DIO_16_Family::diostream()).
Constructor & Destructor Documentation
AIOUSB::DIOStreamSubsystem::DIOStreamSubsystem |
( |
USBDevice & |
parent |
) |
[protected] |
AIOUSB::DIOStreamSubsystem::~DIOStreamSubsystem |
( |
|
) |
[protected, virtual] |
Member Function Documentation
Clears the streaming FIFO, using one of several different methods.
- Parameters:
-
- Returns:
- This subsystem, useful for chaining together multiple operations.
Closes a digital I/O stream opened by a call to open( bool directionRead ).
- Returns:
- This subsystem, useful for chaining together multiple operations.
- Exceptions:
-
double AIOUSB::DIOStreamSubsystem::getClock |
( |
|
) |
const [inline] |
int AIOUSB::DIOStreamSubsystem::getStreamingBlockSize |
( |
|
) |
const [inline] |
Gets the current streaming block size.
- Returns:
- The current streaming block size. The value returned may not be the same as the value passed to setStreamingBlockSize( int blockSize ) because that value is rounded up to a whole multiple of 256.
- Exceptions:
-
Opens a digital I/O stream. When you are done using the stream, you must close it by calling close().
- Parameters:
-
| directionRead | true open the stream for reading; false open the stream for writing. |
- Returns:
- This subsystem, useful for chaining together multiple operations.
- Exceptions:
-
ostream & AIOUSB::DIOStreamSubsystem::print |
( |
std::ostream & |
out |
) |
[virtual] |
Prints the properties of this subsystem. Mainly useful for diagnostic purposes.
- Parameters:
-
| out | the print stream where properties will be printed. |
- Returns:
- The print stream.
Implements AIOUSB::DeviceSubsystem.
UShortArray AIOUSB::DIOStreamSubsystem::read |
( |
int |
numSamples |
) |
|
Reads a frame from a digital I/O stream opened by a call to open( true ). You cannot read from, and write to a stream. A stream may be read-only or write-only.
- Parameters:
-
| numSamples | the number of samples to read. |
- Returns:
- An array containing the samples read. The array may be smaller than the number of samples requested if fewer samples were received than were requested.
- Exceptions:
-
double AIOUSB::DIOStreamSubsystem::setClock |
( |
bool |
directionRead, |
|
|
double |
clockHz | |
|
) |
| | |
Sets the internal read/write clock speed of a digital I/O stream (see getClock()). Only one clock - the read or write clock - may be active at a time, so this method automatically turns off the clock not being set by this method. Therefore, do not call this method to explicitly turn off one of the clocks because it will turn off both of them. Also, when streaming between two devices, only one should have an active internal clock; the other should have its clocks turned off (see stopClock()).
- Parameters:
-
| directionRead | true sets read clock; false sets write clock. |
| clockHz | the frequency at which to stream the samples (in Hertz). |
- Returns:
- The actual frequency that will be generated, limited by the device's capabilities.
- Exceptions:
-
DIOStreamSubsystem& AIOUSB::DIOStreamSubsystem::setStreamingBlockSize |
( |
int |
blockSize |
) |
[inline] |
Sets the streaming block size.
- Parameters:
-
| blockSize | the streaming block size you wish to set. This will be rounded up to the next multiple of 256. |
- Returns:
- This subsystem, useful for chaining together multiple operations.
- Exceptions:
-
Stops the internal read/write clocks of a digital I/O stream.
- Returns:
- This subsystem, useful for chaining together multiple operations.
- Exceptions:
-
int AIOUSB::DIOStreamSubsystem::write |
( |
const UShortArray & |
values |
) |
|
Writes a frame to a digital I/O stream opened by a call to open( false ). You cannot read from, and write to a stream. A stream may be read-only or write-only.
- Parameters:
-
| values | an array containing the samples to write. |
- Returns:
- The number of samples actually written.
- Exceptions:
-
Friends And Related Function Documentation
Member Data Documentation