Design Note #117.0
Epicure Distributed Database System
Survey Converter Specification
When the Survey Converter application begins, it checks whether the user has provided the name of a single CLI file to be converted. If so, this file is opened for processing. Otherwise, the application must translate a series of logicals in order to obtain the names of the multiple CLI files which it must convert. The application translates each logical in turn, opens the specified file, and processes it. These steps are repeated until every user-defined logical has been translated.
Processing is identical for both single and multiple CLI files, since in both cases, only one file is handled at a time. Each CLI file contains keywords and qualifiers which represent the values of beamline device properties. The Survey Converter application contains routines which are associated with these keywords. When the CLI recognizes a keyword in the file, it calls the corresponding routine in the application. The routine extracts the values contained in the keywords and/or qualifiers and assigns them to a transaction buffer. When an "end-of-device" keyword is recognized, the values in the transaction buffer are committed to the central database. These operations continue until all of the information in the CLI file has been processed.
$ set def epicure_root:[work.ecdb.survey.converter]The only other step necessary is to set-up the project environment by typing:
$ @project_setupInstructions for using the Survey Converter follow.
A CLI file can include information about multiple devices. Information about each device must contain the following keywords: BEGIN_DEVICE, NAME (followed by the name of a device in the central database), and END_DEVICE. Unless these keywords appear in this order, no device information will be placed in the central database.
The keywords and qualifiers describing device properties must appear between the NAME and END_DEVICE keywords. Currently, only the location property has been defined for beamline devices. The location property for a device may be described by including the keyword LOCATION, followed by a hyphen, or continuation character, in the CLI file. The continuation character indicates that more information about a property is present in the CLI file -- it should be used whenever further qualifiers for a property exist. The qualifiers for the location property are XPOS (x-position), YPOS (y-position), ZPOS (z-position), LENGTH (z-length), PITCH (pitch angle from horizontal), YAW (yaw angle about vertical axis), ROLL (roll angle about beam axis), PREVIOUS (previous device), and NEXT (next device). Each qualifier should appear after the LOCATION keyword, and be preceded by a forward slash (/). If more qualifiers are present, a continuation character is necessary as well. Here is an example of a CLI device definition:
BEGIN_DEVICE NAME DEMO2 LOCATION- /XPOS=2.2- /YPOS=2.3- /ZPOS=2.4- /LENGTH=10.0- /PITCH=30.0- /YAW=45.62- /ROLL=50.23- /PREVIOUS=DEMO1- /NEXT=DEMO3 END_DEVICEOnce again, a CLI file can contain multiple device definitions of this type.
$ scvt filenameFor example, to use the application on a file named test.dat, enter:
$ scvt test.datThis command will place the information contained within test.dat in the central database as long as you have met the aforementioned conditions.
Note: If the CLI file is not on the same node and in the same directory as the Survey Converter, it will be necessary to specify the file's location when entering its name. For example, if test.dat were located on disney::sys$login, you would need to enter:
$ scvt disney::sys$login:test.dat
$ scvtThis will cause the Survey Converter to place the information within the CLI files in the central database.
For example, to convert three CLI files, test1.dat, test2.dat, and test3.dat, that are located on disney::sys$login, you would need to enter the following commands:
$ define RDCS$SCVT_FILE1 disney::sys$login:test1.dat $ define RDCS$SCVT_FILE2 disney::sys$login:test2.dat $ define RDCS$SCVT_FILE3 disney::sys$login:test3.dat $ scvtNote: Logicals may be defined on either the process or system tables.
Device demo4 is not in the database.The log file can also contain the names of previous and next devices which are not in the central database. For example, if demo4 were listed as a previous device, the log file would read:
Previous device demo4 is not in the database.and if demo4 were listed as a next device, the log file would read:
Next device demo4 is not in the database.
Keywords: Epicure, controls, RDCS, database, EDDS