EPICS ARCHIVER V4
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups
Public Member Functions | List of all members
PlotReader Class Reference

Reads data from storage, modified for plotting. More...

#include <PlotReader.h>

Inheritance diagram for PlotReader:
DataReader

Public Member Functions

 PlotReader (Index &index, double delta)
 Create a reader for an index. More...
 
const RawValue::Datafind (const std::string &channel_name, const epicsTime *start)
 Returns a sample of the specified channel.
 
const std::string & getName () const
 Returns the channel name.
 
const RawValue::Datanext ()
 Returns the next sample.
 
const RawValue::Dataget () const
 Returns the current sample.
 
DbrType getType () const
 
DbrCount getCount () const
 
const CtrlInfogetInfo () const
 
bool changedType ()
 Checks if type changed.
 
bool changedInfo ()
 Checks if info changed.
 
- Public Member Functions inherited from DataReader
virtual const RawValue::Datafind (const stdString &channel_name, const epicsTime *start)=0
 Locate data. More...
 
void toString (stdString &text) const
 Convert current value to string. More...
 

Detailed Description

Reads data from storage, modified for plotting.

The PlotReader is an implementaion of a DataReader that returns data in a format suitable for plotting.

Beginning at the requested start time, the raw samples within the next bin of 'delta' seconds are investigated, locating the

Those 5 samples are then sorted in time: Initial and final stay as they are, but minimum, maximum and info samples might occur at any time within the bin.

Finally, a 'unique' filter is applied: If the initial and minimum sample are one and the same, only the initial sample is returned. Similarly, the might only be a single intial == mini == maxi == final sample, so only that single sample is returned.

Then the next bin is investigated.

Note that there is no indication which value we're currently returning: The first call to find() will investigate the current bin and return the inital value. The following call to next() might return the minumum within the bin, then the maximum and so on.

This is meant to feed a plotting tool, one that simply draws a line from sample to sample, with the intention of showing an envelope of the raw data, resulting in significant data reduction.

Constructor & Destructor Documentation

PlotReader::PlotReader ( Index index,
double  delta 
)

Create a reader for an index.

delta == 0 causes it to behave like the RawDataReader.

Parameters
indexindex file
deltaThe bin size in seconds.

Member Function Documentation

DbrCount PlotReader::getCount ( ) const
virtual
Returns
count

Implements DataReader.

const CtrlInfo& PlotReader::getInfo ( ) const
virtual
Returns
info

Implements DataReader.

DbrType PlotReader::getType ( ) const
virtual
Returns
type

Implements DataReader.


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