Archive Service Nikolay Malitsky October 2, 2013
Content XML-RPC interface C++ ea4::pvrpc server CSS plug-in TS Frames model
XML-RPC Interface archiver info: common information used in other commands, such as enumeration of alarm statuses and severities archiver names: a list of archiver names and paths to the index files used by this data server channel names: a list of channels matched to the input pattern channel values: data of selected channels The XML-RPC interface consists of four commands and associated messages:
Archiver Info struct SevrInfo { int num; string sevr; int has_value; int txt_stat; }; struct GetInfoRequest { string command; }; struct GetInfoResult { int ver; string desc; vector how; vector stat; vector sevr; }; In Plain C++
Archiver Names struct ArchiveInfo { int key; string name; string path; }; struct GetArchivesRequest { string command; }; struct GetArchivesResult { vector archives; }; In Plain C++
Channel Names struct ChanInfo { string name; int start_sec; int start_nano; int end_sec; int end_nano; }; struct GetChannelsRequest { string command; int key; string pattern; }; struct GetChannelsResult { vector channels; }; In Plain C++
Channel Values Problem: heterogeneous array Solution: PVData-based dynamic structure of self-described members
C++ ea4::pvrpc server
CSS Plug-in
TS Frames Model - 1 of 2 TS Frames Timestamp Bin Metadata Frame array of Coord Metadata Position array of pixel_meta Coord Metadata frame meta 1 …* 1 array of position meta 1 …* struct TimeStamp { int64_t secPastEpoch; int32_t nsec; int32_t userTag; } ; struct CoordMetadata { double low; // display range double high; // string name; // string unit; // “counts” uint32_t type; // e.g. UInt16, Double }; struct BinMetadata { uint32_t size; // size of dimension double min; // interval range double max; // string label; // “x”, “y” string unit; // uint32_t type; // Double double* ticks; // null in the interval case }; timestamps frames positions The proposed generic structure of the sparse multi-dimensional array is defined after the “natural” experiment-oriented representation built from the combination of two datasets: time series of detector-specific frames and time series of the frame positions in the scan-specific multi-dimensional space (angle, energy, pressure, etc)
TS Frames Model – 2 of 2 consistent with all (22) NeXus Application Definitions mapped into C++, Python, and HDF5 supported by EPICS 4 PVData and RPC suggests the transaction-oriented interface: select and fetch