EPICS ARCHIVER V4
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups
SpreadsheetReader.h
1 // -*- c++ -*-
2 
3 // tools
4 #include "tools/ToolsConfig.h"
5 #include "tools/AutoPtr.h"
6 
7 // storage
8 #include "storage/ReaderFactory.h"
9 #include "storage/Index.h"
10 
13 
15 
22 {
23  public:
25  SpreadsheetReader(Index &index,
27  double delta=0.0);
28 
29  virtual ~SpreadsheetReader();
30 
42  virtual bool find(const stdVector<stdString> &channel_names,
43  const epicsTime *start = 0);
44 
50  bool found(size_t i) const
51  {
52  return info[i];
53  }
54 
56  virtual const epicsTime &getTime() const;
57 
59 
63  virtual size_t getNum() const;
64 
66  virtual const stdString &getName(size_t i) const;
67 
73  virtual const RawValue::Data *get(size_t i) const;
74 
78  virtual DbrType getType(size_t i) const;
79 
83  virtual DbrCount getCount(size_t i) const;
84 
88  virtual const CtrlInfo &getInfo(size_t i) const;
89 
93  bool next();
94 
95 protected:
96 
97  Index &index;
99  double delta;
100 
101  // Number of array entries for the following stuff that's non-scalar
102  size_t num;
103 
104  // One reader per channel (also has a copy of the channel names)
106 
107  // Current data for each reader.
108  // This often already points at the 'next' value.
110 
111  // The current time slice
112  epicsTime time;
113 
114  // Copies of the current control infos
116 
117  // Type/count for following value
120 
121  // The current values, i.e. copy of the reader's value
122  // for the current time slice, or 0.
124 
125 private:
126  PROHIBIT_DEFAULT_COPY(SpreadsheetReader);
127 };
128 
130 
unsigned short DbrType
DbrType is used to hold dbr_time_xxx types.
Definition: RawValue.h:24
virtual size_t getNum() const
Number of entries in the following arrays.
Meta-information for values: Units, limits, etc .
Definition: CtrlInfo.h:75
An auto-pointer for arrays.
Definition: AutoPtr.h:120
Reads data from storage, formatted as spreadsheet.
Definition: SpreadsheetReader.h:21
virtual const stdString & getName(size_t i) const
Returns name of channel i=0...getNum()-1.
bool next()
Get the next time slice.
virtual bool find(const stdVector< stdString > &channel_names, const epicsTime *start=0)
Locate initial values.
bool found(size_t i) const
Was this channel found?
Definition: SpreadsheetReader.h:50
unsigned short DbrCount
DbrCount is used to hold the array size of CA channels.
Definition: RawValue.h:27
How
Determine what DataReader to use:
Definition: ReaderFactory.h:22
virtual const epicsTime & getTime() const
Time stamp for the current slice of data.
virtual DbrCount getCount(size_t i) const
array size.
virtual const CtrlInfo & getInfo(size_t i) const
The meta information for the channel.
Base interface for the archiver&#39;s indices.
Definition: Index.h:16
SpreadsheetReader(Index &index, ReaderFactory::How how=ReaderFactory::Raw, double delta=0.0)
Create the SpreadsheetReader.
Use RawDataReader.
Definition: ReaderFactory.h:23
virtual DbrType getType(size_t i) const
The dbr_time_xxx type.
dbr_time_double Data
Type for accessing the raw data and its common fields.
Definition: RawValue.h:55