Relacs Core Library
0.9.8
|
#include <aisim.h>
Public Member Functions | |
AISim (void) | |
~AISim (void) | |
virtual int | open (const string &device) override |
virtual int | open (Device &device) override |
virtual bool | isOpen (void) const |
virtual void | close (void) |
virtual int | channels (void) const |
virtual int | bits (void) const |
virtual double | maxRate (void) const |
virtual int | maxRanges (void) const |
virtual double | unipolarRange (int index) const |
virtual double | bipolarRange (int index) const |
virtual int | prepareRead (InList &traces) |
virtual int | startRead (QSemaphore *sp=0, QReadWriteLock *datamutex=0, QWaitCondition *datawait=0, QSemaphore *aosp=0) |
virtual int | readData (void) |
virtual int | convertData (void) |
virtual int | stop (void) |
virtual int | reset (void) |
virtual bool | running (void) const |
virtual int | error (void) const |
Public Member Functions inherited from AnalogInput | |
AnalogInput (void) | |
AnalogInput (int aitype) | |
AnalogInput (const string &deviceclass, int aitype=0) | |
virtual | ~AnalogInput (void) |
int | minGainIndex (bool unipolar) const |
int | maxGainIndex (bool unipolar) const |
int | gainIndex (bool unipolar, double maxvoltage) const |
virtual int | testRead (InList &traces) |
virtual void | model (InList &data, const vector< int > &aochannels, vector< float > &aovalues) |
virtual void | take (const vector< AnalogInput * > &ais, const vector< AnalogOutput * > &aos, vector< int > &aiinx, vector< int > &aoinx, vector< bool > &airate, vector< bool > &aorate) |
virtual void | addTraces (vector< TraceSpec > &traces, int deviceid) const |
virtual int | matchTraces (InList &traces) const |
int | analogInputType (void) const |
Device (int type=MiscellaneousType) | |
Device (const string &deviceclass, int type=MiscellaneousType) | |
virtual | ~Device (void) |
virtual const Options & | info (void) const |
virtual const Options & | settings (void) const |
int | deviceType (void) const |
string | deviceTypeStr (void) const |
string | deviceClass (void) const |
string | deviceFile (void) const |
string | deviceName (void) const |
string | deviceVendor (void) const |
string | deviceIdent (void) const |
virtual void | setDeviceIdent (const string &ident) |
virtual void | clearError (void) |
virtual string | errorStr (void) const |
void | setErrorStr (const string &strg) |
void | addErrorStr (const string &strg) |
void | setErrorStr (int errnum) |
void | addErrorStr (int errnum) |
virtual bool | success (void) const |
virtual bool | failed (void) const |
Static Public Attributes | |
static const int | SimAnalogInputType = 1 |
Static Public Attributes inherited from AnalogInput | |
static const int | NotOpen |
static const int | InvalidDevice |
static const int | ReadError |
static const int | WriteError |
static const int | InvalidParam |
Protected Member Functions | |
void | initOptions () override |
Protected Member Functions inherited from AnalogInput | |
virtual int | testReadData (InList &traces) |
void | setAnalogInputType (int aitype) |
void | setReadSleep (unsigned long ms) |
void | setInfo (void) |
void | setSettings (const InList &traces, int readbuffer=0, int updatebuffer=0) |
virtual void | startThread (QSemaphore *sp=0, QReadWriteLock *datamutex=0, QWaitCondition *datawait=0, bool error=false) |
virtual void | run (void) |
virtual void | stopRead (void) |
void | setDeviceType (int type) |
void | setDeviceClass (const string &deviceclass) |
void | setDeviceFile (const string &devicefile) |
void | setDeviceName (const string &devicename) |
void | setDeviceVendor (const string &devicevendor) |
void | addInfo (void) |
void | lock (void) const |
void | unlock (void) const |
QMutex * | mutex (void) const |
Additional Inherited Members | |
Public Types inherited from AnalogInput | |
enum | DeviceTypes |
Static Public Member Functions inherited from AnalogInput | |
static int | deviceTypes (void) |
static string | deviceTypeStr (int type) |
static string | getErrorStr (int ern) |
Protected Attributes inherited from AnalogInput | |
Options | Info |
Options | Settings |
Implementation of AnalogInput simulating an analog input device.
gainblacklist:
List of daq board gains that should not be used. Each gain is identified by its maximal range value in volts. AISim | ( | void | ) |
Create a new AISim without opening a device.
References AISim::initOptions().
~AISim | ( | void | ) |
stop analog input and close the driver.
|
overridevirtual |
Open the analog input device simulation
Reimplemented from AnalogInput.
References ConfigClass::clear(), AnalogInput::Info, AnalogInput::setDeviceFile(), AnalogInput::setDeviceName(), AnalogInput::setDeviceVendor(), and AnalogInput::setInfo().
|
overridevirtual |
Open the analog input device simulation.
Reimplemented from AnalogInput.
References ConfigClass::clear(), AnalogInput::Info, AnalogInput::setDeviceFile(), AnalogInput::setDeviceName(), AnalogInput::setDeviceVendor(), and AnalogInput::setInfo().
|
virtual |
Returns true.
Implements AnalogInput.
|
virtual |
Close the device simulation.
Implements AnalogInput.
References ConfigClass::clear(), and AnalogInput::Info.
|
virtual |
Number of analog input channels.
Implements AnalogInput.
|
virtual |
Resolution in bits of analog input.
Implements AnalogInput.
|
virtual |
Maximum sampling rate in Hz of analog input.
Implements AnalogInput.
|
virtual |
Maximum number of analog input ranges.
Implements AnalogInput.
|
virtual |
Voltage range index in Volt for unipolar mode. If -1 is returned this range is not supported.
Implements AnalogInput.
|
virtual |
Voltage range index in Volt for bipolar mode. If -1 is returned this range is not supported.
Implements AnalogInput.
|
virtual |
Prepare analog input of the input traces traces on the device.
Implements AnalogInput.
References InList::addError(), DaqError::Busy, AISim::running(), AnalogInput::setSettings(), and InList::size().
|
virtual |
Start analog input.
Implements AnalogInput.
|
virtual |
Read data from a running data acquisition.
Implements AnalogInput.
|
virtual |
Convert data.
Implements AnalogInput.
|
virtual |
Reset the analog input device simulation.
Implements AnalogInput.
|
virtual |
|
virtual |
True if analog input is running.
Reimplemented from AnalogInput.
Referenced by AISim::prepareRead().
|
virtual |
get error status of the AI-device.
|
overrideprotectedvirtual |
Reimplemented from AnalogInput.
References AnalogInput::initOptions().
Referenced by AISim::AISim().
|
static |
Device type id for simulated DAQ input devices.