Relacs DAQ Library
0.9.8
|
#include <tracespec.h>
Public Member Functions | |
TraceSpec (void) | |
TraceSpec (int index, const string &name, int device, int channel, double scale=1.0, const string &unit="", double value=0.0, double maxrate=-1.0, const string &modality="") | |
TraceSpec (const TraceSpec &trace) | |
int | device (void) const |
void | setDevice (int device) |
int | channel (void) const |
void | setChannel (int channel) |
void | setChannel (int channel, int device) |
int | trace (void) const |
void | setTrace (int index) |
string | traceName (void) const |
void | setTraceName (const string &name) |
double | scale (void) const |
void | setScale (double scale) |
string | unit (void) const |
void | setUnit (const string &unit) |
void | setUnit (double scale, const string &unit) |
double | value (void) const |
void | setValue (double value) |
double | maxSampleRate (void) const |
void | setMaxSampleRate (double maxrate) |
bool | fixedSampleRate (void) const |
void | setFixedSampleRate (double rate) |
string | modality (void) const |
void | setModality (const string &modality) |
int | apply (OutData &signal) const |
Friends | |
bool | operator== (const TraceSpec &trace, const OutData &signal) |
bool | operator== (const OutData &signal, const TraceSpec &trace) |
Specification of an output signal.
TraceSpec | ( | void | ) |
TraceSpec | ( | int | index, |
const string & | name, | ||
int | device, | ||
int | channel, | ||
double | scale = 1.0 , |
||
const string & | unit = "" , |
||
double | value = 0.0 , |
||
double | maxrate = -1.0 , |
||
const string & | modality = "" |
||
) |
int device | ( | void | ) | const |
The index of the output device.
Referenced by TraceSpec::setChannel(), and TraceSpec::setDevice().
void setDevice | ( | int | device | ) |
Set the device index to device.
References TraceSpec::device().
int channel | ( | void | ) | const |
The number of the channel on the specified device that is used for output.
Referenced by TraceSpec::setChannel().
void setChannel | ( | int | channel | ) |
Set the number of the channel on the specified device that should be used for output to channel.
References TraceSpec::channel().
void setChannel | ( | int | channel, |
int | device | ||
) |
Set the number of the channel to channel and the device to device.
References TraceSpec::channel(), and TraceSpec::device().
int trace | ( | void | ) | const |
The index of the output trace.
void setTrace | ( | int | index | ) |
Set the index of the output trace to index.
string traceName | ( | void | ) | const |
The name of the output trace.
void setTraceName | ( | const string & | name | ) |
Set the name of the output trace to name.
double scale | ( | void | ) | const |
The scale factor used for scaling the output signal to the voltage that is put out by the analog output device.
Referenced by TraceSpec::setScale(), and TraceSpec::setUnit().
void setScale | ( | double | scale | ) |
Set the scale factor to scale. The scale factor scale is used to scale the output signal to the voltage that is put out by the analog output device.
References TraceSpec::scale().
string unit | ( | void | ) | const |
void setUnit | ( | const string & | unit | ) |
Set the unit of the signal to unit.
References TraceSpec::unit().
void setUnit | ( | double | scale, |
const string & | unit | ||
) |
Set the specifications for the output signal. The signal with unit unit is scaled by scale to the voltage that is put out by the analog output device.
References TraceSpec::scale(), and TraceSpec::unit().
double value | ( | void | ) | const |
void setValue | ( | double | value | ) |
double maxSampleRate | ( | void | ) | const |
The maximum or fixed sampling rate to be used in Hertz.
void setMaxSampleRate | ( | double | maxrate | ) |
Set the maximum sampling rate to maxrate Hertz.
bool fixedSampleRate | ( | void | ) | const |
True
if the sampling rate is fixed.
void setFixedSampleRate | ( | double | rate | ) |
Set the fixed sampling rate to rate Hertz.
string modality | ( | void | ) | const |
The modality of the signal, i.e. electric, visual, acoustic, etc.
Referenced by TraceSpec::setModality().
void setModality | ( | const string & | modality | ) |
int apply | ( | OutData & | signal | ) | const |
If signal has an output trace specified (via OutData::setTrace() or OutData::setTraceName()) then the corresponding settings (channel, device, ...) are applied to signal. If either OutData::traceName() or OutData::trace() do not match this TraceSpec, the DaqError::InvalidTrace error flag of signal is set.
References DaqError::addError(), DaqError::InvalidTrace, OutData::setChannel(), OutData::setDevice(), OutData::setFixedSampleRate(), OutData::setMaxSampleRate(), OutData::setScale(), OutData::setTrace(), OutData::setUnit(), OutData::trace(), and OutData::traceName().