Relacs DAQ Library
0.9.8
|
#include <inlist.h>
Public Member Functions | |
InList (void) | |
InList (InData &data) | |
InList (InData *data, bool own=false) | |
InList (const InList *il) | |
InList (const InList &il) | |
~InList (void) | |
int | size (void) const |
bool | empty (void) const |
void | resize (int n, int m=0, int w=0, double step=1.0) |
void | clear (void) |
InList & | operator= (const InList &il) |
InList & | assign (const InList *il) |
InList & | assign (void) |
const InData & | operator[] (int i) const |
InData & | operator[] (int i) |
const InData & | front (void) const |
InData & | front (void) |
const InData & | back (void) const |
InData & | back (void) |
const InData & | operator[] (const string &ident) const |
InData & | operator[] (const string &ident) |
int | index (const string &ident) const |
void | push (InData &data) |
void | push (const InList &traces) |
void | add (InData *data, bool own=false) |
void | add (const InData *data, bool own=false) |
void | add (const InList &traces, bool own=false) |
void | set (int index, const InData *data, bool own=false) |
void | assign (int index, const InData *data) |
void | erase (int index) |
void | update (void) |
void | updateRaw (void) |
void | updateDerived (void) |
void | clearBuffer (void) |
void | sortByChannel (void) |
void | sortByDeviceChannel (void) |
double | currentTime (void) const |
double | currentTimeRaw (void) const |
void | setDevice (int device) |
void | setReference (InData::RefType ref) |
void | setUnipolar (bool unipolar) |
void | setStartSource (int startsource) |
void | setDelay (double delay) |
void | setPriority (bool priority=true) |
void | setSampleRate (double rate) |
void | setSampleInterval (double step) |
void | setContinuous (bool continuous=true) |
void | setScale (double scale) |
void | setUnit (const string &unit) |
void | setUnit (double scale, const string &unit) |
void | setReadTime (double time) |
void | setUpdateTime (double time) |
void | clearMode (void) |
void | setMode (int flags) |
void | addMode (int flags) |
void | delMode (int flags) |
void | setSignalIndex (int index) |
void | setSignalTime (double time) |
void | setRestart (void) |
void | setRestartTime (double restarttime) |
string | errorText (void) const |
void | clearError (void) |
void | setError (long long flags) |
void | addError (long long flags) |
void | delError (long long flags) |
void | addDaqError (int de) |
void | setErrorStr (const string &strg) |
void | addErrorStr (const string &strg) |
void | setErrorStr (int errnum) |
void | addErrorStr (int errnum) |
bool | success (void) const |
bool | failed (void) const |
Friends | |
ostream & | operator<< (ostream &str, const InList &il) |
bool | lessChannelILE (const ILE &a, const ILE &b) |
bool | lessDeviceChannelILE (const ILE &a, const ILE &b) |
A container for InData.
Constructs an InList containing the single InData data.
References InList::push().
Constructs an InList containing the single pointer data. Setting own to true
transfers the ownership to the InList.
References InList::add().
~InList | ( | void | ) |
Destructor.
References InList::clear().
|
inline |
The number of InData in the InList.
Referenced by InList::add(), InList::addDaqError(), InList::addError(), InList::addErrorStr(), InList::addMode(), Acquire::adjustGain(), InList::assign(), InList::clearBuffer(), InList::clearError(), InList::clearMode(), InList::currentTime(), InList::currentTimeRaw(), InList::delError(), InList::delMode(), InList::erase(), InList::errorText(), InList::failed(), InList::push(), Acquire::read(), Acquire::restartRead(), InList::set(), InList::setContinuous(), InList::setDelay(), InList::setDevice(), InList::setError(), InList::setErrorStr(), Acquire::setGain(), InList::setMode(), InList::setPriority(), InList::setReadTime(), InList::setReference(), InList::setRestart(), InList::setRestartTime(), InList::setSampleInterval(), InList::setSampleRate(), InList::setScale(), AnalogInput::setSettings(), InList::setSignalIndex(), InList::setSignalTime(), InList::setStartSource(), InList::setUnipolar(), InList::setUnit(), InList::setUpdateTime(), InList::success(), Acquire::testRead(), AnalogInput::testReadData(), InList::update(), InList::updateDerived(), and InList::updateRaw().
void resize | ( | int | n, |
int | m = 0 , |
||
int | w = 0 , |
||
double | step = 1.0 |
||
) |
Resize the InList such that it contains n InData. If n equals zero, clear() is called. If a larger size than the current size() is requested than empty InData are appended, each of capacity m, size of write buffer w, and sampling interval step seconds.
References InList::clear().
Referenced by Acquire::restartRead().
void clear | ( | void | ) |
Clear the InList, i.e. remove all InData the InList owns.
Referenced by Acquire::clearInputs(), Acquire::closeInputs(), Acquire::read(), InList::resize(), and InList::~InList().
Copies il to this with copying pointers to the data buffers only.
References InList::assign().
InList & assign | ( | void | ) |
Copies again all settings and indices from the reference InData.
Referenced by InList::assign().
|
inline |
Returns a const reference of the i -th InData of the list.
Referenced by InList::currentTime(), InList::currentTimeRaw(), and InList::errorText().
const InData & front | ( | void | ) | const |
Returns a const reference to the first InData in the list.
Referenced by InList::operator[]().
const InData & operator[] | ( | const string & | ident | ) | const |
Returns a const reference of the InData element with identifier ident.
References InList::front().
InData & operator[] | ( | const string & | ident | ) |
Returns a reference of the InData element with identifier ident.
References InList::front().
int index | ( | const string & | ident | ) | const |
Return the index of the input data trace with identifier ident. If there is no trace with this identifier -1 is returned.
Referenced by InList::assign(), InList::erase(), and InList::set().
void push | ( | InData & | data | ) |
Copy data as a new element to the end of the list.
Referenced by InList::InList().
void push | ( | const InList & | traces | ) |
Copy each trace from traces to the end of the list.
References InList::size().
void add | ( | InData * | data, |
bool | own = false |
||
) |
Add the pointer data as a new element to the end of the list. If own is set to true
then the ownership of data is transfered to the InList, i.e. the InList might delete it.
Referenced by InList::InList(), and Acquire::read().
void add | ( | const InData * | data, |
bool | own = false |
||
) |
void add | ( | const InList & | traces, |
bool | own = false |
||
) |
Add pointers to each trace in traces to the end of the list. If own is set to true
then the ownership of the traces is transfered to the InList, i.e. the InList might delete it.
References InList::size().
void set | ( | int | index, |
const InData * | data, | ||
bool | own = false |
||
) |
Set the pointer to data as the index-th element. If own is set to true
then the ownership of the traces is transferred to the InList, i.e. the InList might delete it.
References InList::index(), and InList::size().
void assign | ( | int | index, |
const InData * | data | ||
) |
Make the index-th element a copy of data with shared buffer.
References InList::index(), and InList::size().
void erase | ( | int | index | ) |
Erase the InData at index index.
References InList::index(), and InList::size().
void update | ( | void | ) |
Make written data of all traces available for reading.
References InList::size().
void updateRaw | ( | void | ) |
Make written data of raw traces (source == 0) available for reading.
References InList::size().
Referenced by Acquire::getRawData().
void updateDerived | ( | void | ) |
Make written data of derived traces (source != 0 ) available for reading.
References InList::size().
void clearBuffer | ( | void | ) |
Clear buffer and reset indices of all InData traces.
References InList::size().
void sortByChannel | ( | void | ) |
Sort the input traces by increasing channel number.
References InList::lessChannelILE.
void sortByDeviceChannel | ( | void | ) |
Sort the input traces by increasing device and by increasing channel number.
References InList::lessDeviceChannelILE.
double currentTime | ( | void | ) | const |
Returns the smallest buffer time of all the InData.
References InData::currentTime(), InList::operator[](), and InList::size().
Referenced by Acquire::getRawData().
double currentTimeRaw | ( | void | ) | const |
Returns the smallest buffer time of all raw traces (source == 0).
References InData::currentTime(), InList::operator[](), and InList::size().
Referenced by Acquire::restartRead(), and Acquire::waitForData().
void setDevice | ( | int | device | ) |
Set the device id of all traces to device.
References InList::size().
Referenced by Acquire::read(), Acquire::testRead(), and AnalogInput::testReadData().
void setReference | ( | InData::RefType | ref | ) |
Set the reference of all input lines to ref. Possible values are Differential, Referenced, Nonreferenced. Defaults to Differential.
References InList::size().
Referenced by AnalogInput::testReadData().
void setUnipolar | ( | bool | unipolar | ) |
Set the polarity of all input traces to unipolar. If unipolar is true only positive values are acquired, if it is false positive and negative values are acquired. By default acquisition is bipolar.
References InList::size().
void setStartSource | ( | int | startsource | ) |
Set the source for the start trigger of the data aquisition for all traces to startsource.
References InList::size().
Referenced by AnalogInput::testReadData().
void setDelay | ( | double | delay | ) |
Set delay for all traces to delay (in seconds).
References InList::size().
Referenced by AnalogInput::testReadData().
void setPriority | ( | bool | priority = true | ) |
Set the priority of all input traces to priority. If priority is true then the input trace is processed even if there still is a data acquisition running. Otherwise the input trace is not processed and returns with an error.
References InList::size().
void setSampleRate | ( | double | rate | ) |
Set the sampling rate of all input traces to rate Hertz
References InList::size().
Referenced by AnalogInput::testReadData().
void setSampleInterval | ( | double | step | ) |
Set the sampling interval of all input traces to step seconds.
References InList::size().
void setContinuous | ( | bool | continuous = true | ) |
Set continuous mode of data aquisition for all traces to continuous.
References InList::size().
Referenced by AnalogInput::testReadData().
void setScale | ( | double | scale | ) |
Set the scale factor for all input traces to scale. The scale factor scale is used to scale the voltage data to a secondary unit.
References InList::size().
void setUnit | ( | const string & | unit | ) |
void setUnit | ( | double | scale, |
const string & | unit | ||
) |
Set the specifications of a secondary unit for all input traces. The scale factor scale is used to scale the voltage data to a secondary unit unit.
References InList::size().
void setReadTime | ( | double | time | ) |
Set the maximum time the hardware driver should buffer the data before they are transferred to the AnalogInput implementation to time seconds. If time is zero or negative, the default buffer time of the driver is used for the size of the driver's buffer.
References InList::size().
Referenced by Acquire::read(), and AnalogInput::testReadData().
void setUpdateTime | ( | double | time | ) |
Set the maximum time the AnalogInput implementaion should buffer the data internally before they are converted to the secondary unit and written into the InData buffer to time seconds. If time is zero or negative, the InData::capacity() is used for the size of this buffer.
References InList::size().
Referenced by Acquire::read(), and AnalogInput::testReadData().
void clearMode | ( | void | ) |
Clear all mode flags for all input traces.
References InList::size().
void setMode | ( | int | flags | ) |
Set mode flags for all input traces to flags.
References InList::size().
void addMode | ( | int | flags | ) |
Add the bits specified by flags to the mode flags of all input traces.
References InList::size().
void delMode | ( | int | flags | ) |
Clear the bits specified by flags of the mode flags of all input traces.
References InList::size().
Referenced by Acquire::activateGains(), Acquire::directWrite(), and Acquire::write().
void setSignalIndex | ( | int | index | ) |
Set index of start of last signal to restart() + index in all input traces.
References InList::size().
void setSignalTime | ( | double | time | ) |
Set time of start of last signal to time in all input traces.
References InList::size().
Referenced by Acquire::waitForData().
void setRestart | ( | void | ) |
Set restart-index of all input traces to current size().
References InList::size().
Referenced by Acquire::read(), and Acquire::restartRead().
void setRestartTime | ( | double | restarttime | ) |
Set Restart-index of all input traces to the element at restarttime.
References InList::size().
string errorText | ( | void | ) | const |
Return string with an error message.
References InData::channel(), InData::device(), DaqError::error(), DaqError::errorStr(), DaqError::errorText(), InList::operator[](), and InList::size().
Referenced by Acquire::readError().
void clearError | ( | void | ) |
Clear all error flags of all input traces.
References InList::size().
Referenced by Acquire::read(), Acquire::restartRead(), AnalogInput::testRead(), and Acquire::testRead().
void setError | ( | long long | flags | ) |
Set error flags of all input traces to flags.
References InList::size().
void addError | ( | long long | flags | ) |
Add the bits specified by flags to the error flags of all input traces.
References InList::size().
Referenced by Acquire::read(), Acquire::testRead(), and AnalogInput::testReadData().
void delError | ( | long long | flags | ) |
Clear the bits specified by flags of the error flags of all input traces.
References InList::size().
void addDaqError | ( | int | de | ) |
Add error code de originating from daq board to the error flags of all input traces.
References InList::size().
void setErrorStr | ( | const string & | strg | ) |
Set additional error string of all input traces to strg.
References InList::size().
void addErrorStr | ( | const string & | strg | ) |
Add msg to the additional error string of all input traces.
References InList::size().
Referenced by Acquire::read().
void setErrorStr | ( | int | errnum | ) |
Set additional error string of all input traces to the string describing the standard C error code errnum (from errno
).
References InList::size().
void addErrorStr | ( | int | errnum | ) |
Add the string describing the standard C error code errnum (from errno
) to the additional error string of all input traces.
References InList::size().
bool success | ( | void | ) | const |
Returns true
if all input traces are ok.
References InList::size().
Referenced by Acquire::getRawData().
bool failed | ( | void | ) | const |
Returns true
if one or more input traces failed.
References InList::size().
Referenced by Acquire::getRawData(), Acquire::read(), AnalogInput::testReadData(), Acquire::waitForData(), and Acquire::waitForRead().
|
friend |
Write content of all InData variables to stream str (for debugging only).
|
friend |
Referenced by InList::sortByChannel().
|
friend |
Referenced by InList::sortByDeviceChannel().