1 #ifndef EA4_PVRPC_ARCHIVE_COMMAND_H
2 #define EA4_PVRPC_ARCHIVE_COMMAND_H
10 #include "storage/CtrlInfo.h"
11 #include "storage/RawValue.h"
12 #include "storage/RPCServerConfig.h"
14 namespace ea4 {
namespace pvrpc {
63 virtual const char*
getName()
const = 0;
69 virtual epics::pvData::PVStructurePtr
70 process(epics::pvData::PVStructurePtr
const & request) = 0;
74 epics::pvData::StructureConstPtr createMetaType(
const CtrlInfo* info);
76 void setMeta(epics::pvData::PVStructurePtr& meta,
81 Index* createIndex(
int key);
83 epics::pvData::StructureConstPtr
84 createDbrTimeValueType(epics::pvData::ScalarType pv_type);
88 void dbr_type_to_pv_type(
DbrType dbr_type,
90 epics::pvData::ScalarType& pv_type,
93 void encode_value(
DbrType dbr_type,
95 const epicsTime& time,
97 epics::pvData::ScalarType pv_type,
99 epics::pvData::PVStructurePtr& values,
100 bool with_min_max =
false,
101 double minimum = 0.0,
102 double maximum = 0.0);
106 void epicsTime2pieces(
const epicsTime& t,
110 void pieces2epicsTime(
int secs,
virtual const char * getName() const =0
Returns the command name.
unsigned short DbrType
DbrType is used to hold dbr_time_xxx types.
Definition: RawValue.h:24
static const int ARCH_DAT_DATA_ERROR
'data error' fault code
Definition: ArchiveCommand.h:58
Meta-information for values: Units, limits, etc .
Definition: CtrlInfo.h:75
static const int HOW_OLD_AVERAGE
Averaged spreadsheet, delta = (end-start)/count.
Definition: ArchiveCommand.h:28
Basic class of the RPC commands.
Definition: ArchiveCommand.h:17
static const int HOW_AVERAGE
Averaged spreadsheet, delta = count.
Definition: ArchiveCommand.h:37
static const int HOW_SHEET
Raw data in 'filled' spreadsheet.
Definition: ArchiveCommand.h:25
unsigned short DbrCount
DbrCount is used to hold the array size of CA channels.
Definition: RawValue.h:27
virtual epics::pvData::PVStructurePtr process(epics::pvData::PVStructurePtr const &request)=0
Processes the request.
static const int ARCH_DAT_SERV_FAULT
'serv' fault code
Definition: ArchiveCommand.h:49
static const int META_TYPE_ENUM
Meta type for the enum values.
Definition: ArchiveCommand.h:40
virtual epics::pvData::PVStructurePtr createRequest()=0
Creates the request structure of this command.
static const int HOW_RAW
Raw data, channel by channel.
Definition: ArchiveCommand.h:22
static const int ARCH_DAT_NO_INDEX
'no index' fault code
Definition: ArchiveCommand.h:52
static const int HOW_PLOTBIN
Plot-binned, channel by channel, 'count' bins.
Definition: ArchiveCommand.h:31
Base interface for the archiver's indices.
Definition: Index.h:16
static const int META_TYPE_NUMERIC
Meta type for the numeric values.
Definition: ArchiveCommand.h:43
static const int ARCH_DAT_ARG_ERROR
'arg error' fault code
Definition: ArchiveCommand.h:55
dbr_time_double Data
Type for accessing the raw data and its common fields.
Definition: RawValue.h:55
static const int HOW_LINEAR
Linear interpolation spreadsheet, delta = (end-start)/count.
Definition: ArchiveCommand.h:34