Difference between revisions of "RRM 3-14 Menu Choices"
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 = | ||
== | == Menu Fields == | ||
Some of the fields in EPICS records are of type | 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 | ||
* menuIvoa | * menuIvoa | ||
* menuFtype | * menuFtype | ||
* menuConvert | * menuConvert | ||
* menuCompress | * menuCompress | ||
* 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 | 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 | 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 | === 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 <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. | |||
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. | 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 ==== | ||
<TABLE BORDER="1"><TH>C Identifier<TH>Choice Name<TR> | |||
<TD>seqSELM_All<TD>"All"<TR> | |||
<TD>seqSELM_Specified<TD>"Specified"<TR> | |||
<TD>seqSELM_Mask<TD>"Mask"<TR> | |||
</TABLE> | |||
==== selSELM ==== | ==== selSELM ==== | ||
<TABLE BORDER="1"><TH>C Identifier<TH>Choice Name<TR> | |||
<TD>selSELM_Specified<TD>"Specified"<TR> | |||
<TD>selSELM_High_Signal<TD>"High Signal"<TR> | |||
<TD>selSELM_Low_Signal<TD>"Low Signal"<TR> | |||
<TD>selSELM_Median_Signal<TD>"Median Signal"<TR> | |||
</TABLE> | |||
==== menuYesNo ==== | ==== menuYesNo ==== | ||
<TABLE BORDER="1"><TH>C Identifier<TH>Choice Name<TR> | |||
<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 ==== | ||
<TABLE BORDER="1"><TH>C Identifier<TH>Choice Name<TR> | |||
<TD>menuScanPassive<TD>"Passive"<TR> | |||
<TD>menuScanEvent<TD>"Event"<TR> | |||
<TD>menuScanI_O_Intr<TD>"I/O Intr"<TR> | |||
<TD>menuScan10_second<TD>"10 second"<TR> | |||
<TD>menuScan5_second<TD>"5 second"<TR> | |||
<TD>menuScan2_second<TD>"2 second"<TR> | |||
<TD>menuScan1_second<TD>"1 second"<TR> | |||
<TD>menuScan_5_second<TD>".5 second"<TR> | |||
<TD>menuScan_2_second<TD>".2 second"<TR> | |||
<TD>menuScan_1_second<TD>".1 second"<TR> | |||
</TABLE> | |||
==== menuPriority ==== | ==== menuPriority ==== | ||
<TABLE BORDER="1"><TH>C Identifier<TH>Choice Name<TR> | |||
<TD>menuPriorityLOW<TD>"LOW"<TR> | |||
<TD>menuPriorityMEDIUM<TD>"MEDIUM"<TR> | |||
<TD>menuPriorityHIGH<TD>"HIGH"<TR> | |||
</TABLE> | |||
==== menuOmsl ==== | ==== menuOmsl ==== | ||
<TABLE BORDER="1"><TH>C Identifier<TH>Choice Name<TR> | |||
<TD>menuOmslsupervisory<TD>"supervisory"<TR> | |||
<TD>menuOmslclosed_loop<TD>"closed_loop"<TR> | |||
</TABLE> | |||
==== menuIvoa ==== | ==== menuIvoa ==== | ||
<TABLE BORDER="1"><TH>C Identifier<TH>Choice Name<TR> | |||
<TD>menuIvoaContinue_normally<TD>"Continue normally"<TR> | |||
<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 ==== | ||
<TABLE BORDER="1"><TH>C Identifier<TH>Choice Name<TR> | |||
<TD>menuFtypeSTRING<TD>"STRING"<TR> | |||
<TD>menuFtypeCHAR<TD>"CHAR"<TR> | |||
<TD>menuFtypeUCHAR<TD>"UCHAR"<TR> | |||
<TD>menuFtypeSHORT<TD>"SHORT"<TR> | |||
<TD>menuFtypeUSHORT<TD>"USHORT"<TR> | |||
<TD>menuFtypeLONG<TD>"LONG"<TR> | |||
<TD>menuFtypeULONG<TD>"ULONG"<TR> | |||
<TD>menuFtypeFLOAT<TD>"FLOAT"<TR> | |||
<TD>menuFtypeDOUBLE<TD>"DOUBLE"<TR> | |||
<TD>menuFtypeENUM<TD>"ENUM"<TR> | |||
</TABLE> | |||
==== menuConvert ==== | ==== 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. | |||
<TABLE BORDER="1"><TH>C Identifier<TH>Choice Name<TR> | |||
<TD>menuConvertNO_CONVERSION<TD>"NO CONVERSION"<TR> | |||
<TD>menuConvertSLOPE<TD>"SLOPE"<TR> | |||
<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> | |||
==== | ==== menuCompress ==== | ||
<TABLE BORDER="1"><TH>C Identifier<TH>Choice Name<TR> | |||
<TD>menuCompressN_to_1_First_Value<TD>"N to 1 First Value"<TR> | |||
<TD>menuCompressN_to_1_Low_Value<TD>"N to 1 Low Value"<TR> | |||
<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 ==== | ||
<TABLE BORDER="1"><TH>C Identifier<TH>Choice Name<TR> | |||
<TD>menuAlarmStat<TD>"NO_ALARM"<TR> | |||
<TD>menuAlarmStatREAD<TD>"READ"<TR> | |||
<TD>menuAlarmStatWRITE<TD>"WRITE"<TR> | |||
<TD>menuAlarmStatHIHI<TD>"HIHI"<TR> | |||
<TD>menuAlarmStatHIGH<TD>"HIGH"<TR> | |||
<TD>menuAlarmStatLOLO<TD>"LOLO"<TR> | |||
<TD>menuAlarmStatLOW<TD>"LOW"<TR> | |||
<TD>menuAlarmStatSTATE<TD>"STATE"<TR> | |||
<TD>menuAlarmStatCOS<TD>"COS"<TR> | |||
<TD>menuAlarmStatCOMM<TD>"COMM"<TR> | |||
<TD>menuAlarmStatTIMEOUT<TD>"TIMEOUT"<TR> | |||
<TD>menuAlarmStatHWLIMIT<TD>"HWLIMIT"<TR> | |||
<TD>menuAlarmStatCALC<TD>"CALC"<TR> | |||
<TD>menuAlarmStatSCAN<TD>"SCAN"<TR> | |||
<TD>menuAlarmStatLINK<TD>"LINK"<TR> | |||
<TD>menuAlarmStatSOFT<TD>"SOFT"<TR> | |||
<TD>menuAlarmStatBAD_SUB<TD>"BAD_SUB"<TR> | |||
<TD>menuAlarmStatUDF<TD>"UDF"<TR> | |||
<TD>menuAlarmStatDISABLE<TD>"DISABLE"<TR> | |||
<TD>menuAlarmStatSIMM<TD>"SIMM"<TR> | |||
<TD>menuAlarmStatREAD_ACCESS<TD>"READ_ACCESS"<TR> | |||
<TD>menuAlarmStatWRITE_ACCESS<TD>"WRITE_ACCESS"<TR> | |||
</TABLE> | |||
==== menuAlarmSevr ==== | ==== menuAlarmSevr ==== | ||
<TABLE BORDER="1"><TH>C Identifier<TH>Choice Name<TR> | |||
<TD>menuAlarmSevrNO_ALARM<TD>"NO_ALARM"<TR> | |||
<TD>menuAlarmSevrMINOR<TD>"MINOR"<TR> | |||
<TD>menuAlarmSevrMAJOR<TD>"MAJOR"<TR> | |||
<TD>menuAlarmSevrINVALID<TD>"INVALID"<TR> | |||
</TABLE> | |||
==== fanoutSELM ==== | ==== fanoutSELM ==== | ||
<TABLE BORDER="1"><TH>C Identifier<TH>Choice Name<TR> | |||
<TD>fanoutSELM_All<TD>"All"<TR> | |||
<TD>fanoutSELM_Specified<TD>"Specified"<TR> | |||
<TD>fanoutSELM_Mask<TD>"Mask"<TR> | |||
</TABLE> | |||
==== compressALG ==== | ==== compressALG ==== | ||
<TABLE BORDER="1"><TH>C Identifier<TH>Choice Name<TR> | |||
<TD>compressALG_N_to_1_Low_Value<TD>"N to 1 Low Value"<TR> | |||
<TD>compressALG_N_to_1_High_Value<TD>"N to 1 High Value"<TR> | |||
<TD>compressALG_N_to_1_Average<TD>"N to 1 Average"<TR> | |||
<TD>compressALG_Average<TD>"Average"<TR> | |||
<TD>compressALG_Circular_Buffer<TD>"Circular Buffer"<TR> | |||
</TABLE> | |||
==== aoOIF ==== | ==== aoOIF ==== | ||
<TABLE BORDER="1"><TH>C Identifier<TH>Choice Name<TR> | |||
<TD>aoOIF_Full<TD>"Full"<TR> | |||
<TD>aoOIF_Incremental<TD>"Incremental"<TR> | |||
</TABLE> | |||
---- | ---- |
Latest revision as of 23:42, 17 December 2008
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 Identifier | Choice Name |
---|---|
seqSELM_All | "All" |
seqSELM_Specified | "Specified" |
seqSELM_Mask | "Mask" |
selSELM
C Identifier | Choice Name |
---|---|
selSELM_Specified | "Specified" |
selSELM_High_Signal | "High Signal" |
selSELM_Low_Signal | "Low Signal" |
selSELM_Median_Signal | "Median Signal" |
C Identifier | Choice Name |
---|---|
menuYesNoNO | "NO" |
menuYesNoYES | "YES" |
C Identifier | Choice Name |
---|---|
menuSimmNO | "NO" |
menuSimmYES | "YES" |
menuSimmRAW | "RAW" |
C Identifier | Choice 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" |
C Identifier | Choice Name |
---|---|
menuPriorityLOW | "LOW" |
menuPriorityMEDIUM | "MEDIUM" |
menuPriorityHIGH | "HIGH" |
C Identifier | Choice Name |
---|---|
menuOmslsupervisory | "supervisory" |
menuOmslclosed_loop | "closed_loop" |
C Identifier | Choice Name |
---|---|
menuIvoaContinue_normally | "Continue normally" |
menuIvoaDon_t_drive_outputs | "Don't drive outputs" |
menuIvoaSet_output_to_IVOV | "Set output to IVOV" |
C Identifier | Choice Name |
---|---|
menuFtypeSTRING | "STRING" |
menuFtypeCHAR | "CHAR" |
menuFtypeUCHAR | "UCHAR" |
menuFtypeSHORT | "SHORT" |
menuFtypeUSHORT | "USHORT" |
menuFtypeLONG | "LONG" |
menuFtypeULONG | "ULONG" |
menuFtypeFLOAT | "FLOAT" |
menuFtypeDOUBLE | "DOUBLE" |
menuFtypeENUM | "ENUM" |
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 Identifier | Choice 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" |
C Identifier | Choice 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" |
C Identifier | Choice 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" |
C Identifier | Choice Name |
---|---|
menuAlarmSevrNO_ALARM | "NO_ALARM" |
menuAlarmSevrMINOR | "MINOR" |
menuAlarmSevrMAJOR | "MAJOR" |
menuAlarmSevrINVALID | "INVALID" |
fanoutSELM
C Identifier | Choice Name |
---|---|
fanoutSELM_All | "All" |
fanoutSELM_Specified | "Specified" |
fanoutSELM_Mask | "Mask" |
compressALG
C Identifier | Choice 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 Identifier | Choice Name |
---|---|
aoOIF_Full | "Full" |
aoOIF_Incremental | "Incremental" |
EPICS Record Reference Manual - 19 MAY 1998