RRM 3-14 Menu Choices

From EPICSWIKI

Revision as of 18:42, 17 December 2008 by AndrewJohnson (talk | contribs) (Removed Ben's deprecation of record-specific menu definitions.)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

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