MO4A_1-7O - icalepcs 2005

Download Report

Transcript MO4A_1-7O - icalepcs 2005

The Directory Service for
the CERN Accelerator
Control Application
Programs
J.Cuperus, M.Peryt, E.Roux, J.Schinzel
CERN, Geneva, Switzerland
What is the Directory Service ?




It is a library of Java classes
It is an interface for obtaining read-only information
about devices, classes, properties, characteristics, bit
patterns, device groupings, device relations, and
programs.
Also a read-write interface for device initialisation
parameters.
Configuration database access through Java Database
Connectivity (JDBC).
Place in Control System
Application Programs
Generic Components
Directory Service
Configuration Database
Other Interface Libraries
Device Access library
Middleware
Device Access Modules in FECs
Controlled Devices in 10 Accelerators
Device Data



An accelerator device is something that can be
controlled, like a magnet power supply, a timing, a beam
monitor, a vacuum pump... Not counting the LHC, we
now control directly 35000 devices.
An instance of class Controldevice can be obtained with:
– Controldevice device =
ControlDevice.getControlDevice(deviceName)
This instance has many methods, like:
– String accelerator = device.getAccelerator()
– ControlDeviceClass devclass =
device.getControlDeviceClass()
Device Sets



An array of devices can be obtained with:
– ControlDevice[] devices = ControlDevice.
getControlDevices(String query, String order)
query: any SQL query statement against the
columns of database table DEVICES, like:
query="accelerator='PSB' and classname='POW' "
order: a comma-separated list of table columns
according to which you want the result ordered.
Working Sets
WorkingSet
DeviceGroup
ControlDevice
Device Relations



A more complex device set is the working set, which is an
array of array of devices.
A hand-made working set can be obtained with:
– WorkingSet wset =
WorkingSet.getWorkingSetByName(String wsetName);
It is also possible to get a working set by query, grouped
by device class:
– Workingset wset =
WorkingSet.getWorkingSetByQuery(String query)
Device Relations



For each device, it is possible to get the associated
devices and the relation they have to the device,
like: timxxx is TRIG-START for powyyy.
Some existing relation names:
– TRIG-START
– TRIG-ACQUISITION
– ACTUATOR
– INPUT ...
~relation indicates the inverse relation:
powyyy is ~TRIG-START by timxxx
Device Classes and Properties
DeviceCompositeProperty
1
ControlDevice
ControlDeviceClass
m
n
DeviceProperty
MetaProperty




1
1
1..
k
DeviceAtomicProperty
Properties are for acquiring and controlling certain
aspects of a device through the middleware.
Properties can be atomic, or composite by grouping
several atomic properties.
Properties can have attributes like datatype,
dimensions, units, minval, maxval, ...
The meaning of the properties of each
ControlDeviceClass are described in class
MetaProperty.
Meta Properties



Each ControlDeviceClass can be associated with a
number of MetaProperty instances.
A metaproperty indicates an important function of
the class in general terms, understandable by
generic programs that have no a-priory knowledge
about the ControlDeviceClass and its properties.
As an example, the database input form for
metaproperty STAT-MC (recognised by generic
programs and components as meaning: main
status control), for a power supply class.
Input Form for metadata
Console Menus andWorking Sets
OpConfigProcess
OpConfigProcess
OpConfig
OpConfig
WorkingSet
WorkingSet
JMenuItem
JMenuItem
ConsMenuItem
ConsMenuItem
Menu Tree





1
0 .. 1
ProgDef
ProgDef
Tasks
OpConfig describes an operational configuration
like CPSOP (operation of CPS accelerator).
OpConfigProces is part of this, like particle ejection.
A working-set selection menu is associated with the
OpConfig, with OpconfigProcess submenus.
A number of program selection menu trees is
associated with the OpConfig.
ProgDef describes the program and its attributes.
Generic Workset Display Program
Generic Control Knob Component
Initialisation Parameters




Any status or value control parameter for a device
can be stored as a REFERENCE. This includes
arrays for function generators.
This can be done for any of up to 64 virtual machines
which configure our accelerators for a particular
operation like injecting protons in the LHC.
Particular sets of values can be stored in named
ARCHIVES for a virtual machine. Used to set up the
machines for a particular operation.
The Directory Service provides interfaces for storing
and retrieving REFERENCES and ARCHIVES.
Documentation




Full documentation of public Java Classes and
Methods of the Directory Service with the JavaDoc
tool.
Enhanced by providing a detailed description of
each class, method, and method argument.
Consultable from the Web.
Available on-line in Java Design tools for
application programs.
Conclusions



Some of our accelerator equipment is over 40 years
old and some is brand new, with a great diversity of
equipment types and control technologies.
The Directory Service presents this diversity in a
uniform way to the application programs, so that
generic programs and software components can be
written, that handle many control and display tasks.
New application programs are mainly written in
Java and they use the Directory Service for their
configuration data.
The End