All EPICS database shall adhere to the following rules:
DB Creation Tool
- The
EPICS Visual Database Configuration Tool (VDCT) will be used for
complex databases.
- A complex database either has multiple records
or requires explanatory text.
- Simple databases can be created via a text
editor such as vi or emacs.
- The EPICS
Record Reference Manual is a good reference in the creation of
databases.
- The LCLS Record
Naming
Conventions
will be used.
Substitution Files
- Substitution files will be used to generate
databases where possible.
- A standard
header shall be used at
the top of all substitution files.
- Substitution files will be CVS'e, whereas the
generated files will not.
- Naming conventions for substitutions 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
>
Templates
- Templates will be used where possible and as a
means to simplify databases
- A standard
header shall be used at
the top of all template files
- Templates will be CVS'ed
- 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
- A VDCT-created databases will fit on a standard
window
- Databases will all have a title or a one line
description at the top of
the file
- All macros will be defined in the file
- All subroutine records will list a brief
description of functionality
and variables
- Databases will be CVS'ed
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
- 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
- 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
- A simple unix shell script will be used
offline to generate PV reports templates.
- Scripts to generate reports shall be CVS'ed
|