Difference between revisions of "RRM 3-14 Menu Choices"
Line 30: | Line 30: | ||
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. 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. | ||
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 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 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. | ||
=== Determining the Choices of a GBLCHOICE or RECCHOICE Field === | === Determining the Choices of a GBLCHOICE or RECCHOICE Field === |
Revision as of 16:41, 18 April 2008
Menu Choices
GBLCHOICE and RECCHOICE 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 menuYesNo
and has two possible choices, NO and YES; no other values for a field that uses menuYesNo
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 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
- menuScan
- menuPriority
- menuOmsl
- menuLinr
- menuIvoa
- menuFtype
- menuConvert
- menuCompress
- menuArrType
- 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. 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 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 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.
Determining the Choices of a GBLCHOICE or RECCHOICE Field
Using dbst
dbst
is a utility that allows a user to run checks on a static database, a database that is not loaded and running. For instance, dbst
can be used to make sure that all the field values in the database are valid. In addition, dbst
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 "/EPICSR3.13.0/base/dbd" include "menuGlobal.dbd" include "dbCommonRecord.dbd" include "base.dbd"
Specify the .db
file you created on the command line when you start dbst
. dbst
is located in the extensions part of the EPICS tree for Release 3.13. For instance, if $EPICS
points to the top level of the EPICS tree and your architecture is sun4
, the following command would set your path so that you can run dbst
:
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,"Full") choice(aoOIF_Incremental,"Incremental") }
Peeking at the Database Definition Files
The definition for a particular menu can also be seen simply 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. In addition, you can see which menu a GBLCHOICE 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 command 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. 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 aoOIF
menu which is defined at the beginning of aoRecord.dbd
.
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 dbst
utility to view menu choices. Remember that the actual choices appear in quotes.
seqSELM
choice(seqSELM_All,"All") choice(seqSELM_Specified,"Specified") choice(seqSELM_Mask,"Mask")
selSELM
choice(selSELM_Specified,"Specified") choice(selSELM_High_Signal,"High Signal") choice(selSELM_Low_Signal,"Low Signal") choice(selSELM_Median_Signal,"Median Signal")
choice(menuYesNoNO,"NO") choice(menuYesNoYES,"YES")
choice(menuScanPassive,"Passive") choice(menuScanEvent,"Event") choice(menuScanI_O_Intr,"I/O Intr") choice(menuScan10_second,"10 second") choice(menuScan5_second,"5 second") choice(menuScan2_second,"2 second") choice(menuScan1_second,"1 second") choice(menuScan_5_second,".5 second") choice(menuScan_2_second,".2 second") choice(menuScan_1_second,".1 second")
choice(menuPriorityLOW,"LOW") choice(menuPriorityMEDIUM,"MEDIUM") choice(menuPriorityHIGH,"HIGH")
choice(menuOmslsupervisory,"supervisory") choice(menuOmslclosed_loop,"closed_loop")
choice(menuLinrNO_CONVERSION,"NO CONVERSION") choice(menuLinrLINEAR,"LINEAR")
choice(menuIvoaContinue_normally,"Continue normally") choice(menuIvoaDon_t_drive_outputs,"Don't drive outputs") choice(menuIvoaSet_output_to_IVOV,"Set output to IVOV")
choice(menuFtypeSTRING,"STRING") choice(menuFtypeCHAR,"CHAR") choice(menuFtypeUCHAR,"UCHAR") choice(menuFtypeSHORT,"SHORT") choice(menuFtypeUSHORT,"USHORT") choice(menuFtypeLONG,"LONG") choice(menuFtypeULONG,"ULONG") choice(menuFtypeFLOAT,"FLOAT") choice(menuFtypeDOUBLE,"DOUBLE") choice(menuFtypeENUM,"ENUM")
choice(menuConvertNO_CONVERSION,"NO CONVERSION") choice(menuConvertLINEAR,"LINEAR") choice(menuConverttypeKdegF,"typeKdegF") choice(menuConverttypeKdegC,"typeKdegC") choice(menuConverttypeJdegF,"typeJdegF") choice(menuConverttypeJdegC,"typeJdegC") choice(menuConverttypeEdegF,"typeEdegF(ixe only)") choice(menuConverttypeEdegC,"typeEdegC(ixe only)") choice(menuConverttypeTdegF,"typeTdegF") choice(menuConverttypeTdegC,"typeTdegC") choice(menuConverttypeRdegF,"typeRdegF") choice(menuConverttypeRdegC,"typeRdegC") choice(menuConverttypeSdegF,"typeSdegF") choice(menuConverttypeSdegC,"typeSdegC")
choice(menuCompressN_to_1_First_Value,"N to 1 First Value") choice(menuCompressN_to_1_Low_Value,"N to 1 Low Value") choice(menuCompressN_to_1_High_Value,"N to 1 High Value") choice(menuCompressN_to_1_Average,"N to 1 Average")
choice(menuArrType8_bit_integers,"8 bit integers") choice(menuArrType16_bit_integers,"16 bit integers") choice(menuArrType32_bit_integers,"32 bit integers") choice(menuArrTypeIEEE_floating_point,"IEEE floating point")
choice(menuAlarmStat,"") choice(menuAlarmStatREAD,"READ") choice(menuAlarmStatWRITE,"WRITE") choice(menuAlarmStatHIHI,"HIHI") choice(menuAlarmStatHIGH,"HIGH") choice(menuAlarmStatLOLO,"LOLO") choice(menuAlarmStatLOW,"LOW") choice(menuAlarmStatSTATE,"STATE") choice(menuAlarmStatCOS,"COS") choice(menuAlarmStatCOMM,"COMM") choice(menuAlarmStatTIMEOUT,"TIMEOUT") choice(menuAlarmStatHWLIMIT,"HWLIMIT") choice(menuAlarmStatCALC,"CALC") choice(menuAlarmStatSCAN,"SCAN") choice(menuAlarmStatLINK,"LINK") choice(menuAlarmStatSOFT,"SOFT") choice(menuAlarmStatBAD_SUB,"BAD_SUB") choice(menuAlarmStatUDF,"UDF") choice(menuAlarmStatDISABLE,"DISABLE") choice(menuAlarmStatSIMM,"SIMM") choice(menuAlarmStatREAD_ACCESS,"READ_ACCESS") choice(menuAlarmStatWRITE_ACCESS,"WRITE_ACCESS")
choice(menuAlarmSevrNO_ALARM,"NO_ALARM") choice(menuAlarmSevrMINOR,"MINOR") choice(menuAlarmSevrMAJOR,"MAJOR") choice(menuAlarmSevrINVALID,"INVALID")
fanoutSELM
choice(fanoutSELM_All,"All") choice(fanoutSELM_Specified,"Specified") choice(fanoutSELM_Mask,"Mask")
compressALG
choice(compressALG_N_to_1_Low_Value,"N to 1 Low Value") choice(compressALG_N_to_1_High_Value,"N to 1 High Value") choice(compressALG_N_to_1_Average,"N to 1 Average") choice(compressALG_Average,"Average") choice(compressALG_Circular_Buffer,"Circular Buffer")
aoOIF
choice(aoOIF_Full,"Full") choice(aoOIF_Incremental,"Incremental")
EPICS Record Reference Manual - 19 MAY 1998