Database Configuration Tool (DCT) - Tcl/Tk Version for EPICS 3.13





John L. Anderson
Argonne National Laboratory
October 1996



NOTE: The name of the new database configuration tool that has been installed with EPICS Release 3.13 is "dct313". To run this product, type in dct313. For additional details see: Running DCT .




General Background

Historically there have been several different tools provided to allow the EPICS user to build IOC databases. The Database Configuration Tool (DCT) was initially developed by Bob Dalesio of LANL and then extensively modified by Frank Lenkszus of ANL/APS. Then came the Graphical Database Configuration Tool (GDCT) by Jim Kowalkowski of ANL/APS which allowed the user to build a database and graphically display the links between records and process variables. In addition to the tools developed and distributed by ANL, CAPFAST and other commercially available systems are also used to create and maintain IOC databases.

Due to some basic system design changes involved with the latest release of EPICS, it became necessary to develop a replacement for the original DCT product. The new database configuration tool is written in Tcl/Tk and C, and it is strictly a data entry type product for building EPICS IOC record instance database (.db) files which are compatible with the latest EPICS release (3.13).



DCT System Capabilities

* Create and/or update record instances in a database (.db) file.
* Copy, rename, and delete existing record instances.
* Create a list of unresolved links in the active .db file.
* Create a list of all links in the active .db file.



Basic Principles

DCT is designed to create and maintain EPICS record instance database (.db) files. In order for DCT to execute properly, the user must provide a database definition (.dbd) file which contains the specifications for the various record and device types that they intend to reference in any record instance database (.db) file to be created by DCT. Once a database definition (.dbd) file has been specified, the user can create, copy, rename, and delete record instances using the various facilities provided on the DCT windows.

As the user interacts with the various DCT windows, selections, and data entry fields, the results of these interactions are displayed on the screen. Revisions and data entry updates of record instance data displayed on the screen do not replace previously stored record instance data until the user selects a "save" in the file menu choices. As DCT executes, it attempts to trap and display the most common situations that might lead to diminishing the integrity of the user supplied information.


Running DCT

In order to execute DCT, the user must enter the following command from an application directory:

dct313 fn1 fn2

where,

fn1
specifies the fully qualified file name for a database definition (.dbd) file.
This field is optional, however, if a value for fn2 is to be supplied, then fn1 must be specified first.
fn2
specifies the fully qualified file name for a record instance database (.db) file.
This field is optional.

Executing the dct313 command will cause the main DCT window to be generated. The main window contains a menu bar with file, edit , and view operations. If the fn1 parameter is not specified on the dct313 command line, then it will be necessary to go to the file menu and click on "open" in order to select a database definition (.dbd) file before attempting to "open" a record instance database (.db) file.



The File Menu

Use the left mouse button to select one of the following options:

Clear - close the currently active record instance database (.db) file and database definition (.dbd) file, and provide a file selection window which will allow the user to specify a new database definition (.dbd) file.

New - close the currently active record instance database (.db) file (if there is one), and allow the user to create a new record instance database (.db) file.

Open - close the currently active record instance database (.db) file (if there is one), and provide a file selection window which will allow the user to open a new existing record instance database (.db) file or database definition (.dbd) file.

Append - provide a file selection window which will allow the user to specify a new existing record instance database (.db) file which will be added (appended) to the existing active database (.db) files.

Save - save the most recently editted record instances as a database (.db) file.

Print - not implemented yet.

Quit - to terminate the current DCT session.



The Edit Menu

Use the left mouse button to select one of the following options:

Create - create a new record instance.

Copy - make an exact copy of an existing record instance and give it a new record name.

Rename - change the name of an existing record instance.

Delete - delete an existing record instance.

Sort - sort the record instances by record name or record type.
This option is not yet available.

Prefix - This option is not yet available.



The View Menu

Use the left mouse button to select one of the the following options:

Unresolved links - generate a list of unresolved links associated with the record instances of the active database (.db) file

All link references - generate a list by record instance of all links in the active database (.db) file.

Database consistency check - This option has not yet been implemented.

Link tree for a record - This option has not yet been implemented.

Record description - This option has not yet been implemented.

Field description - This option has not yet been implemented.



General Comments and Miscellaneous Information

* The most recently opened record instance database (.db) file is named at the bottom of the main DCT window.

* Data entered on the user input areas ("white" areas) of the active record field display will be verified for "general correctness" when the user presses a "Return" or a "Tab" key or moves the mouse cursor out of the currently active field. If an error is detected, the nature of the infraction will appear as a warning message with an "OK" button. The user is expected to correct the data entry problem in the current field before going on to a new field.

* If the user has entered new data for any field of a given record X, they should click on the "Save field values" button before selecting a new record Y to prevent the loss of their new data in record X.

* The user can provide "link" data by typing in the "white" input area of a given link field or by clicking on the "Form" button which will bring up an entry form that can be used to supply all the required link information.

* On a "link" field, the "to PV" button means that the link data is currently a "constant" link, and pressing the "to PV" button will cause the link to be converted to a "PV" link.

* On a "link" field, the "to constant" button means that the link data is currently a "PV" link, and pressing the "to costant" button will cause the link to be converted to a "constant" link.

* The fields classified as "MENU" contain a pull-down choice menu. Just click on the current value and hold down the left mouse button to see all the available choices for the field in question. Then move the mouse cursor to the appropriate selection and release the mouse button. The newly selected value will appear as the current value for the given field.