LCLS Controls:  Database Standards

Developement Home
LCLS Home
What's New
Project Calendar
Email/Phone Numbers
Photo Archive
Organization
 Chart
LCLS Publications
Staff Pictures
LCLS WEB Help
LCLS WEB Cam
Search LCLS Web

EPICS Database

All EPICS database shall adhere to the following rules:

DB Creation Tool
  1. The EPICS Visual Database Configuration Tool (VDCT) will be used for complex databases.
  2. A complex database either has multiple records or requires explanatory text.
  3. Simple databases can be created via a text editor such as vi or emacs.
  4. The EPICS Record Reference Manual is a good reference in the creation of databases.
  5. The LCLS Record Naming Conventions will be used.
Substitution Files
  1. Substitution files will be used to generate databases where possible.
  2. A standard header shall be used at the top of all substitution files.
  3. Substitution files will be CVS'e, whereas the generated files will not.
  4. Naming conventions for substitutions will be:

  5. <>* The use of upper and lower case characters are:
    a) lower case characters shall be used for the location name
    b) lower case characters shall be used for the subsystem name
    c) the first character after the "_" should be lowercase
    d) the use of upper and lowercase characters within the filename shall
        follow what was used for source files.
    * location is chosen from the location list in the record naming convention
    * subsystem is chosen from the subsystem list in the record naming convention
Templates
  1. Templates will be used where possible and as a means to simplify databases
  2. A standard header shall be used at the top of all template files
  3. Templates will be CVS'ed
  4. Naming convention for templates will be:

* The use of upper and lower case characters are:
a) lower case characters shall be used for the location name
b) lower case characters shall be used for the subsystem name
c) the first character after the "_" should be lowercase
d) the use of upper and lowercase characters within the filename shall
    follow what was used for source files.
* location is chosen from the location list in the record naming convention
* subsystem is chosen from the subsystem list in the record naming convention

format)   <subsystem>_<location>_<description>.template
example) mgnt_li21_lgps.template
             mgnt_mcor.template

Databases
  1. A VDCT-created databases will fit on a standard window
  2. Databases will all have a title or a one line description at the top of the file
  3. All macros will be defined in the file
  4. All subroutine records will list a brief description of functionality and variables
  5. Databases will be CVS'ed
  6. Naming convention for db will be:

    * The  use of upper and lower case characters are:
         a) lower case characters shall be used for the location name
         b) lower case characters shall be used for the subsystem name
         c) the first character after the "_" should be lowercase
         d) the use of upper and lowercase characters within the filename shall follow
           what was used for source files.
    * location is choosen from the location list in the record naming convension
    * subsystem is chosen from the subsystem list in the record naming convension.

format)   <subsystem>_<filename>.db

example) mgnt_mcor.db
             mgnt_li21_mcor.db

Macros
  1. Macros for EPICS fields shall be the same as the field name when the field name is 4 chars or less.
     ex) DESC,INP,OUT
  2. The following standard list of macros shall be used:

PRIM - Primary name
LOCA - Location name
UNIT - Unit name
DEV - Device name (PRIM:LOCA:UNIT)
SECN - Secondary or attribute name
COMP - Component name
MD - Measurement Definition
LINK - Link
CARD - Card
SIG - Signal
PARM - Parameter
BIT, BYTE, WORD - Location of Data
ADDR - Address
PORT - Port

PV Reports
  1. A simple unix shell script will be used offline to generate PV reports templates.
  2. Scripts to generate reports shall be CVS'ed
SLC Database



 


Content Owner: Kristi Luchini
Page Editor: Kristi Luchini
Last edited: 25 July 2005