MASAR Server & Applications

advertisement
MASAR Server & Application
Guobao Shen
Photon Sciences Department
Brookhaven National Laboratory
Collaboration Working Group
Oct 02, 2013
What’s MASAR?
 MASAR
 Machine Snapshot, Archiving, and Retrieve
 An EPICS tool for experimental control system
 Machine
 A facility controlled by EPICS, accelerator for example
 Snapshot
 Data at specific time point
 Value, time stamp, connection status, alarm status, alarm severity
 Similar tools, but different purpose
 IOC automatic save & restore
 IOC bumpless rebooting
 Channel Archiving
 Archive pre-defined configuration periodically
 All data saved time serially
2
MASAR Architecture
Scripting
PyQt
Scripting
High Level Scripting API
Low Level Python Client Library
pvAccess/channelRPC Client (C++)
Others
(Matlab)
CSS/BOY
pvAccess Client API
Library (Java)
pvAccess
pvAccess/channelRPC
Service Engine
DSL-PY Module
Gather/C++
PYMASAR
Channel Access
(SQLite)
IOC
Finished
User Apps
IOC
IOC
Planning
Developing
3
MASAR Service
 An EPICS V4 service
 V4 C++ modules
 pvData beta2
 pvAccess beta2
 pvIOC beta2
 normativeTypes
 Communication mechanism
 channelRPC
4
V3 Type Support
 Support all scalar and waveform PV types
 float, double, string, and enum
epics data type
data type by MASAR
enum, string
string
byte, short, int/long
long
float, double
double
 Could be a mix of any of the types
5
MASAR Functions
 Functions supported by service
Functions
retrieveSystemList
Description
Retrieve a list of system from RDB
retrieveServiceConfigs Retrieve a list of configuration from RDB
retrieveServiceEvents Retrieve snapshot list w/o data from RDB
retrieveSnapshot
Retrieve one snapshot with data from RDB
saveSnapshot
Take a snapshot from IOC, and save data into RDB
updateSnapshotEvent Update snapshot information in RDB, like flag data to be good
Get machine data from live IOC
getLiveMachine
 Data Structure used by request
structure NTNameValue
string[] names
string[] values
string
function xxxxxx // function name as above
6
MASAR Data Structure
 NTTable
 Scalar value
 Need NTVariantArray
structure timeStamp
long secondsPastEpoch 0
int nanoSeconds 0
int userTag 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 isConnected []
long secondsPastEpoch []
int nanoSeconds []
string alarmSeverity []
string alarmStatus []
bool is_array []
structure array_value [structure[]]
7
MASAR Client
 Python library
 7 APIs
 API naming convention
 Retrieve/Save: RDB oriented
 Get/Put:
PV oriented
API
retrieveSystemList
Description
Retrieve a list of system from RDB
retrieveServiceConfigs Retrieve a list of configuration from RDB
retrieveServiceEvents Retrieve snapshot list w/o data from RDB
retrieveSnapshot
Retrieve one snapshot with data from RDB
saveSnapshot
Take a snapshot from IOC, and save data into RDB
updateSnapshotEvent Update snapshot information in RDB, like flag data to be good
Get machine data from live IOC
getLiveMachine
8
MASAR UI
 PyQt4 based graphic user interface
 On top of Python client library
 Browse configuration
 Browse event
 Take snapshot
 Retrieve data
 Compare data
 Restore machine
 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
 pvAccess plug-in in CSS
 Map NT type into V Type/pvManager
 Basic type
 Name/value
 Table
 NT type Java support
 Widget development
 Reuse existing widget
 Table, …
 Table manipulation
 Join, comparison
 Plotting
 Columns in single table
 Columns in multiple tables
 URI pva://pva…
12
System Wide Application
 Interactive with other services
 Channel finder
 Get PV list to create a new configuration
 Olog
 Create a new entry automatically whenever needed
 Lattice/Model
 Get a machine live lattice
 Calculate beam parameters of live lattice
 Save model results
 Need MUNICONV service support
 Engineering unit (Ampere) Model unit (K value)
 Assemble into CSS
 Each item is or will be a CSS application
 Need to assemble them together
13
Download