Relacs Core Library  0.9.8
Public Member Functions | Static Public Attributes | Protected Member Functions | List of all members
AISim Class Reference

#include <aisim.h>

Inheritance diagram for AISim:
Inheritance graph
[legend]
Collaboration diagram for AISim:
Collaboration graph
[legend]

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 Optionsinfo (void) const
 
virtual const Optionssettings (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
 

Detailed Description

Implementation of AnalogInput simulating an analog input device.

Author
Jan Benda
Options:
  • gainblacklist: List of daq board gains that should not be used. Each gain is identified by its maximal range value in volts.

Constructor & Destructor Documentation

AISim ( void  )

Create a new AISim without opening a device.

References AISim::initOptions().

~AISim ( void  )

stop analog input and close the driver.

Member Function Documentation

int open ( const string &  device)
overridevirtual
int open ( Device device)
overridevirtual
bool isOpen ( void  ) const
virtual

Returns true.

Implements AnalogInput.

void close ( void  )
virtual

Close the device simulation.

Implements AnalogInput.

References ConfigClass::clear(), and AnalogInput::Info.

int channels ( void  ) const
virtual

Number of analog input channels.

Implements AnalogInput.

int bits ( void  ) const
virtual

Resolution in bits of analog input.

Implements AnalogInput.

double maxRate ( void  ) const
virtual

Maximum sampling rate in Hz of analog input.

Implements AnalogInput.

int maxRanges ( void  ) const
virtual

Maximum number of analog input ranges.

Implements AnalogInput.

double unipolarRange ( int  index) const
virtual

Voltage range index in Volt for unipolar mode. If -1 is returned this range is not supported.

Implements AnalogInput.

double bipolarRange ( int  index) const
virtual

Voltage range index in Volt for bipolar mode. If -1 is returned this range is not supported.

Implements AnalogInput.

int prepareRead ( InList traces)
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().

int startRead ( QSemaphore *  sp = 0,
QReadWriteLock *  datamutex = 0,
QWaitCondition *  datawait = 0,
QSemaphore *  aosp = 0 
)
virtual

Start analog input.

Implements AnalogInput.

int readData ( void  )
virtual

Read data from a running data acquisition.

Implements AnalogInput.

int convertData ( void  )
virtual

Convert data.

Implements AnalogInput.

int stop ( void  )
virtual

Reset the analog input device simulation.

Implements AnalogInput.

int reset ( void  )
virtual

Reset the analog input device simulation.

Implements AnalogInput.

References ConfigClass::clear().

bool running ( void  ) const
virtual

True if analog input is running.

Reimplemented from AnalogInput.

Referenced by AISim::prepareRead().

int error ( void  ) const
virtual

get error status of the AI-device.

void initOptions ( void  )
overrideprotectedvirtual

Reimplemented from AnalogInput.

References AnalogInput::initOptions().

Referenced by AISim::AISim().

Member Data Documentation

const int SimAnalogInputType = 1
static

Device type id for simulated DAQ input devices.


The documentation for this class was generated from the following files: