Relacs DAQ Library  0.9.8
Classes | Public Member Functions | Friends | List of all members
OutList Class Reference

#include <outlist.h>

Public Member Functions

 OutList (void)
 
 OutList (OutData &signal)
 
 OutList (OutData *signal, bool own=false)
 
 OutList (const OutList &ol)
 
 ~OutList (void)
 
int size (void) const
 
bool empty (void) const
 
void resize (int n, int m=0, double step=1.0)
 
void clear (void)
 
OutListoperator= (const OutList &ol)
 
const OutDataoperator[] (int i) const
 
OutDataoperator[] (int i)
 
const OutDatafront (void) const
 
OutDatafront (void)
 
const OutDataback (void) const
 
OutDataback (void)
 
int index (const string &ident) const
 
void push (OutData &signal)
 
void push (const OutList &sigs)
 
void add (OutData *signal, bool own=false)
 
void add (const OutData *signal, bool own=false)
 
void add (const OutList &sigs, bool own=false)
 
void erase (int index)
 
void sortByChannel (void)
 
void sortByDeviceChannel (void)
 
const Options & description (void) const
 
Options & description (void)
 
void setDevice (int device)
 
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 setRestart (bool restart=true)
 
double maxLength (void) const
 
void deviceReset (int delay=0)
 
int deviceBufferSize (void)
 
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 OutList &ol)
 
bool lessChannelOLE (const OLE &a, const OLE &b)
 
bool lessDeviceChannelOLE (const OLE &a, const OLE &b)
 

Detailed Description

A container for OutData.

Author
Jan Benda

Constructor & Destructor Documentation

OutList ( void  )

Constructs an empty OutList.

OutList ( OutData signal)

Constructs an OutList containing the single OutData signal.

See Also
push( OutData& )
OutList ( OutData signal,
bool  own = false 
)

Constructs an OutList containing the single pointer signal. Setting own to true transfers the ownership to the OutList.

See Also
add( OutData* )
OutList ( const OutList ol)

Copy constructor.

~OutList ( void  )

Destructor.

Member Function Documentation

int size ( void  ) const
inline
bool empty ( void  ) const
inline

True if there are no OutData signals contained in the OutList.

void resize ( int  n,
int  m = 0,
double  step = 1.0 
)

Resize the OutList such that it contains n OutData signals. If n equals zero, clear() is called. If a larger size than the current size() is requested than empty OutData are appended, each of capacity m and sampling interval step seconds.

See Also
clear(), size(), empty()
void clear ( void  )

Clear the OutList, i.e. remove all OutData signals the OutList owns.

Referenced by OutList::operator=().

OutList & operator= ( const OutList ol)

Assignment.

References OutList::clear().

const OutData& operator[] ( int  i) const
inline

Returns a const reference of the i -th OutData signal of the list.

OutData& operator[] ( int  i)
inline

Returns a reference of the i -th OutData signal of the list.

const OutData & front ( void  ) const

Returns a const reference to the first OutData signal in the list.

References SampleData< T >::front().

OutData & front ( void  )

Returns a reference to the first OutData signal in the list.

References SampleData< T >::front().

const OutData & back ( void  ) const

Returns a const reference to the last OutData signal in the list.

References SampleData< T >::back().

OutData & back ( void  )

Returns a reference to the last OutData signal in the list.

References SampleData< T >::back().

int index ( const string &  ident) const

Return the index of the output data trace with identifier ident. If there is no trace with this identifier -1 is returned.

void push ( OutData signal)

Copy signal as a new element to the end of the list.

void push ( const OutList sigs)

Copy each output signal from sigs to the end of the list.

References OutList::size().

void add ( OutData signal,
bool  own = false 
)

Add the pointer signal as a new element to the end of the list. If own is set to true then the ownership of signal is transfered to the OutList, i.e. the OutList might delete it.

void add ( const OutData signal,
bool  own = false 
)

Add the pointer signal as a new element to the end of the list. If own is set to true then the ownership of signal is transfered to the OutList, i.e. the OutList might delete it.

void add ( const OutList sigs,
bool  own = false 
)

Add pointers to each output signal in sigs to the end of the list. If own is set to true then the ownership of the signals is transfered to the OutList, i.e. the OutList might delete it.

References OutList::size().

void erase ( int  index)

Erase the OutData at index index.

void sortByChannel ( void  )

Sort the output signals by increasing channel number.

void sortByDeviceChannel ( void  )

Sort the output signals by increasing device and by increasing channel number.

const Options & description ( void  ) const

Returns the descriptions of the output signals.

Options & description ( void  )

Returns the descriptions of the output signals.

void setDevice ( int  device)

Set the device id of all signals to device.

Referenced by Acquire::directWrite(), AnalogOutput::testWriteData(), and Acquire::write().

void setStartSource ( int  startsource)

Set the source for the start trigger of the output for all signals to startsource.

Referenced by AnalogOutput::testWriteData().

void setDelay ( double  delay)

Set delay for all signals to delay (in seconds).

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

void setPriority ( bool  priority = true)

Set the priority of all output signals to priority. If priority is true then the output signal is processed even if there still is a data acquisition running. Otherwise the output signal is not processed and returns with an error.

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

void setSampleRate ( double  rate)

Set the sampling rate of all output signals to rate Hertz

Referenced by AnalogOutput::testWriteData().

void setSampleInterval ( double  step)

Set the sampling interval of all output signals to step seconds.

void setContinuous ( bool  continuous = true)

Set continuous mode of data aquisition for all signals to continuous.

Referenced by AnalogOutput::testWriteData().

void setRestart ( bool  restart = true)

If restart is set to true, then the ouput of the signals will restart the data acquisition.

Referenced by AnalogOutput::testWriteData().

double maxLength ( void  ) const
Returns
The duration of the longest OutData in the list.
void deviceReset ( int  delay = 0)

Reset the device indices for a delay of delay indices.

int deviceBufferSize ( void  )

Returns the required size of the device buffer (total number of data elements including delays).

string errorText ( void  ) const

Return string with an error message.

Referenced by AnalogOutput::addErrorStr(), and AnalogOutput::setErrorStr().

void clearError ( void  )

Clear all error flags and error messages of all output signals.

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

void setError ( long long  flags)

Set error flags of all output signals to flags.

void addError ( long long  flags)

Add the bits specified by flags to the error flags of all output signals.

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

void delError ( long long  flags)

Clear the bits specified by flags of the error flags of all output signals.

void addDaqError ( int  de)

Add error code de originating from daq board to the error flags of all output signals.

void setErrorStr ( const string &  strg)

Set additional error string of all output signals to strg.

void addErrorStr ( const string &  strg)

Add msg to the additional error message of all output signals.

void setErrorStr ( int  errnum)

Set additional error string of all output signals 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 of all output signals.

bool success ( void  ) const

Returns true if all output traces are ok.

bool failed ( void  ) const

Friends And Related Function Documentation

ostream& operator<< ( ostream &  str,
const OutList ol 
)
friend

Write content of all OutData variables to stream str (for debugging only).

bool lessChannelOLE ( const OLE &  a,
const OLE &  b 
)
friend
bool lessDeviceChannelOLE ( const OLE &  a,
const OLE &  b 
)
friend

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