Relacs DAQ Library
0.9.8
|
#include <daqerror.h>
Public Member Functions | |
DaqError (void) | |
void | clearError (void) |
long long | error (void) const |
void | setError (long long flags) |
void | addError (long long flags) |
void | delError (long long flags) |
void | addDaqError (int de) |
void | addAttError (int ae) |
string | errorStr (void) const |
void | setErrorStr (const string &strg) |
void | addErrorStr (const string &strg) |
void | setErrorStr (int errnum) |
void | addErrorStr (int errnum) |
string | errorText (void) const |
bool | success (void) const |
bool | failed (void) const |
bool | busy (void) const |
bool | overflow (void) const |
bool | underflow (void) const |
bool | attenuatorFailed (void) const |
void | update (const DaqError *de) |
Static Public Member Functions | |
static string | errorText (long long flags) |
Static Public Attributes | |
static const long long | NoDevice = 1LL<<0 |
static const long long | DeviceNotOpen = 1LL<<1 |
static const long long | MultipleDevices = 1LL<<2 |
static const long long | InvalidStartSource = 1LL<<3 |
static const long long | MultipleStartSources = 1LL<<4 |
static const long long | InvalidDelay = 1LL<<5 |
static const long long | MultipleDelays = 1LL<<6 |
static const long long | MultiplePriorities = 1LL<<7 |
static const long long | InvalidSampleRate = 1LL<<8 |
static const long long | MultipleSampleRates = 1LL<<9 |
static const long long | InvalidContinuous = 1LL<<10 |
static const long long | MultipleContinuous = 1LL<<11 |
static const long long | MultipleRestart = 1LL<<12 |
static const long long | NoData = 1LL<<13 |
static const long long | MultipleBuffersizes = 1LL<<14 |
static const long long | InvalidBufferTime = 1LL<<15 |
static const long long | MultipleBufferTimes = 1LL<<16 |
static const long long | InvalidUpdateTime = 1LL<<17 |
static const long long | MultipleUpdateTimes = 1LL<<18 |
static const long long | InvalidTrace = 1LL<<19 |
static const long long | InvalidChannel = 1LL<<20 |
static const long long | MultipleChannels = 1LL<<21 |
static const long long | InvalidReference = 1LL<<22 |
static const long long | MultipleReferences = 1LL<<23 |
static const long long | InvalidDither = 1LL<<24 |
static const long long | MultipleDither = 1LL<<25 |
static const long long | InvalidReglitch = 1LL<<26 |
static const long long | MultipleReglitch = 1LL<<27 |
static const long long | InvalidGain = 1LL<<28 |
static const long long | MultipleGains = 1LL<<29 |
static const long long | Underflow = 1LL<<30 |
static const long long | Overflow = 1LL<<31 |
static const long long | CalibrationFailed = 1LL<<32 |
static const long long | InvalidChannelType = 1LL<<33 |
static const long long | InvalidChannelSequence = 1LL<<34 |
static const long long | Busy = 1LL<<35 |
static const long long | DeviceError = 1LL<<36 |
static const long long | OverflowUnderrun = 1LL<<37 |
static const long long | Unknown = 1LL<<38 |
static const long long | NoIntensity = 1LL<<39 |
static const long long | AttNotOpen = 1LL<<40 |
static const long long | AttInvalidDevice = 1LL<<41 |
static const long long | AttFailed = 1LL<<42 |
static const long long | AttUnderflow = 1LL<<43 |
static const long long | AttOverflow = 1LL<<44 |
static const long long | AttIntensityUnderflow = 1LL<<45 |
static const long long | AttIntensityOverflow = 1LL<<46 |
static const long long | AttIntensityFailed = 1LL<<47 |
Friends | |
ostream & | operator<< (ostream &str, const DaqError &de) |
Error codes for analog input and output.
DaqError | ( | void | ) |
Constructor. Initializes the error flag with zero and the additional error string as an empty string.
void clearError | ( | void | ) |
Clear all error flags and the error string.
Referenced by OutData::alphaWave(), OutData::bandNoiseWave(), OutData::constWave(), Acquire::directWrite(), OutData::fill(), OutData::load(), OutData::noiseWave(), OutData::ouNoiseWave(), OutData::pulseWave(), OutData::rampWave(), OutData::rectangleWave(), OutData::sawDownWave(), OutData::sawUpWave(), OutData::sineWave(), OutData::sweepWave(), Acquire::testWrite(), OutData::triangleWave(), and Acquire::write().
long long error | ( | void | ) | const |
Return error flags of last in/output operation.
Referenced by OutData::copy(), InList::errorText(), and OutData::OutData().
void setError | ( | long long | flags | ) |
Set error flags to flags.
Referenced by OutData::assign(), and OutData::OutData().
void addError | ( | long long | flags | ) |
Add the bits specified by flags to the error flags.
Referenced by DaqError::addAttError(), DaqError::addDaqError(), TraceSpec::apply(), Acquire::applyOutTrace(), Acquire::directWrite(), Acquire::testWrite(), and Acquire::write().
void delError | ( | long long | flags | ) |
Clear the bits specified by flags of the error flags.
void addDaqError | ( | int | de | ) |
Add error code de originating from daq board to the error flags.
References DaqError::addError(), DaqError::OverflowUnderrun, and DaqError::Unknown.
void addAttError | ( | int | ae | ) |
Add error code ae originating from Attenuate to the error flags.
References DaqError::addError(), DaqError::AttIntensityFailed, Attenuate::IntensityError, and Attenuate::ReadError.
Referenced by Acquire::directWrite(), Acquire::testWrite(), and Acquire::write().
string errorStr | ( | void | ) | const |
Return the additional error string of the last in/output operation.
Referenced by InData::errorMessage(), OutData::errorMessage(), and InList::errorText().
void setErrorStr | ( | const string & | strg | ) |
Set additional error string to strg.
void addErrorStr | ( | const string & | strg | ) |
Add strg to the additional error string.
void setErrorStr | ( | int | errnum | ) |
Set additional error string to the string describing the standard C error code errnum (from errno
).
void addErrorStr | ( | int | errnum | ) |
Add the string describing the standard C error code errnum (from errno
) to the additional error string.
|
static |
Return string describing errors indicated by flags.
Referenced by InList::errorText(), and Acquire::writeZero().
string errorText | ( | void | ) | const |
Return string describing errors from error() and errorStr() of last in/output operation.
Referenced by InList::errorText().
bool success | ( | void | ) | const |
Return true if last input/output operation was successfull, i.e. error() == 0 and errorStr().empty().
Referenced by InData::errorMessage(), OutData::errorMessage(), Acquire::testWrite(), and Acquire::writeZero().
bool failed | ( | void | ) | const |
Input/output operation was not possible, i.e. error() != 0 or not errorStr().empty().
Referenced by Acquire::directWrite(), Acquire::testWrite(), and Acquire::write().
bool busy | ( | void | ) | const |
bool overflow | ( | void | ) | const |
Requested signal amplitude or intensity was too high.
References DaqError::AttIntensityOverflow, DaqError::AttOverflow, and DaqError::Overflow.
bool underflow | ( | void | ) | const |
Requested signal amplitude or intensity was too low.
References DaqError::AttIntensityUnderflow, DaqError::AttUnderflow, and DaqError::Underflow.
bool attenuatorFailed | ( | void | ) | const |
Failure in attenuator.
References DaqError::AttFailed, and DaqError::AttIntensityFailed.
void update | ( | const DaqError * | de | ) |
Copy the error flag and string from de to this.
Referenced by InData::update().
|
friend |
Write the internal variables to str.
|
static |
Device for requested operation does not exist.
Referenced by Acquire::adjustGain(), Acquire::directWrite(), Acquire::maxValues(), Acquire::maxVoltages(), Acquire::read(), Acquire::setGain(), Acquire::testRead(), Acquire::testWrite(), and Acquire::write().
|
static |
Device is not opened.
Referenced by Acquire::adjustGain(), Acquire::maxValues(), Acquire::maxVoltages(), Acquire::setGain(), AnalogInput::testReadData(), and AnalogOutput::testWriteData().
|
static |
Different devices requested.
Referenced by AnalogInput::testReadData(), and AnalogOutput::testWriteData().
|
static |
Invalid start source.
Referenced by AnalogInput::testReadData(), and AnalogOutput::testWriteData().
|
static |
Multiple start sources.
Referenced by AnalogInput::testReadData(), and AnalogOutput::testWriteData().
|
static |
Invalid delay.
Referenced by Acquire::directWrite(), AnalogInput::testReadData(), and AnalogOutput::testWriteData().
|
static |
Multiple delays.
Referenced by Acquire::directWrite(), AnalogInput::testReadData(), Acquire::testWrite(), AnalogOutput::testWriteData(), and Acquire::write().
|
static |
Multiple priority settings.
Referenced by Acquire::directWrite(), Acquire::read(), Acquire::testRead(), Acquire::testWrite(), and Acquire::write().
|
static |
Invalid sample rate.
Referenced by AnalogInput::testReadData(), and AnalogOutput::testWriteData().
|
static |
Multiple sampling rates.
Referenced by AnalogInput::testReadData(), and AnalogOutput::testWriteData().
|
static |
Continuous mode not supported.
|
static |
Multiple continuous modes.
Referenced by AnalogInput::testReadData(), and AnalogOutput::testWriteData().
|
static |
Multiple restart requests.
Referenced by AnalogOutput::testWriteData().
|
static |
No data for analog output.
Referenced by Acquire::directWrite(), AnalogInput::testReadData(), Acquire::testWrite(), AnalogOutput::testWriteData(), and Acquire::write().
|
static |
Multiple buffer sizes.
Referenced by AnalogInput::testReadData(), and AnalogOutput::testWriteData().
|
static |
Invalid size for the driver's buffer requested.
|
static |
Multiple buffer times.
Referenced by AnalogInput::testReadData().
|
static |
Invalid size for the update buffer requested.
|
static |
Multiple update times.
Referenced by AnalogInput::testReadData().
|
static |
Invalid trace specification.
Referenced by TraceSpec::apply(), and Acquire::applyOutTrace().
|
static |
Invalid channel number.
Referenced by AnalogInput::testReadData(), and AnalogOutput::testWriteData().
|
static |
More than one trace for the same channel.
Referenced by AnalogInput::testReadData(), and AnalogOutput::testWriteData().
|
static |
Invalid reference type for channel.
Referenced by AnalogInput::testReadData().
|
static |
Multiple reference types for the channels.
|
static |
Dither not supported.
|
static |
Multiple dither settings for the channels.
|
static |
Reglitch not supported.
|
static |
Multiple reglitch settings for the channels.
|
static |
Invalid gain index.
Referenced by Acquire::adjustGain(), Acquire::setGain(), and AnalogInput::testReadData().
|
static |
Multiple gain indices for the channels.
|
static |
The minimum value of the output signal is larger than the minimum possible output value.
Referenced by DaqError::underflow().
|
static |
The maximum value of the output signal is larger than the maximum possible output value.
Referenced by DaqError::overflow().
|
static |
|
static |
Invalid channel type.
|
static |
Invalid sequence of channel numbers.
|
static |
Device is still busy.
Referenced by DaqError::busy(), Acquire::directWrite(), Acquire::read(), Acquire::testRead(), Acquire::testWrite(), and Acquire::write().
|
static |
|
static |
Overflow of FIFO buffer (input) or underrun (output).
Referenced by DaqError::addDaqError().
|
static |
Unknown error of the daq board.
Referenced by DaqError::addDaqError(), Acquire::read(), and Acquire::restartRead().
|
static |
Intensity for output signal on attenuator not set.
Referenced by Acquire::directWrite(), Acquire::testWrite(), and Acquire::write().
|
static |
Attenuator device is not open.
|
static |
Attenuator device does not exist.
|
static |
Failure in setting attenuator.
Referenced by DaqError::attenuatorFailed().
|
static |
Requested signal amplitude to small for attenuator.
Referenced by DaqError::underflow().
|
static |
Requested signal amplitude too large for attenuator.
Referenced by DaqError::overflow().
|
static |
Requested signal amplitude to small for calculating the attenuation level.
Referenced by DaqError::underflow().
|
static |
Requested signal amplitude too large for calculating the attenuation level.
Referenced by DaqError::overflow().
|
static |
Error in calculating the attenuation level.
Referenced by DaqError::addAttError(), and DaqError::attenuatorFailed().