You are here: PANDA Wiki>DCS Web>PANDACSS (revision 2)EditAttach

CSS PANDA

This is the wiki of the PANDA-specific CSS version

CSS-PANDA can be downloaded at http://www.ep1.ruhr-uni-bochum.de/~florian/css-panda/

Prerequisites

To use CSS-Panda you will need the following things:
  • Java JDK and JRE (at least version 6)
  • JavaMessageServer (JMS) (e.g. Apache ActiveMQ)
  • SQL database server (e.g. PostgreSQL, MySQL or Oracle)

Overview

CSS-PANDA consists of 5 individual applications:
  • AlarmConfigTool - Tool to configure the AlarmServer
  • AlarmServer - Background process that scans all configured EPICS PVs for their alarm states
  • ArchiveConfigTool - Tool to configure the ArchiveEngine
  • ArchiveEngine - Background process that collects samples from EPICS PVs and stores them in a RDB
  • css-panda - Graphical User interface including Databrowser to view archived data as strip chart, GUI for the alarm handler and operators interface (OPI) editor

AlarmConfigTool

Command-line tool for exporting alarm config as XML, or to import XML config into RDB.

Can be used to generate snapshots of the configuration.

To import 'foreign' formats like ALH, they can be converted into XML and then imported.

Note that this this tool only interact with the alarm configuration in the RDB. After changing the configuration one should either restart the alarm server and GUI clients, or send the 'CONFIG' update message via JMS to trigger them to re-load the configuration.

Basic Incantations

Note that alarm configurations are identified by their "Root" element.

To specify RDB URL/user/password, add the option
  -rdb_url jdbc:...             : RDB URL
  -rdb_user <user>              : RDB User
  -rdb_password <password>      : RDB Password
  -rdb_schema <schema>          : RDB schema (table prefix), ending in '.'

List Available Configurations

List all configurations, i.e. the names of all alarm tree 'root' elements currently found in the RDB:
  AlarmConfigTool -list

Import Configuration

To import an initial configuration, or to replace the current configuration with root element "Test" with an XML snapshot, run
  AlarmConfigTool -import -file /some/path/Test.xml -root Test
This deletes the configuration, then loads the file. The -modify option will instead try to update the existing configuration, i.e. load new components or PVs, or update the guidance etc. of existing entries.

This would import the demo.xml:
  AlarmConfigTool -import -file /some/path/demo.xml -root demo
Note that the name of the root element in the configuration file must match the name specified in the -root .... command-line argument. This is a basic consistency check to avoid importing the wrong configuration.

It is best to always specify the full path to the XML configuration file. When not using the full path, the tool will read or create files relative to its current working directory, which in turn will be the 'workspace' directory that depends on the operating system and can thus be somewhat unpredictable. Using the full, absolute path, there will be no surprises.

Export Configuration

To take an XML snapshot of the current configuration with root element "Test", run
  AlarmConfigTool -export -file /some/path/Test.xml -root Test
Again provide the full path to the XML file to assert that it is indeed created in the desired location.

Edit Configuration

Export, edit the file, import again.

Remove Configuration

Export, edit the file to remove all but the top-level "config" element, import again. This leaves the "root" element in the RDB. If desired, it needs to be removed manually via direct RDB SQL access like this:
  -- List all 'root' elements, note its NAME or COMPONENT_ID
  SELECT * FROM ALARM_TREE WHERE PARENT_CMPNT_ID is null;

  DELETE FROM ALARM_TREE WHERE NAME='that_name';

Copy Configuration

To create a new configuration "CopyOfTest", first export "Test", then edit the root "config" element in the configuration file to be "CopyOfTest", and finally import that edited file as "CopyOfTest".

The editing is required because the tool will only import configuration files into the root that matches the top level element in the file. This is a simple consistency check.

Configuration File Syntax

A minimal, empty configuration with the root element “demo” would look like this:
<config name="demo">
</config>
For a better overview in the alarm system user interface the monitored PVs can be arranged in components (groups).
    <component name="SomeGroup">
        <!-- List of PVs -->
    </component>
    <component name="AnotherGroup">
        <!-- List of PVs -->
    </component>
The alarm system will typically latch alarms. This means that the alarm trigger PV can return to OK, later re-enter the alarm state and so on, but the alarm system will only react when a PV enters an alarm state for the first time. Subsequently, the alarm system user interface will display the current state of the PV, but it will not trigger a new alarm nor issue another annunciation. This is meant to reduce noise from the alarm system.
With the latching statement in the config file this behaviour can be changed for each PV.
        <pv name="SomePVname">
            <description>PVdescription</description>
            <latching>true</latching>
            <annunciating>true</annunciating>
        </pv>
A complete configuration file is included in the package (css-panda/AlarmConfigTool/demo.xml)

AlarmServer

ArchiveConfigTool

Command-line tool for exporting archive config as XML, or to import XML config into RDB.

Can be used to generate snapshots of the configuration.

Basic Incantations

Note that archive configurations are identified by their "Engine".

To specify RDB URL/user/password, add the option
  -rdb_url jdbc:...             : RDB URL
  -rdb_user <user>              : RDB User
  -rdb_password <password>      : RDB Password
  -rdb_schema <schema>          : RDB schema (table prefix), ending in '.'

List Available Configurations

List all archive engines currently found in the RDB:
  ArchiveConfigTool -list

Import Configuration

To import an initial configuration, or to replace the current configuration of an engine, run
  ArchiveConfigTool -import -config /some/path/Test.xml -engine Test -description "Description of this engine" -host ... -port 4812 [-replace_engine]
The ArchiveEngine uses a web interface to display status information. The address is defined with the -host and -port arguments. Each channel can only be used in one engine. If setting up a second engine with channels that are already in another engine append the argument -steal_channels. This overwrites the engine settings for all channels in the imported configuration that are already in another engine.

It is best to always specify the full path to the XML configuration file. When not using the full path, the tool will read or create files relative to its current working directory, which in turn will be the 'workspace' directory that depends on the operating system and can thus be somewhat unpredictable. Using the full, absolute path, there will be no surprises.

Export Configuration

To take an XML snapshot of the current configuration of an engine run
  ArchiveConfigTool -export -config /some/path/Test.xml -engine Test
Again provide the full path to the XML file to assert that it is indeed created in the desired location.

Edit Configuration

Export, edit the file, import again using -replace_engine.

Remove Configuration

  ArchiveConfigTool -delete_config -engine Test
This deletes only the entry in the engine table. The channels and samples stay in the RDB. If desired, the channels and samples need to be removed manually via direct RDB SQL access.

ArchiveEngine

css-panda

-- FlorianFeldbauer - 25 Oct 2012
Edit | Attach | Print version | History: r11 | r4 < r3 < r2 < r1 | Backlinks | View wiki text | Edit WikiText | More topic actions...
Topic revision: r2 - 25 Oct 2012, FlorianFeldbauer
 
This site is powered by FoswikiCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding PANDA Wiki? Send feedback
Imprint (in German)
Privacy Policy (in German)