MASAR Server Application Guobao Shen Photon Sciences Department
MASAR Server & Application Guobao Shen Photon Sciences Department Brookhaven National Laboratory Collaboration Working Group Oct 02, 2013
What’s MASAR? Ø MASAR v Machine Snapshot, Archiving, and Retrieve v An EPICS tool for experimental control system Ø Machine v A facility controlled by EPICS, accelerator for example Ø Snapshot v Data at specific time point v Value, time stamp, connection status, alarm severity Ø Similar tools, but different purpose v IOC automatic save & restore v IOC bumpless rebooting v Channel Archiving v Archive pre-defined configuration periodically v All data saved time serially 2
MASAR Architecture Scripting Py. Qt Scripting High Level Scripting API Low Level Python Client Library pv. Access/channel. RPC Client (C++) Others (Matlab) CSS/BOY pv. Access Client API Library (Java) pv. Access/channel. RPC Service Engine DSL-PY Module Gather/C++ PYMASAR Channel Access (SQLite) IOC Finished User Apps IOC Planning Developing 3
MASAR Service Ø An EPICS V 4 service Ø V 4 C++ modules v pv. Data beta 2 v pv. Access beta 2 v pv. IOC beta 2 v normative. Types Ø Communication mechanism v channel. RPC 4
V 3 Type Support Ø Support all scalar and waveform PV types v float, double, string, and enum epics data type by MASAR enum, string byte, short, int/long float, double Ø Could be a mix of any of the types 5
MASAR Functions Ø Functions supported by service Functions retrieve. System. List Description Retrieve a list of system from RDB retrieve. Service. Configs Retrieve a list of configuration from RDB retrieve. Service. Events Retrieve snapshot list w/o data from RDB retrieve. Snapshot Retrieve one snapshot with data from RDB save. Snapshot Take a snapshot from IOC, and save data into RDB update. Snapshot. Event Update snapshot information in RDB, like flag data to be good Get machine data from live IOC get. Live. Machine Ø Data Structure used by request structure NTName. Value string[] names string[] values string function xxxxxx // function name as above 6
MASAR Data Structure Ø NTTable v Scalar value v Need NTVariant. Array structure time. Stamp long seconds. Past. Epoch 0 int nano. Seconds 0 int user. Tag 0 structure alarm int severity 0 int status 0 string message string[] label [. . . ] // value field in label field string pv name [] string value [] double value [] long value [] int dbr_type [] bool is. Connected [] long seconds. Past. Epoch [] int nano. Seconds [] string alarm. Severity [] string alarm. Status [] bool is_array [] structure array_value [structure[]] 7
MASAR Client Ø Python library v 7 APIs v API naming convention v Retrieve/Save: RDB oriented v Get/Put: PV oriented API retrieve. System. List Description Retrieve a list of system from RDB retrieve. Service. Configs Retrieve a list of configuration from RDB retrieve. Service. Events Retrieve snapshot list w/o data from RDB retrieve. Snapshot Retrieve one snapshot with data from RDB save. Snapshot Take a snapshot from IOC, and save data into RDB update. Snapshot. Event Update snapshot information in RDB, like flag data to be good Get machine data from live IOC get. Live. Machine 8
MASAR UI Ø Py. Qt 4 based graphic user interface Ø On top of Python client library v Browse configuration v Browse event v Take snapshot v Retrieve data v Compare data v Restore machine v Export data to external file 9
MASAR UI Ø Multiple comparison Ø Support up to 9 data sets 10
MASAR UI Ø Data plotting 11
MASAR CSS Integration Ø pv. Access plug-in in CSS Ø Map NT type into V Type/pv. Manager v Basic type v Name/value v Table Ø NT type Java support Ø Widget development v Reuse existing widget v Table, … v Table manipulation v Join, comparison v Plotting v Columns in single table v Columns in multiple tables Ø URI pva: //pva… 12
System Wide Application Ø Interactive with other services v Channel finder v Get PV list to create a new configuration v Olog v Create a new entry automatically whenever needed v Lattice/Model v Get a machine live lattice v Calculate beam parameters of live lattice v Save model results v Need MUNICONV service support v Engineering unit (Ampere) Model unit (K value) Ø Assemble into CSS v Each item is or will be a CSS application v Need to assemble them together 13
- Slides: 13