EPICS ARCHIVER V4
|
Reads data from storage. More...
#include <DataReader.h>
Public Member Functions | |
virtual const RawValue::Data * | find (const stdString &channel_name, const epicsTime *start)=0 |
Locate data. More... | |
virtual const stdString & | getName () const =0 |
Name of the channel, i.e. the one passed to find() | |
virtual const RawValue::Data * | next ()=0 |
Obtain the next value. More... | |
virtual const RawValue::Data * | get () const =0 |
Current value. More... | |
virtual DbrType | getType () const =0 |
The dbr_time_xxx type. | |
virtual DbrCount | getCount () const =0 |
array size | |
virtual const CtrlInfo & | getInfo () const =0 |
The meta information for the channel. | |
void | toString (stdString &text) const |
Convert current value to string. More... | |
virtual bool | changedType ()=0 |
next() updates this if dbr_type/count changed. More... | |
virtual bool | changedInfo ()=0 |
next() updates this if ctrl_info changed. More... | |
Reads data from storage.
The data reader interfaces to the Index/DataFile and returns a stream of RawValue values.
|
pure virtual |
next() updates this if ctrl_info changed.
Implemented in PlotReader, AverageReader, RawDataReaderEA3, RawDataReader, and ShallowIndexRawDataReader.
|
pure virtual |
next() updates this if dbr_type/count changed.
Implemented in PlotReader, AverageReader, RawDataReaderEA3, RawDataReader, and ShallowIndexRawDataReader.
|
pure virtual |
Locate data.
Positions reader on given channel and start time.
Specifically: If a value with the exact start time exists, it will be returned. Otherwise the value just before the start time is returned, so that the user can then decide if and how that value might extrapolate onto the start time.
channel_name,: | Name of the channel |
start,: | start time or 0 for first value |
GenericException | on error, including file access issues or the fact that a channel doesn't exist. |
Implemented in RawDataReader, and RawDataReaderEA3.
|
pure virtual |
Current value.
Same as the last find() or next() result. Undefined when find() or next() returned 0.
Implemented in PlotReader, AverageReader, RawDataReaderEA3, RawDataReader, and ShallowIndexRawDataReader.
|
pure virtual |
Obtain the next value.
After a successful call to find() for the first value, this routine returns the following values with each call. When no more data is available, 0 is returned. Any calls to next() after either find() or next() return 0 to indicate the end of the available data will result in exceptions.
GenericException | on error: File access, called after reaching the end of data. |
Implemented in PlotReader, AverageReader, RawDataReader, ShallowIndexRawDataReader, RawDataReaderEA3, and LinearReader.
void DataReader::toString | ( | stdString & | text | ) | const |