DAQFlex Plugins
0.9.8
|
#include <daqflexdigitalio.h>
Public Member Functions | |
DAQFlexDigitalIO (void) | |
DAQFlexDigitalIO (DAQFlexCore &daqflexdevice, const Options &opts) | |
virtual | ~DAQFlexDigitalIO (void) |
virtual int | open (DAQFlexCore &daqflexdevice) |
virtual int | open (Device &device) override |
virtual bool | isOpen (void) const |
virtual void | close (void) |
virtual int | lines (void) const |
virtual int | configureLine (unsigned int line, bool output) |
virtual int | configureLines (unsigned int lines, unsigned int output) |
virtual int | write (unsigned int line, bool val) |
virtual int | read (unsigned int line, bool &val) |
virtual int | writeLines (unsigned int lines, unsigned int val) |
virtual int | readLines (unsigned int lines, unsigned int &val) |
Public Member Functions inherited from DigitalIO | |
DigitalIO (const string &deviceclass) | |
virtual | ~DigitalIO (void) |
virtual int | open (const string &device) override |
virtual const Options & | settings (void) const |
int | allocateLines (unsigned int lines) |
int | allocateLine (unsigned int line) |
int | allocateLine (unsigned int line, int id) |
void | freeLines (int id) |
bool | allocatedLines (unsigned int lines, int id) |
bool | allocatedLines (unsigned int lines) |
bool | allocatedLine (unsigned int line, int id) |
bool | allocatedLine (unsigned int line) |
bool | lineConfiguration (unsigned int line) const |
virtual int | setSyncPulse (int modemask, int modebits, unsigned int line, double duration, int mode=0) |
virtual int | clearSyncPulse (int modemask, int modebits) |
Additional Inherited Members | |
Protected Member Functions inherited from DigitalIO | |
void | freeLines (void) |
void | setInfo (void) |
Static Protected Attributes inherited from DigitalIO | |
static const unsigned int | MaxDIOLines |
[DigitalIO] Interface for accessing digital I/O lines of a DAQFlex board from Measurement Computing.
DAQFlexDigitalIO | ( | void | ) |
Create a new DAQFlexDigitalIO without opening a device.
DAQFlexDigitalIO | ( | DAQFlexCore & | daqflexdevice, |
const Options & | opts | ||
) |
Open the digital I/O driver on DAQFlexCore device daqflexdevice.
References DAQFlexDigitalIO::open().
|
virtual |
Close the daq driver.
References DAQFlexDigitalIO::close().
|
virtual |
Open a digital I/O device on DAQFlexCore device device. Returns zero on success, or InvalidDevice (or any other negative number indicating the error).
References DAQFlexDigitalIO::isOpen(), DAQFlexCore::isOpen(), and DigitalIO::setInfo().
Referenced by DAQFlexDigitalIO::DAQFlexDigitalIO(), and DAQFlexDigitalIO::open().
|
overridevirtual |
Open a digital I/O device on DAQFlexCore device device.
Reimplemented from DigitalIO.
References DAQFlexDigitalIO::open().
|
virtual |
Returns true if the device is open.
Implements DigitalIO.
References DAQFlexCore::isOpen().
Referenced by DAQFlexDigitalIO::close(), DAQFlexDigitalIO::lines(), and DAQFlexDigitalIO::open().
|
virtual |
Close the device.
Implements DigitalIO.
References DAQFlexDigitalIO::isOpen().
Referenced by DAQFlexDigitalIO::~DAQFlexDigitalIO().
|
virtual |
Implements DigitalIO.
References DAQFlexCore::dioLines(), and DAQFlexDigitalIO::isOpen().
Referenced by DAQFlexDigitalIO::configureLines().
|
virtual |
Configure digital I/O line line for input (output = false
) or output (output = true
).
Reimplemented from DigitalIO.
References DAQFlexCore::sendMessage().
|
virtual |
Configure digital I/O lines specified by lines for input (0) or output (1) according to output.
[in] | lines | a bit mask of the digital lines to be configured. |
[in] | output | a bitmask for tha digital I/O lines that should be configured for output. |
Reimplemented from DigitalIO.
References DAQFlexDigitalIO::lines(), and DAQFlexCore::sendMessage().
|
virtual |
Write val to the digital I/O line line.
[in] | line | the digital line (not its bitmask!) |
[in] | val | the value that should be written to the digital output line (true: high, false: low). |
Implements DigitalIO.
References DAQFlexCore::sendMessage().
|
virtual |
Read from digital I/O line line and return value in val.
[in] | line | the digital line (not its bitmask!) |
[out] | val | the value that was read from to the digital input line (true: high, false: low). |
Implements DigitalIO.
References DAQFlexCore::sendMessage().
|
virtual |
Write val to the digital I/O lines defined in lines.
[in] | lines | a bit mask selecting the digital lines to be written. |
[in] | val | a bit mask indicating what should be written to the digital output lines (1 : high, 0 : low). |
Implements DigitalIO.
|
virtual |
Read digital I/O lines and return them in val.
[in] | lines | a bit mask selecting the digital lines from which to read. |
[out] | val | a bit field returning the values read from to the digital input lines (1 : high, 0 : low). |
Implements DigitalIO.