Difference between revisions of "RRM 3-14 Menu Choices"

From EPICSWIKI
m (→‎menuAlarmStat: fixed NO_ALARM string.)
(Removed Ben's deprecation of record-specific menu definitions.)
 
(4 intermediate revisions by 3 users not shown)
Line 4: Line 4:
= Menu Choices =
= Menu Choices =


== GBLCHOICE and RECCHOICE Fields ==
== Menu Fields ==


Some of the fields in EPICS records are of type GBLCHOICE or RECCHOICE, meaning that the value of the field must be one from a menu of specific choices. There are several different menus available and each GBLCHOICE or RECCHOICE field uses one. For instance, the simplest menu is called <CODE>menuYesNo</CODE> and has two possible choices, NO and YES; no other values for a field that uses <CODE>menuYesNo</CODE> are possible--0.5, MAYBE, and NO WAY are not possible choices for the field. In addition, when a menu field is configured to have a certain value, its value string must match exactly one of the possible choices in its menu, including its case. For instance, if a field's type is GBLCHOICE and its menu is <CODE>menuYesNo</CODE>, the choices <CODE>yes</CODE>, <CODE>No</CODE>, and <CODE>Yes</CODE> are not valid choices: they don't match the case of NO or YES.
Some of the fields in EPICS records are of type menuXXX, meaning that the value of the field must be one from a menu of specific choices. There are several different menus available and each menu field uses one. Note that the value given to the record field must be the 'Choice Name' in the tables below, not the 'C Identifier'. The latter is used internally to refer to a choice from C code.
 
For instance, the simplest menu is called <CODE>menuYesNo</CODE> and has two possible choices, "NO" and "YES"; no other values for a field that uses <CODE>menuYesNo</CODE> are possible; e.g. "0.5", "MAYBE", and "NO WAY" are not possible choices for the field. In addition, when a menu field is configured to have a certain value, its value string must match exactly one of the possible choices in its menu, including its case. For instance, if a field's menu is <CODE>menuYesNo</CODE>, the choices "yes", "No", and "Yes" are not valid choices: they don't match the case of "NO" or "YES".


There are several menus provided as part of the standard EPICS release. Here are their names:
There are several menus provided as part of the standard EPICS release. Here are their names:
Line 13: Line 15:
* selSELM
* selSELM
* menuYesNo
* menuYesNo
* menuSimm
* menuScan
* menuScan
* menuPriority
* menuPriority
* menuOmsl
* menuOmsl
* menuLinr
* menuIvoa
* menuIvoa
* menuFtype
* menuFtype
* menuConvert
* menuConvert
* menuCompress
* menuCompress
* menuArrType
* menuAlarmStat
* menuAlarmStat
* menuAlarmSevr
* menuAlarmSevr
Line 28: Line 29:
* aoOIF
* aoOIF


A few of these menus are record-specific. For example, <CODE>aoOIF</CODE> is used solely by the OIF field in the analog output record. Any field using one of these menus will be of type RECCHOICE. Most of the above menus, however, are used by many different fields in different records. These are of type GBLCHOICE. For example, the <CODE>menuAlarmSevr</CODE> menu is used by the LLSV field in the analog input record as well as the COSV field in the binary input record, among others.
A few of these menus are record-specific. For example, <CODE>aoOIF</CODE> is used solely by the OIF field in the analog output record. Most of the above menus, however, are used by many different fields in different records. For example, the <CODE>menuAlarmSevr</CODE> menu is used by the LLSV field in the analog input record as well as the COSV field in the binary input record, among others.


The above menus and their choices are provided as part of the standard EPICS release; however, developers can add to, delete, or change the choices of each, as well as add new menu types. (See the ''Application Developer's Guide'' for R3.13 for more information on how to add and change existing menus). Thus, the database designer should know that the available menus and their choices may vary from site to site. The designer must be familiar with the menu and menu choices for any fields he/she is configuring. This isn't a problem for most database designers because such tools as VDCT, GDCT, and Capfast allow the designer configuring the database to choose from the specified choices. Nonetheless, there are ways a designer can figure out the available choices for a particular menu and thus for a particular field without using a database configuration tool.
The above menus and their choices are provided as part of the standard EPICS release; however, developers can add to, delete, or change the choices of each, as well as add new menu types. (See the ''Application Developer's Guide'' for your release for more information on how to add and change existing menus). Thus, the database designer should know that the available menus and their choices may vary from site to site. The designer must be familiar with the menu and menu choices for any fields he/she is configuring. This isn't a problem for most database designers because such tools as VDCT, GDCT, and Capfast allow the designer configuring the database to choose from the specified choices. Nonetheless, there are ways a designer can figure out the available choices for a particular menu and thus for a particular field without using a database configuration tool.


=== Determining the Choices of a GBLCHOICE or RECCHOICE Field ===
=== Determining the Choices of a Menu Field ===


==== Using dbst ====
==== Peeking at the Database Definition Files ====
 
<CODE>dbst</CODE> is a utility that allows a user to run checks on a static database, a database that is not loaded and running. For instance, <CODE>dbst</CODE> can be used to make sure that all the field values in the database are valid. In addition, <CODE>dbst</CODE> can be used to view the definitions of record types, fields, and menus. To view the definition of a record, a field, or a menu, one doesn't need an actual database that has any record instances.
 
To view menu definitions, create a text file with the following lines:
 
path &quot;/EPICSR3.14.0/base/dbd&quot;
include &quot;menuGlobal.dbd&quot;
include &quot;dbCommonRecord.dbd&quot;
include &quot;base.dbd&quot;
 
Specify the <CODE>.db</CODE> file you created on the command line when you start <CODE>dbst</CODE>. <CODE>dbst</CODE> is located in the extensions part of the EPICS tree for Release 3.14. For instance, if <CODE>$EPICS</CODE> points to the top level of the EPICS tree and your architecture is <CODE>sun4</CODE>, the following command would set your path so that you can run <CODE>dbst</CODE>:
 
set path = ($EPICS/extensions/bin/sun4 $path)
dbst mydbfile.db -i
-df,ao,OIF
recordtype(ao)
  OIF
  prompt: Out Full/Incremental
  extra: (null)
  indRecordType: 49
  special: 0
  field_type: DBF_MENU
  process_passive: 0
  base: 0
  promptgroup: GUI_OUTPUT
  interest: 1
  as_level: 1
  initial: (null)
  menu: aoOIF
  size: 0
  offset: 0
-wm,aoOIF
menu(aoOIF) {
    choice(aoOIF_Full,&quot;Full&quot;)
    choice(aoOIF_Incremental,&quot;Incremental&quot;)
}


==== Peeking at the Database Definition Files ====
The definition for a particular menu can be found by looking at the database definition or <CODE>.dbd</CODE> file for that menu. For instance, the <CODE>menuAlarmSevr.dbd</CODE> file contains the definition for the <CODE>menuAlarmSevr</CODE> menu. You can see which menu a field uses by looking at the <CODE>dbCommonRecord.dbd</CODE> file if the field is common to all record types or by looking at the file that defines that record type if the field is not common to all record types. For example, to see which menu the OIF field uses, one would have to look in the <CODE>aoRecord.dbd</CODE> file which contains the definition for the analog output record, because OIF is particular to the analog output record and is not common to all other record types.


The definition for a particular menu can also be seen simply by looking at the database definition or <CODE>.dbd</CODE> file for that menu. For instance, the <CODE>menuAlarmSevr.dbd</CODE> file contains the definition for the <CODE>menuAlarmSevr</CODE> menu. In addition, you can see which menu a GBLCHOICE field uses by looking at the <CODE>dbCommonRecord.dbd</CODE> file if the field is common to all record types or by looking at the file that defines that record type if the field is not command to all record types. For example, to see which menu the OIF field uses, one would have to look in the <CODE>aoRecord.dbd</CODE> file which contains the definition for the analog output record, because OIF is particular to the analog output record and is not common to all other record types. RECCHOICE menus are defined in the definition file for the record type in which they are used, usually at the beginning. For example, the field OIF is of type RECCHOICE and uses the <CODE>aoOIF</CODE> menu which is defined at the beginning of <CODE>aoRecord.dbd</CODE>.
Several record types define menus inside the record type definition file instead of in a separate <CODE>menuXXX.dbd</CODE> file. For example, the field OIF of the ao record type uses the <CODE>aoOIF</CODE> menu which is defined at the beginning of <CODE>aoRecord.dbd</CODE>. Such menus should normally have a name that starts with the name of the record type and is followed by the field name for which they are defined, to avoid naming collisions.


=== Standard Menu Definitions ===
=== Standard Menu Definitions ===


Here are the definitions for the menus available as part of the standard EPICS release. The designer should know that the definitions of these menus may be different at his/her site and these are provided merely as a convenience. It's recommended that you use the <CODE>dbst</CODE> utility to view menu choices. Remember that the actual choices appear in quotes.
Here are the definitions for the menus available as part of the standard EPICS release. The designer should know that the definitions of these menus may be different at his/her site and these are provided merely as a convenience. The actual choice strings appear in quotes.


==== seqSELM ====
==== seqSELM ====


  choice(seqSELM_All,&quot;All&quot;)
<TABLE BORDER="1"><TH>C Identifier<TH>Choice Name<TR>
  choice(seqSELM_Specified,&quot;Specified&quot;)
  <TD>seqSELM_All<TD>"All"<TR>
  choice(seqSELM_Mask,&quot;Mask&quot;)
  <TD>seqSELM_Specified<TD>"Specified"<TR>
  <TD>seqSELM_Mask<TD>"Mask"<TR>
</TABLE>


==== selSELM ====
==== selSELM ====


  choice(selSELM_Specified,&quot;Specified&quot;)
<TABLE BORDER="1"><TH>C Identifier<TH>Choice Name<TR>
  choice(selSELM_High_Signal,&quot;High Signal&quot;)
  <TD>selSELM_Specified<TD>"Specified"<TR>
  choice(selSELM_Low_Signal,&quot;Low Signal&quot;)
  <TD>selSELM_High_Signal<TD>"High Signal"<TR>
  choice(selSELM_Median_Signal,&quot;Median Signal&quot;)
  <TD>selSELM_Low_Signal<TD>"Low Signal"<TR>
  <TD>selSELM_Median_Signal<TD>"Median Signal"<TR>
</TABLE>


==== menuYesNo ====
==== menuYesNo ====


  choice(menuYesNoNO,&quot;NO&quot;)
<TABLE BORDER="1"><TH>C Identifier<TH>Choice Name<TR>
  choice(menuYesNoYES,&quot;YES&quot;)
  <TD>menuYesNoNO<TD>"NO"<TR>
  <TD>menuYesNoYES<TD>"YES"<TR>
</TABLE>
 
==== menuSimm ====
 
<TABLE BORDER="1"><TH>C Identifier<TH>Choice Name<TR>
<TD>menuSimmNO<TD>"NO"<TR>
<TD>menuSimmYES<TD>"YES"<TR>
<TD>menuSimmRAW<TD>"RAW"<TR>
</TABLE>


==== menuScan ====
==== menuScan ====


  choice(menuScanPassive,&quot;Passive&quot;)
<TABLE BORDER="1"><TH>C Identifier<TH>Choice Name<TR>
  choice(menuScanEvent,&quot;Event&quot;)
  <TD>menuScanPassive<TD>"Passive"<TR>
  choice(menuScanI_O_Intr,&quot;I/O Intr&quot;)
  <TD>menuScanEvent<TD>"Event"<TR>
  choice(menuScan10_second,&quot;10 second&quot;)
  <TD>menuScanI_O_Intr<TD>"I/O Intr"<TR>
  choice(menuScan5_second,&quot;5 second&quot;)
  <TD>menuScan10_second<TD>"10 second"<TR>
  choice(menuScan2_second,&quot;2 second&quot;)
  <TD>menuScan5_second<TD>"5 second"<TR>
  choice(menuScan1_second,&quot;1 second&quot;)
  <TD>menuScan2_second<TD>"2 second"<TR>
  choice(menuScan_5_second,&quot;.5 second&quot;)
  <TD>menuScan1_second<TD>"1 second"<TR>
  choice(menuScan_2_second,&quot;.2 second&quot;)
  <TD>menuScan_5_second<TD>".5 second"<TR>
  choice(menuScan_1_second,&quot;.1 second&quot;)
  <TD>menuScan_2_second<TD>".2 second"<TR>
  <TD>menuScan_1_second<TD>".1 second"<TR>
</TABLE>


==== menuPriority ====
==== menuPriority ====


  choice(menuPriorityLOW,&quot;LOW&quot;)
<TABLE BORDER="1"><TH>C Identifier<TH>Choice Name<TR>
  choice(menuPriorityMEDIUM,&quot;MEDIUM&quot;)
  <TD>menuPriorityLOW<TD>"LOW"<TR>
  choice(menuPriorityHIGH,&quot;HIGH&quot;)
  <TD>menuPriorityMEDIUM<TD>"MEDIUM"<TR>
  <TD>menuPriorityHIGH<TD>"HIGH"<TR>
</TABLE>


==== menuOmsl ====
==== menuOmsl ====


  choice(menuOmslsupervisory,&quot;supervisory&quot;)
<TABLE BORDER="1"><TH>C Identifier<TH>Choice Name<TR>
  choice(menuOmslclosed_loop,&quot;closed_loop&quot;)
  <TD>menuOmslsupervisory<TD>"supervisory"<TR>
 
  <TD>menuOmslclosed_loop<TD>"closed_loop"<TR>
==== menuLinr ====
</TABLE>
 
choice(menuLinrNO_CONVERSION,&quot;NO CONVERSION&quot;)
choice(menuLinrLINEAR,&quot;LINEAR&quot;)


==== menuIvoa ====
==== menuIvoa ====


  choice(menuIvoaContinue_normally,&quot;Continue normally&quot;)
<TABLE BORDER="1"><TH>C Identifier<TH>Choice Name<TR>
  choice(menuIvoaDon_t_drive_outputs,&quot;Don't drive outputs&quot;)
  <TD>menuIvoaContinue_normally<TD>"Continue normally"<TR>
  choice(menuIvoaSet_output_to_IVOV,&quot;Set output to IVOV&quot;)
  <TD>menuIvoaDon_t_drive_outputs<TD>"Don't drive outputs"<TR>
  <TD>menuIvoaSet_output_to_IVOV<TD>"Set output to IVOV"<TR>
</TABLE>


==== menuFtype ====
==== menuFtype ====


  choice(menuFtypeSTRING,&quot;STRING&quot;)
<TABLE BORDER="1"><TH>C Identifier<TH>Choice Name<TR>
  choice(menuFtypeCHAR,&quot;CHAR&quot;)
  <TD>menuFtypeSTRING<TD>"STRING"<TR>
  choice(menuFtypeUCHAR,&quot;UCHAR&quot;)
  <TD>menuFtypeCHAR<TD>"CHAR"<TR>
  choice(menuFtypeSHORT,&quot;SHORT&quot;)
  <TD>menuFtypeUCHAR<TD>"UCHAR"<TR>
  choice(menuFtypeUSHORT,&quot;USHORT&quot;)
  <TD>menuFtypeSHORT<TD>"SHORT"<TR>
  choice(menuFtypeLONG,&quot;LONG&quot;)
  <TD>menuFtypeUSHORT<TD>"USHORT"<TR>
  choice(menuFtypeULONG,&quot;ULONG&quot;)
  <TD>menuFtypeLONG<TD>"LONG"<TR>
  choice(menuFtypeFLOAT,&quot;FLOAT&quot;)
  <TD>menuFtypeULONG<TD>"ULONG"<TR>
  choice(menuFtypeDOUBLE,&quot;DOUBLE&quot;)
  <TD>menuFtypeFLOAT<TD>"FLOAT"<TR>
  choice(menuFtypeENUM,&quot;ENUM&quot;)
  <TD>menuFtypeDOUBLE<TD>"DOUBLE"<TR>
  <TD>menuFtypeENUM<TD>"ENUM"<TR>
</TABLE>


==== menuConvert ====
==== menuConvert ====


choice(menuConvertNO_CONVERSION,&quot;NO CONVERSION&quot;)
Note that menuConvert is special in that applications are expected to change it. The application must however never change the number and order of the first three choices ("NO CONVERSION","SLOPE","LINEAR"). Any choices beyond "LINEAR" are interpreted as names of breakpoint tables. EPICS comes with a default set of breakpoint tables for converting temperature units, see the table below.
choice(menuConvertLINEAR,&quot;LINEAR&quot;)
choice(menuConverttypeKdegF,&quot;typeKdegF&quot;)
choice(menuConverttypeKdegC,&quot;typeKdegC&quot;)
choice(menuConverttypeJdegF,&quot;typeJdegF&quot;)
choice(menuConverttypeJdegC,&quot;typeJdegC&quot;)
choice(menuConverttypeEdegF,&quot;typeEdegF(ixe only)&quot;)
choice(menuConverttypeEdegC,&quot;typeEdegC(ixe only)&quot;)
choice(menuConverttypeTdegF,&quot;typeTdegF&quot;)
choice(menuConverttypeTdegC,&quot;typeTdegC&quot;)
choice(menuConverttypeRdegF,&quot;typeRdegF&quot;)
choice(menuConverttypeRdegC,&quot;typeRdegC&quot;)
choice(menuConverttypeSdegF,&quot;typeSdegF&quot;)
choice(menuConverttypeSdegC,&quot;typeSdegC&quot;)


==== menuCompress ====


  choice(menuCompressN_to_1_First_Value,&quot;N to 1 First Value&quot;)
<TABLE BORDER="1"><TH>C Identifier<TH>Choice Name<TR>
  choice(menuCompressN_to_1_Low_Value,&quot;N to 1 Low Value&quot;)
  <TD>menuConvertNO_CONVERSION<TD>"NO CONVERSION"<TR>
  choice(menuCompressN_to_1_High_Value,&quot;N to 1 High Value&quot;)
<TD>menuConvertSLOPE<TD>"SLOPE"<TR>
  choice(menuCompressN_to_1_Average,&quot;N to 1 Average&quot;)
<TD>menuConvertLINEAR<TD>"LINEAR"<TR>
<TD>menuConverttypeKdegF<TD>"typeKdegF"<TR>
<TD>menuConverttypeKdegC<TD>"typeKdegC"<TR>
<TD>menuConverttypeJdegF<TD>"typeJdegF"<TR>
<TD>menuConverttypeJdegC<TD>"typeJdegC"<TR>
<TD>menuConverttypeEdegF<TD>"typeEdegF(ixe only)"<TR>
  <TD>menuConverttypeEdegC<TD>"typeEdegC(ixe only)"<TR>
<TD>menuConverttypeTdegF<TD>"typeTdegF"<TR>
<TD>menuConverttypeTdegC<TD>"typeTdegC"<TR>
<TD>menuConverttypeRdegF<TD>"typeRdegF"<TR>
<TD>menuConverttypeRdegC<TD>"typeRdegC"<TR>
  <TD>menuConverttypeSdegF<TD>"typeSdegF"<TR>
  <TD>menuConverttypeSdegC<TD>"typeSdegC"<TR>
</TABLE>


==== menuArrType ====
==== menuCompress ====


  choice(menuArrType8_bit_integers,&quot;8 bit integers&quot;)
<TABLE BORDER="1"><TH>C Identifier<TH>Choice Name<TR>
  choice(menuArrType16_bit_integers,&quot;16 bit integers&quot;)
  <TD>menuCompressN_to_1_First_Value<TD>"N to 1 First Value"<TR>
  choice(menuArrType32_bit_integers,&quot;32 bit integers&quot;)
  <TD>menuCompressN_to_1_Low_Value<TD>"N to 1 Low Value"<TR>
  choice(menuArrTypeIEEE_floating_point,&quot;IEEE floating point&quot;)
  <TD>menuCompressN_to_1_High_Value<TD>"N to 1 High Value"<TR>
  <TD>menuCompressN_to_1_Average<TD>"N to 1 Average"<TR>
</TABLE>


==== menuAlarmStat ====
==== menuAlarmStat ====


  choice(menuAlarmStat,&quot;NO_ALARM&quot;)
<TABLE BORDER="1"><TH>C Identifier<TH>Choice Name<TR>
  choice(menuAlarmStatREAD,&quot;READ&quot;)
  <TD>menuAlarmStat<TD>"NO_ALARM"<TR>
  choice(menuAlarmStatWRITE,&quot;WRITE&quot;)
  <TD>menuAlarmStatREAD<TD>"READ"<TR>
  choice(menuAlarmStatHIHI,&quot;HIHI&quot;)
  <TD>menuAlarmStatWRITE<TD>"WRITE"<TR>
  choice(menuAlarmStatHIGH,&quot;HIGH&quot;)
  <TD>menuAlarmStatHIHI<TD>"HIHI"<TR>
  choice(menuAlarmStatLOLO,&quot;LOLO&quot;)
  <TD>menuAlarmStatHIGH<TD>"HIGH"<TR>
  choice(menuAlarmStatLOW,&quot;LOW&quot;)
  <TD>menuAlarmStatLOLO<TD>"LOLO"<TR>
  choice(menuAlarmStatSTATE,&quot;STATE&quot;)
  <TD>menuAlarmStatLOW<TD>"LOW"<TR>
  choice(menuAlarmStatCOS,&quot;COS&quot;)
  <TD>menuAlarmStatSTATE<TD>"STATE"<TR>
  choice(menuAlarmStatCOMM,&quot;COMM&quot;)
  <TD>menuAlarmStatCOS<TD>"COS"<TR>
  choice(menuAlarmStatTIMEOUT,&quot;TIMEOUT&quot;)
  <TD>menuAlarmStatCOMM<TD>"COMM"<TR>
  choice(menuAlarmStatHWLIMIT,&quot;HWLIMIT&quot;)
  <TD>menuAlarmStatTIMEOUT<TD>"TIMEOUT"<TR>
  choice(menuAlarmStatCALC,&quot;CALC&quot;)
  <TD>menuAlarmStatHWLIMIT<TD>"HWLIMIT"<TR>
  choice(menuAlarmStatSCAN,&quot;SCAN&quot;)
  <TD>menuAlarmStatCALC<TD>"CALC"<TR>
  choice(menuAlarmStatLINK,&quot;LINK&quot;)
  <TD>menuAlarmStatSCAN<TD>"SCAN"<TR>
  choice(menuAlarmStatSOFT,&quot;SOFT&quot;)
  <TD>menuAlarmStatLINK<TD>"LINK"<TR>
  choice(menuAlarmStatBAD_SUB,&quot;BAD_SUB&quot;)
  <TD>menuAlarmStatSOFT<TD>"SOFT"<TR>
  choice(menuAlarmStatUDF,&quot;UDF&quot;)
  <TD>menuAlarmStatBAD_SUB<TD>"BAD_SUB"<TR>
  choice(menuAlarmStatDISABLE,&quot;DISABLE&quot;)
  <TD>menuAlarmStatUDF<TD>"UDF"<TR>
  choice(menuAlarmStatSIMM,&quot;SIMM&quot;)
  <TD>menuAlarmStatDISABLE<TD>"DISABLE"<TR>
  choice(menuAlarmStatREAD_ACCESS,&quot;READ_ACCESS&quot;)
  <TD>menuAlarmStatSIMM<TD>"SIMM"<TR>
  choice(menuAlarmStatWRITE_ACCESS,&quot;WRITE_ACCESS&quot;)
  <TD>menuAlarmStatREAD_ACCESS<TD>"READ_ACCESS"<TR>
  <TD>menuAlarmStatWRITE_ACCESS<TD>"WRITE_ACCESS"<TR>
</TABLE>


==== menuAlarmSevr ====
==== menuAlarmSevr ====


  choice(menuAlarmSevrNO_ALARM,&quot;NO_ALARM&quot;)
<TABLE BORDER="1"><TH>C Identifier<TH>Choice Name<TR>
  choice(menuAlarmSevrMINOR,&quot;MINOR&quot;)
  <TD>menuAlarmSevrNO_ALARM<TD>"NO_ALARM"<TR>
  choice(menuAlarmSevrMAJOR,&quot;MAJOR&quot;)
  <TD>menuAlarmSevrMINOR<TD>"MINOR"<TR>
  choice(menuAlarmSevrINVALID,&quot;INVALID&quot;)
  <TD>menuAlarmSevrMAJOR<TD>"MAJOR"<TR>
  <TD>menuAlarmSevrINVALID<TD>"INVALID"<TR>
</TABLE>


==== fanoutSELM ====
==== fanoutSELM ====


  choice(fanoutSELM_All,&quot;All&quot;)
<TABLE BORDER="1"><TH>C Identifier<TH>Choice Name<TR>
  choice(fanoutSELM_Specified,&quot;Specified&quot;)
  <TD>fanoutSELM_All<TD>"All"<TR>
  choice(fanoutSELM_Mask,&quot;Mask&quot;)
  <TD>fanoutSELM_Specified<TD>"Specified"<TR>
  <TD>fanoutSELM_Mask<TD>"Mask"<TR>
</TABLE>


==== compressALG ====
==== compressALG ====


  choice(compressALG_N_to_1_Low_Value,&quot;N to 1 Low Value&quot;)
<TABLE BORDER="1"><TH>C Identifier<TH>Choice Name<TR>
  choice(compressALG_N_to_1_High_Value,&quot;N to 1 High Value&quot;)
  <TD>compressALG_N_to_1_Low_Value<TD>"N to 1 Low Value"<TR>
  choice(compressALG_N_to_1_Average,&quot;N to 1 Average&quot;)
  <TD>compressALG_N_to_1_High_Value<TD>"N to 1 High Value"<TR>
  choice(compressALG_Average,&quot;Average&quot;)
  <TD>compressALG_N_to_1_Average<TD>"N to 1 Average"<TR>
  choice(compressALG_Circular_Buffer,&quot;Circular Buffer&quot;)
  <TD>compressALG_Average<TD>"Average"<TR>
  <TD>compressALG_Circular_Buffer<TD>"Circular Buffer"<TR>
</TABLE>


==== aoOIF ====
==== aoOIF ====


  choice(aoOIF_Full,&quot;Full&quot;)
<TABLE BORDER="1"><TH>C Identifier<TH>Choice Name<TR>
  choice(aoOIF_Incremental,&quot;Incremental&quot;)
  <TD>aoOIF_Full<TD>"Full"<TR>
 
  <TD>aoOIF_Incremental<TD>"Incremental"<TR>
</TABLE>


----
----

Latest revision as of 23:42, 17 December 2008

EPICS Record Reference Manual


Menu Choices

Menu Fields

Some of the fields in EPICS records are of type menuXXX, meaning that the value of the field must be one from a menu of specific choices. There are several different menus available and each menu field uses one. Note that the value given to the record field must be the 'Choice Name' in the tables below, not the 'C Identifier'. The latter is used internally to refer to a choice from C code.

For instance, the simplest menu is called menuYesNo and has two possible choices, "NO" and "YES"; no other values for a field that uses menuYesNo are possible; e.g. "0.5", "MAYBE", and "NO WAY" are not possible choices for the field. In addition, when a menu field is configured to have a certain value, its value string must match exactly one of the possible choices in its menu, including its case. For instance, if a field's menu is menuYesNo, the choices "yes", "No", and "Yes" are not valid choices: they don't match the case of "NO" or "YES".

There are several menus provided as part of the standard EPICS release. Here are their names:

  • seqSELM
  • selSELM
  • menuYesNo
  • menuSimm
  • menuScan
  • menuPriority
  • menuOmsl
  • menuIvoa
  • menuFtype
  • menuConvert
  • menuCompress
  • menuAlarmStat
  • menuAlarmSevr
  • fanoutSELM
  • compressALG
  • aoOIF

A few of these menus are record-specific. For example, aoOIF is used solely by the OIF field in the analog output record. Most of the above menus, however, are used by many different fields in different records. For example, the menuAlarmSevr menu is used by the LLSV field in the analog input record as well as the COSV field in the binary input record, among others.

The above menus and their choices are provided as part of the standard EPICS release; however, developers can add to, delete, or change the choices of each, as well as add new menu types. (See the Application Developer's Guide for your release for more information on how to add and change existing menus). Thus, the database designer should know that the available menus and their choices may vary from site to site. The designer must be familiar with the menu and menu choices for any fields he/she is configuring. This isn't a problem for most database designers because such tools as VDCT, GDCT, and Capfast allow the designer configuring the database to choose from the specified choices. Nonetheless, there are ways a designer can figure out the available choices for a particular menu and thus for a particular field without using a database configuration tool.

Determining the Choices of a Menu Field

Peeking at the Database Definition Files

The definition for a particular menu can be found by looking at the database definition or .dbd file for that menu. For instance, the menuAlarmSevr.dbd file contains the definition for the menuAlarmSevr menu. You can see which menu a field uses by looking at the dbCommonRecord.dbd file if the field is common to all record types or by looking at the file that defines that record type if the field is not common to all record types. For example, to see which menu the OIF field uses, one would have to look in the aoRecord.dbd file which contains the definition for the analog output record, because OIF is particular to the analog output record and is not common to all other record types.

Several record types define menus inside the record type definition file instead of in a separate menuXXX.dbd file. For example, the field OIF of the ao record type uses the aoOIF menu which is defined at the beginning of aoRecord.dbd. Such menus should normally have a name that starts with the name of the record type and is followed by the field name for which they are defined, to avoid naming collisions.

Standard Menu Definitions

Here are the definitions for the menus available as part of the standard EPICS release. The designer should know that the definitions of these menus may be different at his/her site and these are provided merely as a convenience. The actual choice strings appear in quotes.

seqSELM

C IdentifierChoice Name
seqSELM_All"All"
seqSELM_Specified"Specified"
seqSELM_Mask"Mask"

selSELM

C IdentifierChoice Name
selSELM_Specified"Specified"
selSELM_High_Signal"High Signal"
selSELM_Low_Signal"Low Signal"
selSELM_Median_Signal"Median Signal"

menuYesNo

C IdentifierChoice Name
menuYesNoNO"NO"
menuYesNoYES"YES"

menuSimm

C IdentifierChoice Name
menuSimmNO"NO"
menuSimmYES"YES"
menuSimmRAW"RAW"

menuScan

C IdentifierChoice Name
menuScanPassive"Passive"
menuScanEvent"Event"
menuScanI_O_Intr"I/O Intr"
menuScan10_second"10 second"
menuScan5_second"5 second"
menuScan2_second"2 second"
menuScan1_second"1 second"
menuScan_5_second".5 second"
menuScan_2_second".2 second"
menuScan_1_second".1 second"

menuPriority

C IdentifierChoice Name
menuPriorityLOW"LOW"
menuPriorityMEDIUM"MEDIUM"
menuPriorityHIGH"HIGH"

menuOmsl

C IdentifierChoice Name
menuOmslsupervisory"supervisory"
menuOmslclosed_loop"closed_loop"

menuIvoa

C IdentifierChoice Name
menuIvoaContinue_normally"Continue normally"
menuIvoaDon_t_drive_outputs"Don't drive outputs"
menuIvoaSet_output_to_IVOV"Set output to IVOV"

menuFtype

C IdentifierChoice Name
menuFtypeSTRING"STRING"
menuFtypeCHAR"CHAR"
menuFtypeUCHAR"UCHAR"
menuFtypeSHORT"SHORT"
menuFtypeUSHORT"USHORT"
menuFtypeLONG"LONG"
menuFtypeULONG"ULONG"
menuFtypeFLOAT"FLOAT"
menuFtypeDOUBLE"DOUBLE"
menuFtypeENUM"ENUM"

menuConvert

Note that menuConvert is special in that applications are expected to change it. The application must however never change the number and order of the first three choices ("NO CONVERSION","SLOPE","LINEAR"). Any choices beyond "LINEAR" are interpreted as names of breakpoint tables. EPICS comes with a default set of breakpoint tables for converting temperature units, see the table below.


C IdentifierChoice Name
menuConvertNO_CONVERSION"NO CONVERSION"
menuConvertSLOPE"SLOPE"
menuConvertLINEAR"LINEAR"
menuConverttypeKdegF"typeKdegF"
menuConverttypeKdegC"typeKdegC"
menuConverttypeJdegF"typeJdegF"
menuConverttypeJdegC"typeJdegC"
menuConverttypeEdegF"typeEdegF(ixe only)"
menuConverttypeEdegC"typeEdegC(ixe only)"
menuConverttypeTdegF"typeTdegF"
menuConverttypeTdegC"typeTdegC"
menuConverttypeRdegF"typeRdegF"
menuConverttypeRdegC"typeRdegC"
menuConverttypeSdegF"typeSdegF"
menuConverttypeSdegC"typeSdegC"

menuCompress

C IdentifierChoice Name
menuCompressN_to_1_First_Value"N to 1 First Value"
menuCompressN_to_1_Low_Value"N to 1 Low Value"
menuCompressN_to_1_High_Value"N to 1 High Value"
menuCompressN_to_1_Average"N to 1 Average"

menuAlarmStat

C IdentifierChoice Name
menuAlarmStat"NO_ALARM"
menuAlarmStatREAD"READ"
menuAlarmStatWRITE"WRITE"
menuAlarmStatHIHI"HIHI"
menuAlarmStatHIGH"HIGH"
menuAlarmStatLOLO"LOLO"
menuAlarmStatLOW"LOW"
menuAlarmStatSTATE"STATE"
menuAlarmStatCOS"COS"
menuAlarmStatCOMM"COMM"
menuAlarmStatTIMEOUT"TIMEOUT"
menuAlarmStatHWLIMIT"HWLIMIT"
menuAlarmStatCALC"CALC"
menuAlarmStatSCAN"SCAN"
menuAlarmStatLINK"LINK"
menuAlarmStatSOFT"SOFT"
menuAlarmStatBAD_SUB"BAD_SUB"
menuAlarmStatUDF"UDF"
menuAlarmStatDISABLE"DISABLE"
menuAlarmStatSIMM"SIMM"
menuAlarmStatREAD_ACCESS"READ_ACCESS"
menuAlarmStatWRITE_ACCESS"WRITE_ACCESS"

menuAlarmSevr

C IdentifierChoice Name
menuAlarmSevrNO_ALARM"NO_ALARM"
menuAlarmSevrMINOR"MINOR"
menuAlarmSevrMAJOR"MAJOR"
menuAlarmSevrINVALID"INVALID"

fanoutSELM

C IdentifierChoice Name
fanoutSELM_All"All"
fanoutSELM_Specified"Specified"
fanoutSELM_Mask"Mask"

compressALG

C IdentifierChoice Name
compressALG_N_to_1_Low_Value"N to 1 Low Value"
compressALG_N_to_1_High_Value"N to 1 High Value"
compressALG_N_to_1_Average"N to 1 Average"
compressALG_Average"Average"
compressALG_Circular_Buffer"Circular Buffer"

aoOIF

C IdentifierChoice Name
aoOIF_Full"Full"
aoOIF_Incremental"Incremental"


EPICS Record Reference Manual - 19 MAY 1998