EPICS ARCHIVER V4
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups
PlotReader.h
1 // -*- c++ -*-
2 
3 #ifndef __PLOT_READER_H__
4 #define __PLOT_READER_H__
5 
6 #include "storage/RawDataReader.h"
7 
44 class PlotReader : public DataReader {
45 
46 public:
47 
54  PlotReader(Index &index, double delta);
55 
57  const RawValue::Data* find(const std::string& channel_name,
58  const epicsTime* start);
59 
61  const std::string& getName() const;
62 
64  const RawValue::Data* next();
65 
67  const RawValue::Data* get() const;
68 
70  DbrType getType() const;
71 
73  DbrCount getCount() const;
74 
76  const CtrlInfo& getInfo() const;
77 
79  bool changedType();
80 
82  bool changedInfo();
83 
84 private:
85 
87  double delta;
88 
90  epicsTime end_of_bin;
91 
93  RawDataReader reader;
94 
96  const RawValue::Data *reader_data;
97 
99  DbrType type;
100  DbrCount count;
101  bool type_changed;
102  RawValueAutoPtr initial_sample, mini_sample, maxi_sample,
103  info_sample, final_sample;
104  bool have_initial, have_mini, have_maxi, have_info, have_final;
105  double mini_dbl, maxi_dbl;
106 
107  CtrlInfo info;
108  bool ctrl_info_changed;
109 
110  enum { BinSampleCount = 5 };
111  const RawValue::Data *samples[BinSampleCount];
112  int sample_index;
113 
115  void addSample(const RawValue::Data *);
116 
117  const RawValue::Data *current;
118 
120  void clearValues();
121 
123  const RawValue::Data *analyzeBin();
124 };
125 
126 #endif
unsigned short DbrType
DbrType is used to hold dbr_time_xxx types.
Definition: RawValue.h:24
DbrCount getCount() const
const RawValue::Data * find(const std::string &channel_name, const epicsTime *start)
Returns a sample of the specified channel.
Meta-information for values: Units, limits, etc .
Definition: CtrlInfo.h:75
Reads data from storage.
Definition: DataReader.h:23
An implementation of the DataReader for raw data.
Definition: RawDataReader.h:22
bool changedType()
Checks if type changed.
const std::string & getName() const
Returns the channel name.
unsigned short DbrCount
DbrCount is used to hold the array size of CA channels.
Definition: RawValue.h:27
bool changedInfo()
Checks if info changed.
PlotReader(Index &index, double delta)
Create a reader for an index.
const CtrlInfo & getInfo() const
Base interface for the archiver's indices.
Definition: Index.h:16
DbrType getType() const
dbr_time_double Data
Type for accessing the raw data and its common fields.
Definition: RawValue.h:55
const RawValue::Data * next()
Returns the next sample.
AutoPtr for RawValue.
Definition: RawValue.h:201
Reads data from storage, modified for plotting.
Definition: PlotReader.h:44