11
Archive Service Nikolay Malitsky October 2, 2013

Archive Service Nikolay Malitsky October 2, 2013

Embed Size (px)

Citation preview

Page 1: Archive Service Nikolay Malitsky October 2, 2013

Archive Service

Nikolay Malitsky

October 2, 2013

Page 2: Archive Service Nikolay Malitsky October 2, 2013

Content

XML-RPC interface C++ ea4::pvrpc server CSS plug-in TS Frames model

Page 3: Archive Service Nikolay Malitsky October 2, 2013

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:

Page 4: Archive Service Nikolay Malitsky October 2, 2013

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<string> how; vector<string> stat; vector<SevrInfo> sevr;};

In Plain C++

Page 5: Archive Service Nikolay Malitsky October 2, 2013

Archiver Names

struct ArchiveInfo { int key; string name; string path;};

struct GetArchivesRequest { string command;};

struct GetArchivesResult { vector<ArchiveInfo> archives;};

In Plain C++

Page 6: Archive Service Nikolay Malitsky October 2, 2013

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<ChanInfo> channels;};

In Plain C++

Page 7: Archive Service Nikolay Malitsky October 2, 2013

Channel Values

Problem: heterogeneous array

Solution: PVData-based dynamic structure of self-described members

Page 8: Archive Service Nikolay Malitsky October 2, 2013

C++ ea4::pvrpc server

Page 9: Archive Service Nikolay Malitsky October 2, 2013

CSS Plug-in

Page 10: Archive Service Nikolay Malitsky October 2, 2013

TS Frames Model - 1 of 2

TS Frames Timestamp

Bin Metadata

Framearray 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)

Page 11: Archive Service Nikolay Malitsky October 2, 2013

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