Relacs DAQ Library  0.9.8
Public Member Functions | Static Public Member Functions | Static Public Attributes | Friends | List of all members
DaqError Class Reference

#include <daqerror.h>

Inheritance diagram for DaqError:
Inheritance graph
[legend]

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)
 

Detailed Description

Error codes for analog input and output.

Author
Marco Hackenberg, Jan Benda
Version
1.0

Constructor & Destructor Documentation

DaqError ( void  )

Constructor. Initializes the error flag with zero and the additional error string as an empty string.

Member Function Documentation

void clearError ( void  )
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)
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)
string errorStr ( void  ) const

Return the additional error string of the last in/output operation.

See Also
setErrorStr(), addErrorStr()

Referenced by InData::errorMessage(), OutData::errorMessage(), and InList::errorText().

void setErrorStr ( const string &  strg)

Set additional error string to strg.

See Also
addErrorStr(), errorStr()
void addErrorStr ( const string &  strg)

Add strg to the additional error string.

See Also
setErrorStr(), errorStr()
void setErrorStr ( int  errnum)

Set additional error string to the string describing the standard C error code errnum (from errno).

See Also
addErrorStr(), errorStr()
void addErrorStr ( int  errnum)

Add the string describing the standard C error code errnum (from errno) to the additional error string.

See Also
setErrorStr(), errorStr()
string errorText ( long long  flags)
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

Another signal is still running.

See Also
Busy

References DaqError::Busy.

bool overflow ( void  ) const

Requested signal amplitude or intensity was too high.

See Also
Overflow, AttOverflow, AttIntensityOverflow

References DaqError::AttIntensityOverflow, DaqError::AttOverflow, and DaqError::Overflow.

bool underflow ( void  ) const

Requested signal amplitude or intensity was too low.

See Also
Underflow, AttUnderflow, AttIntensityUnderflow

References DaqError::AttIntensityUnderflow, DaqError::AttUnderflow, and DaqError::Underflow.

bool attenuatorFailed ( void  ) const

Failure in attenuator.

See Also
AttFailed, AttIntensityFailed

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().

Friends And Related Function Documentation

ostream& operator<< ( ostream &  str,
const DaqError de 
)
friend

Write the internal variables to str.

Member Data Documentation

NoDevice = 1LL<<0
static
DeviceNotOpen = 1LL<<1
static
MultipleDevices = 1LL<<2
static

Different devices requested.

Referenced by AnalogInput::testReadData(), and AnalogOutput::testWriteData().

InvalidStartSource = 1LL<<3
static

Invalid start source.

Referenced by AnalogInput::testReadData(), and AnalogOutput::testWriteData().

MultipleStartSources = 1LL<<4
static

Multiple start sources.

Referenced by AnalogInput::testReadData(), and AnalogOutput::testWriteData().

InvalidDelay = 1LL<<5
static
MultipleDelays = 1LL<<6
static
MultiplePriorities = 1LL<<7
static
InvalidSampleRate = 1LL<<8
static

Invalid sample rate.

Referenced by AnalogInput::testReadData(), and AnalogOutput::testWriteData().

MultipleSampleRates = 1LL<<9
static

Multiple sampling rates.

Referenced by AnalogInput::testReadData(), and AnalogOutput::testWriteData().

InvalidContinuous = 1LL<<10
static

Continuous mode not supported.

MultipleContinuous = 1LL<<11
static

Multiple continuous modes.

Referenced by AnalogInput::testReadData(), and AnalogOutput::testWriteData().

MultipleRestart = 1LL<<12
static

Multiple restart requests.

Referenced by AnalogOutput::testWriteData().

NoData = 1LL<<13
static
MultipleBuffersizes = 1LL<<14
static

Multiple buffer sizes.

Referenced by AnalogInput::testReadData(), and AnalogOutput::testWriteData().

InvalidBufferTime = 1LL<<15
static

Invalid size for the driver's buffer requested.

MultipleBufferTimes = 1LL<<16
static

Multiple buffer times.

Referenced by AnalogInput::testReadData().

InvalidUpdateTime = 1LL<<17
static

Invalid size for the update buffer requested.

MultipleUpdateTimes = 1LL<<18
static

Multiple update times.

Referenced by AnalogInput::testReadData().

InvalidTrace = 1LL<<19
static

Invalid trace specification.

Referenced by TraceSpec::apply(), and Acquire::applyOutTrace().

InvalidChannel = 1LL<<20
static

Invalid channel number.

Referenced by AnalogInput::testReadData(), and AnalogOutput::testWriteData().

MultipleChannels = 1LL<<21
static

More than one trace for the same channel.

Referenced by AnalogInput::testReadData(), and AnalogOutput::testWriteData().

InvalidReference = 1LL<<22
static

Invalid reference type for channel.

Referenced by AnalogInput::testReadData().

MultipleReferences = 1LL<<23
static

Multiple reference types for the channels.

InvalidDither = 1LL<<24
static

Dither not supported.

MultipleDither = 1LL<<25
static

Multiple dither settings for the channels.

InvalidReglitch = 1LL<<26
static

Reglitch not supported.

MultipleReglitch = 1LL<<27
static

Multiple reglitch settings for the channels.

InvalidGain = 1LL<<28
static

Invalid gain index.

Referenced by Acquire::adjustGain(), Acquire::setGain(), and AnalogInput::testReadData().

MultipleGains = 1LL<<29
static

Multiple gain indices for the channels.

Underflow = 1LL<<30
static

The minimum value of the output signal is larger than the minimum possible output value.

Referenced by DaqError::underflow().

Overflow = 1LL<<31
static

The maximum value of the output signal is larger than the maximum possible output value.

Referenced by DaqError::overflow().

const long long CalibrationFailed = 1LL<<32
static
InvalidChannelType = 1LL<<33
static

Invalid channel type.

InvalidChannelSequence = 1LL<<34
static

Invalid sequence of channel numbers.

Busy = 1LL<<35
static
const long long DeviceError = 1LL<<36
static
OverflowUnderrun = 1LL<<37
static

Overflow of FIFO buffer (input) or underrun (output).

Referenced by DaqError::addDaqError().

Unknown = 1LL<<38
static

Unknown error of the daq board.

Referenced by DaqError::addDaqError(), Acquire::read(), and Acquire::restartRead().

NoIntensity = 1LL<<39
static

Intensity for output signal on attenuator not set.

Referenced by Acquire::directWrite(), Acquire::testWrite(), and Acquire::write().

AttNotOpen = 1LL<<40
static

Attenuator device is not open.

AttInvalidDevice = 1LL<<41
static

Attenuator device does not exist.

AttFailed = 1LL<<42
static

Failure in setting attenuator.

Referenced by DaqError::attenuatorFailed().

AttUnderflow = 1LL<<43
static

Requested signal amplitude to small for attenuator.

Referenced by DaqError::underflow().

AttOverflow = 1LL<<44
static

Requested signal amplitude too large for attenuator.

Referenced by DaqError::overflow().

AttIntensityUnderflow = 1LL<<45
static

Requested signal amplitude to small for calculating the attenuation level.

Referenced by DaqError::underflow().

AttIntensityOverflow = 1LL<<46
static

Requested signal amplitude too large for calculating the attenuation level.

Referenced by DaqError::overflow().

AttIntensityFailed = 1LL<<47
static

Error in calculating the attenuation level.

Referenced by DaqError::addAttError(), and DaqError::attenuatorFailed().


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