Programmer's Notes

Table of Contents

Overview

CS-Studio CE up to version 4.1.2 had an EPICS preference page, where all the properties were available to be edited.

EPICS preferences.

Then it was substituted by configuration files, allowing for more flexible extensions.

DIIRT preferences.

Most users were unhappy of the last change, because unaware of structure of the configuration directory and the content of the XML configuration files. For this reason a new solution was adopted, creating new preference pages to allow direct manipulation of the settings, backed upon the XML configuration files.

DIIRT preferences. DIIRT preferences.

Configuration Directory

The configuration directory must point to a folder containing a specific structure of sub-folders:

The datasources/datasources.xml file contains the default data source to be used when no explicit one is indicated into a PV address, and the default separator to be used.

The datasources/ca/ca.xml file specifies the parameters for the Channel Access data source.

Data Source Management

The new data source management merges at startup the XML configuration files with the user's preferences in CS-Studio, creating a temporary configuration set used to initialize the DIIRT communication library.

Preference panels in CS-Studio will show the content of the temporary configuration set, and save it as CS-Studio preferences.

Data Source management.

Accessing Preferences

To access the preferences from code the following must be done:

Extending Data Sources

Adding a new sub-page inside the Data Sources preference page is straightforward copying the/being inspired by the classes inside the projects/packages cited in the following list.