EPICS ARCHIVER V4
|
Reads data from storage, averaging over the raw samples. More...
#include <AverageReader.h>
Public Member Functions | |
AverageReader (Index &index, double delta) | |
Create a reader for an index. More... | |
const RawValue::Data * | find (const std::string &channel_name, const epicsTime *start) |
Returns 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 present sample. | |
DbrType | getType () const |
Return the value type. | |
DbrCount | getCount () const |
Returns the count of the sample value. | |
const CtrlInfo & | getInfo () const |
Returns CtrlInfo. | |
bool | changedType () |
Checks if type changed. | |
bool | changedInfo () |
Checks if CtrlInfo changed. | |
bool | isRaw () const |
double | getMinimum () const |
double | getMaximum () const |
![]() | |
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, averaging over the raw samples.
The AverageReader is an implementaion of a DataReader that returns the average value of the raw values within each 'bin' of 'delta' seconds on the time axis.
Assume the averaging delta is 10.0 seconds. In order to get nice-looking time stamps like 01:30:00, 01:30:10, 01:30:10, ...
, the averaging reader creates bins ending at 01:30:05, 01:30:15, 01:30:15, ...
.
The averaged data from 01:30:05 to just before 01:30:15 is then time-stamped 01:30:10. In addition, the minimum and maximum value for the bin is available.
On the other hand, if a bin only contains a single value, that original value is returned. And if the bin contains special values like "Archive Off", that special value is returned.
AverageReader::AverageReader | ( | Index & | index, |
double | delta | ||
) |
Create a reader for an index.
index | index file |
delta | The averaging time interval in seconds. |
|
inline |
|
inline |
|
inline |