EPICS ARCHIVER V4
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups
RawDataReaderEA3.h
1 // -*- c++ -*-
2 
3 #ifndef __RAW_DATA_READER_EA3_H__
4 #define __RAW_DATA_READER_EA3_H__
5 
6 // tools
7 #include "tools/ToolsConfig.h"
8 #include "tools/AutoPtr.h"
9 
10 // storage
11 #include "storage/RawDataReader.h"
12 #include "storage/CtrlInfo.h"
13 
16 
23 {
24 public:
25 
28 
30  virtual ~RawDataReaderEA3();
31 
33  virtual const RawValue::Data *find(const stdString &channel_name,
34  const epicsTime *start);
35 
37  virtual const std::string& getName() const;
38 
40  virtual const RawValue::Data *next();
41 
42 
44  virtual const RawValue::Data *get() const;
45 
47  virtual DbrType getType() const;
48 
50  virtual DbrCount getCount() const;
51 
53  virtual const CtrlInfo& getInfo() const;
54 
56  virtual bool changedType();
57 
59  virtual bool changedInfo();
60 
61  public:
62 
68  void read(DbrType type, DbrCount count,
69  size_t size, RawValue::Data *value,
70  class DataFile *datafile, FileOffset offset);
71 
72 private:
73 
74  void getHeader(const stdString &basename, FileOffset offset);
75  const RawValue::Data *findSample(const epicsTime &start);
76  const RawValue::Data *nextFromDatablock();
77 
78 private:
79 
80  // Index
81  Index& index;
82 
83  // Current sample
84  size_t raw_value_size;
86  size_t val_idx; // current index in data buffer
87 
88  RawDataReader::PrvData* prvData;
89 
90 };
91 
93 
94 #endif
virtual bool changedType()
next() updates this if dbr_type/count changed.
Binary Data File.
Definition: DataFile.h:32
unsigned short DbrType
DbrType is used to hold dbr_time_xxx types.
Definition: RawValue.h:24
virtual DbrCount getCount() const
array size
Meta-information for values: Units, limits, etc .
Definition: CtrlInfo.h:75
Reads data from storage.
Definition: DataReader.h:23
RawDataReaderEA3(Index &index, RawDataReader::PrvData *data)
Constructor.
virtual const RawValue::Data * next()
Obtain the next value.
virtual ~RawDataReaderEA3()
Destructor.
unsigned short DbrCount
DbrCount is used to hold the array size of CA channels.
Definition: RawValue.h:27
uint32_t FileOffset
FileOffset is used as a system independent type for, well, offsets into files.
Definition: StorageTypes.h:13
virtual const RawValue::Data * find(const stdString &channel_name, const epicsTime *start)
Locate data.
virtual const std::string & getName() const
Name of the channel, i.e. the one passed to find()
virtual const CtrlInfo & getInfo() const
The meta information for the channel.
void read(DbrType type, DbrCount count, size_t size, RawValue::Data *value, class DataFile *datafile, FileOffset offset)
Read a value from binary file.
Private Data of RawDataReader.
Definition: RawDataReader.h:63
Base interface for the archiver's indices.
Definition: Index.h:16
virtual bool changedInfo()
next() updates this if ctrl_info changed.
dbr_time_double Data
Type for accessing the raw data and its common fields.
Definition: RawValue.h:55
An implementation of the DataReader for raw data.
Definition: RawDataReaderEA3.h:22
virtual DbrType getType() const
The dbr_time_xxx type.