John L Anderson and Soon-Ok Park
Argonne National Laboratory
December 1998
Background
A database configuration tool (DCT313) for use on Unix-based machines using the Tcl/Tk language was released with EPICS 3.13 . In order to provide a database configuration tool which is independent of hardware type, JDCT was written in the Java language. Although JDCT looks and operates somewhat like DCT313, it includes several new features, such as, multiple record instance windows, "cut and paste" between windows, and improved user error handling. This code has been developed and tested on a Dell pentium PC / Windows95, but it is intended to run on Unix-based hardware.
DCT System Capabilities
- Create and/or update record instances in an EPICS database (.db) file.
- Copy, rename, and delete existing record instances.
Basic Principles
JDCT is designed to create and maintain EPICS record instance database (.db) files. In order for JDCT to execute properly, the user must provide a database definition (.dbd) file which cotains 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 JDCT. Once a database definition file has been specified, the user can create, copy, rename, delete, and save record instances using the various facilities available in JDCT. As JDCT executes, it attempts to trap and display the most common situations that might lead to diminishing the integrity of the user supplied information.
Running JDCT
- On any machine (Unix or PC), set CLASSPATH environment variable to include epics\extensions\javalib (PC notation shown).
- On a PC, set PATH environment variable to include
epics\base\bin\win32 and
epics\extensions\bin\win32
- On Unix, set LD_LIBRARY_PATH to include
epics/extensions/lib/$(HOST_ARCH)
- At the directory into which JDCT has been compiled, enter the command
java jdct.Jdct filename1 filename2
where: filename1 is the name of a .dbd file (first)
filename2 is the name of a .db file (second) .
Note: if you prefer, filename1 and filename2 can be omitted from the command line, and later , when the application actually comes up, you must "Open" a .dbd file and a .db file (in that order).
- If you have specified a .dbd file on the command line, the main application window will display a list of available record types (on the left hand side). If the "record type" area is blank, you must now do a "File / Open" and specify a .dbd file.
- If you did not specify a .db file on the command line, it is now time to do a "File / Open" and specify a .db file.
- Now that the .dbd and .db files have been opened, click on "all types" and then click on "get instances". This sequence of commands should now display the record instance names from your .db file in the right side of the main application widow under the label "Records".
- Click on a record instance name (in the "Records" list), and this will cause all the fields of the selected record instance to be displayed in the window labelled "Window No. 0". You are then able to review and/or modify any field in the selected record. Any changes you make to a field are not permanently saved to the .db file until you do a "File / Save" or "File / Save as" operation.
- If you do a "File / Clear" operation, both the .dbd and .db files are closed (without saving any changes you have made), and it will be necessary to do a "File / Open" on a .dbd file and then on a .db file (in that order) before you can continue with the JDCT session. If you do a "File/Clear db" operation, only the .db database file will be closed (without saving any changes you have made).
- To open an additional window, click on the "New Window" button on the right bottom edge of the main JDCT window. This will cause an additional record instance window to be displayed, and it will contain the message "No instance loaded", which means you should click on a new record name up in the "Records" list in order to have fields displayed in the new window.
- To save the changes you have made to various fields, do a "File / Save or Save as".
- To terminate JDCT , do a "File / Quit" .
The File Menu
Use the left mouse button to select one of the following options:
Open - provides a file selection window which will allow the user to open an existing database definition (.dbd) file and/or a record instance (.db) file.
Save or Save as - save the currently active record instances as a database (.db) file.
Clear - close the currently active record instance (.db) and database defintion (.dbd) files, without saving any of your most changes.
Clear db - close the currently active record instance (.db) file only, without saving any of your most recent changes.
Quit - to terminate the current JDCT session.
The Record Menu
Use the left mouse button to select one of the following options:
Create - create an entirely new record instance.
Delete - delete an existing 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.
General Comments and Miscellaneous Information
- The name of the most recently opened record instance database file is displayed on the main JDCT 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 . If an error condition 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.
- The user can provide "link" type 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 the link entry form, pressing the "PV link" button will convert a "constant" link to a "PV" type link, and conversely, pressing the "constant" button will convert a "PV" link to a "constant" type 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 al the available choices for the field in questio. 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.
Some additional features (that will be addressed in the future) :
- Add a report listing all links
- Add a report listing "unresolved" links.
Last update: 12/98