Relacs Core Library
0.9.8
|
#include <diosim.h>
Public Member Functions | |
DynClampDigitalIO (void) | |
DynClampDigitalIO (const string &device, const Options &opts) | |
virtual | ~DynClampDigitalIO (void) |
virtual int | open (const string &device) override |
virtual int | open (Device &device) override |
virtual bool | isOpen (void) const =0 |
virtual void | close (void)=0 |
virtual int | lines (void) const =0 |
virtual const Options & | settings (void) const |
int | allocateLines (int lines) |
int | allocateLine (int line) |
int | allocateLine (int line, int id) |
void | freeLines (int id) |
bool | allocatedLines (int lines, int id) |
bool | allocatedLines (int lines) |
bool | allocatedLine (int line, int id) |
bool | allocatedLine (int line) |
virtual int | configureLine (int line, bool output) |
virtual int | configureLines (int lines, int output) |
bool | lineConfiguration (int line) const |
virtual int | write (int line, bool val)=0 |
virtual int | read (int line, bool &val) const =0 |
virtual int | writeLines (int lines, int val)=0 |
virtual int | readLines (int lines, int &val) const =0 |
virtual int | setSyncPulse (double duration) |
virtual int | clearSyncPulse (void) |
Public Member Functions inherited from DigitalIO | |
DigitalIO (const string &deviceclass) | |
virtual | ~DigitalIO (void) |
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) |
virtual int | configureLine (unsigned int line, bool output) |
virtual int | configureLines (unsigned int lines, unsigned int output) |
bool | lineConfiguration (unsigned int line) const |
virtual int | write (unsigned int line, bool val)=0 |
virtual int | read (unsigned int line, bool &val)=0 |
virtual int | writeLines (unsigned int lines, unsigned int val)=0 |
virtual int | readLines (unsigned int lines, unsigned int &val)=0 |
virtual int | setSyncPulse (int modemask, int modebits, unsigned int line, double duration, int mode=0) |
virtual int | clearSyncPulse (int modemask, int modebits) |
Protected Member Functions | |
void | freeLines (void) |
void | setInfo (void) |
Protected Member Functions inherited from DigitalIO | |
void | freeLines (void) |
void | setInfo (void) |
Static Protected Attributes | |
static const int | MaxDIOLines = 32 |
Static Protected Attributes inherited from DigitalIO | |
static const unsigned int | MaxDIOLines |
Implementation of DigitialIO simulating an digital I/O device.
|
virtual |
Close the daq driver.
DynClampDigitalIO | ( | void | ) |
Create a new DynClampDigitalIO without opening a device.
DynClampDigitalIO | ( | const string & | device, |
const Options & | opts | ||
) |
Open the digital I/O driver specified by its device file device.
|
overridevirtual |
Open the digital I/O device specified by device.
Reimplemented from DigitalIO.
|
overridevirtual |
Open the digital I/O device specified by device.
Reimplemented from DigitalIO.
|
pure virtual |
|
pure virtual |
|
pure virtual |
Implements DigitalIO.
|
virtual |
Returns the ids for each digital I/O line.
Reimplemented from DigitalIO.
int allocateLines | ( | int | lines | ) |
Allocate the lines lines of the digital I/O device.
[in] | lines | a bit mask of the digital lines to be allocated. |
int allocateLine | ( | int | line | ) |
Allocate the single digital I/O line line of the digital I/O device. Further lines can be allocated by calling allocateLine( int, int ).
[in] | line | the digital line (not its bitmask!) to be allocated. |
int allocateLine | ( | int | line, |
int | id | ||
) |
Allocate one more digital I/O line line of the digital I/O device for id id. The id should be the returned value of a previous call to allocateLine( int ).
[in] | line | the digital line (not its bitmask!) to be allocated. |
[in] | id | the id under which this line should be allocated. |
void freeLines | ( | int | id | ) |
Free the previously allocated digital I/O lines with id id.
bool allocatedLines | ( | int | lines, |
int | id | ||
) |
true
if all the digitial I/O lines lines have been allocated under id id. [in] | lines | the bit mask of the digital lines. |
[in] | id | the id under which this line was previously allocated. |
bool allocatedLines | ( | int | lines | ) |
true
if all the digitial I/O lines lines have been allocated, independent of the ids. [in] | lines | the bit mask of the digital lines. |
bool allocatedLine | ( | int | line, |
int | id | ||
) |
true
if digitial I/O line line was allocated under id id. [in] | line | the digital line (not its bitmask!) |
[in] | id | the id under which this line was previously allocated. |
bool allocatedLine | ( | int | line | ) |
true
if digitial I/O line line is allocated, independent of the id. [in] | line | the digital line (not its bitmask!) |
|
virtual |
Configure digital I/O line line for input (output = false
) or output (output = true
). When reimplementing this function, call this function on success.
[in] | line | the digital line (not its bitmask!) |
[in] | output | true if this line should be configured for output. |
|
virtual |
Configure digital I/O lines specified by lines for input (0) or output (1) according to output. When reimplementing this function, call this function on success.
[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. |
bool lineConfiguration | ( | int | line | ) | const |
Returns the configuation of an digital I/O line.
[in] | line | the digital line (channel) |
true
, if the line has been configured for output.
|
pure 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). |
|
pure 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). |
|
pure 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). |
|
pure 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). |
|
virtual |
Enables generation of TTL Pulses on a previously defined DIO line and the scaling of the current for analog output according to the measured period divided by the curent injection time of duration microseconds. This is used for synchronizing a discontinous current-clamp amplifier with an dynamic-clamp loop.
[in] | duration | the duration of the current injection of the amplifier in seconds. |
|
virtual |
Disable TTL Pulse generation and current scaling.
|
protected |
Free all allocated digital I/O lines.
|
protected |
Set the device info(). Call this function from open().
|
staticprotected |
The maximum number of digital I/O lines.