Upload
amelie
View
37
Download
2
Tags:
Embed Size (px)
DESCRIPTION
Server-Side Plugins. Andrew Johnson, Ralph Lange EPICS Fall Collaboration Meeting, October 2010 BNL. Motivation. Things get faster Not all clients want all updates Wide use of timing/event systems Clients want to get updates only during “interesting” system states. Current Limitations. - PowerPoint PPT Presentation
Citation preview
Server-Side PluginsAndrew Johnson, Ralph Lange
EPICS Fall Collaboration Meeting, October 2010
BNL
Motivation
Things get fasterNot all clients want all updates
Wide use of timing/event systemsClients want to get updates only during “interesting” system states
Current Limitations
Update rate / deadband are configured in the databaseOne setup for all clients
Existing timing/event system driver and support• May cause records to process on event• May set time stamps from hardware
No filtering of updates for unrelated records
Design Considerations
Channel Access protocol compatibilityChanges create a lot of trouble
ModularitySmall systems need small footprint
API CompatibilityDon’t break existing “3rd party” code
EventQueue
ring
buffe
r
Server-Side Plugins
RecordEvent Subscription
field 1flags
Channel Access Client 1
Channel Access Client 2
MLISfield 1field 2field 3…
Channel Access Server
Event Task 1
Event Task 2
Event Subscription
field 2flags
Event Subscription
field 3flags
Event Subscription
field 1flags
EventQueue
ring
buffe
r
Ethernet
Record processing or field changes cause event updates
One set of event queues per client
Client
IOC
Pre-Event-Queue Filters
EventQueue
ring
buffe
r
Post-Event-Queue Filters
Stackable modulesInserted below or above
the event queue between database and Channel Access server
Configuration and InstantiationClient uses JSON
modifiers in PV name
Plug-in framework parses configuration and calls filter function
Plugin Integration
Plugin registers its interface (at boot-up):• Name and interface (jump table)• Filter function (and private pointer argument) to be inserted
into the pre- or post-event-queue chain• Description of the configuration options and config value
locations
Framework• Creates the plugin instance• Parses the configuration and stores results• Calls the registered filter function when appropriate
Plugins May
Manipulate the data Manipulate the meta data (alarm, timestamp) Change the type of data Change the size of arrays Drop updates Insert updates
ts – Timestamp “Now”
myPv.A{”ts”:{}}
Pre-event-queue: Sets the timestamp of the data update to “now”
Works around the issue that updates to fields which do not cause record processing create data updates that always show the (older) record timestamp, leading to e.g. the archiver creating wrong entries
dbnd – Deadband Throttling
myPv.RVAL{”dbnd”{”m”:”rel”,”d”:7.5}}
Pre-event-queue: Deadband throttling similar to analog records
Client specifies absolute or relative (%) delta Works for any field, not just .VAL
arr – Array Subset
myArray.VAL{”arr”:{”s”:-5,”i”:2}}
myArray.VAL[-5:2:]
Post-event-queue: Creates a sub-array with given start, increment, stop
Shorthand notation for commodity
sync – Sync with Timing System
myPv.VAL{”sync”:{”m”:”while”,”s”:”red”}}
Pre-event-queue: Synchronizes updates with timing system by pushing the update only under certain conditions
Refers to IOC globally configured named states that are defined by timing system events
sync Options
#17 #17#42 #42
Client subscribes to
State “red”
Client gets
Record my processing
Timing events
my.VAL
sync Options: before
#17 #17#42 #42
my.VAL{”sync”:{”m”:”before”,”s”:”red”}}Client subscribes to
State “red”
Client gets
Record my processing
Timing events
sync Options: first
#17 #17#42 #42
my.VAL{”sync”:{”m”:”first”,”s”:”red”}}Client subscribes to
State “red”
Client gets
Record my processing
Timing events
sync Options: last
#17 #17#42 #42
my.VAL{”sync”:{”m”:”last”,”s”:”red”}}Client subscribes to
State “red”
Client gets
Record my processing
Timing events
sync Options: after
#17 #17#42 #42
my.VAL{”sync”:{”m”:”after”,”s”:”red”}}Client subscribes to
State “red”
Client gets
Record my processing
Timing events
sync Options: while
#17 #17#42 #42
my.VAL{”sync”:{”m”:”while”,”s”:”red”}}Client subscribes to
State “red”
Client gets
Record my processing
Timing events
sync Options: unless
Client subscribes to
State “red”
Client gets
Record my processing
Timing events #17 #17#42 #42
my.VAL{”sync”:{”m”:”unless”,”s”:”red”}}
Status
Framework in place, interfaces stabilizing ts, dbnd, arr plugins: implemented Unit tests for framework and plugins exist sync plugin: in progress Next: rate based throttling Planned: atomic put/get, array stats,
default configuration values through info tags
Status
Unclear: access security integration Code is available (please give feedback):
lp:~ralph-lange/epics-base/server-side-plugins
Acknowledgements:• Michael Davidsaver• Supported by Helmholtz-Zentrum Berlin / BESSY II