EPICS ARCHIVER V4
|
Reads data from storage, modified for plotting. More...
#include <PlotReader.h>
Public Member Functions | |
PlotReader (Index &index, double delta) | |
Create a reader for an index. More... | |
const RawValue::Data * | find (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::Data * | next () |
Returns the next sample. | |
const RawValue::Data * | get () const |
Returns the current sample. | |
DbrType | getType () const |
DbrCount | getCount () const |
const CtrlInfo & | getInfo () const |
bool | changedType () |
Checks if type changed. | |
bool | changedInfo () |
Checks if info changed. | |
![]() | |
virtual const RawValue::Data * | find (const stdString &channel_name, const epicsTime *start)=0 |
Locate data. More... | |
void | toString (stdString &text) const |
Convert current value to string. More... | |
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.
PlotReader::PlotReader | ( | Index & | index, |
double | delta | ||
) |
Create a reader for an index.
delta == 0 causes it to behave like the RawDataReader.
index | index file |
delta | The bin size in seconds. |
|
virtual |
Implements DataReader.
|
virtual |
Implements DataReader.
|
virtual |
Implements DataReader.