#*************************************************************************
# Copyright (c) 2002 The University of Chicago, as Operator of Argonne
#     National Laboratory.
# Copyright (c) 2002 The Regents of the University of California, as
#     Operator of Los Alamos National Laboratory.
# EPICS BASE Versions 3.13.7
# and higher are distributed subject to a Software License Agreement found
# in file LICENSE that is included with this distribution. 
#*************************************************************************
menu(waitOOPT) {
	choice(waitOOPT_Every_Time,"Every Time")
	choice(waitOOPT_On_Change,"On Change")
	choice(waitOOPT_When_Zero,"When Zero")
	choice(waitOOPT_When_Non_zero,"When Non-zero")
	choice(waitOOPT_Transition_To_Zero,"Transition To Zero")
	choice(waitOOPT_Transition_To_Non_zero,"Transition To Non-zero")
}
menu(waitDOPT) {
	choice(waitDOPT_Use_VAL,"Use VAL")
	choice(waitDOPT_Use_DOL,"Use DOL")
}
menu(waitINAP) {
	choice(waitINAP_No,"No")
	choice(waitINAP_Yes,"Yes")
}
menu(waitINAV) {
	choice(waitINAV_PV_OK,"PV OK")
	choice(waitINAV_PV_BAD,"PV BAD")
	choice(waitINAV_No_PV,"No PV")
}
recordtype(wait) {
	include "dbCommon.dbd" 
	field(VERS,DBF_FLOAT) {
		prompt("Code Version")
		special(SPC_NOMOD)
		initial("1")
	}
	field(HOPR,DBF_FLOAT) {
		prompt("High Operating Range")
		promptgroup(GUI_ALARMS)
		asl(ASL0)
		interest(1)
	}
	field(LOPR,DBF_FLOAT) {
		prompt("Low Operating Range")
		promptgroup(GUI_BITS1)
		asl(ASL0)
		interest(1)
	}
	field(INIT,DBF_SHORT) {
		prompt("Initialized?")
		special(SPC_NOMOD)
		interest(3)
	}
	field(CBST,DBF_NOACCESS) {
		prompt("Pointer to cbStruct")
		special(SPC_NOMOD)
		interest(4)
		extra("void *         cbst")
	}
	field(INAN,DBF_STRING) {
		prompt("INPA PV Name")
		promptgroup(GUI_CALC)
		asl(ASL0)
		special(110)
		interest(1)
		size(40)
	}
	field(INBN,DBF_STRING) {
		prompt("INPB PV Name")
		promptgroup(GUI_CALC)
		asl(ASL0)
		special(111)
		interest(1)
		size(40)
	}
	field(INCN,DBF_STRING) {
		prompt("INPC PV Name")
		promptgroup(GUI_CALC)
		asl(ASL0)
		special(112)
		interest(1)
		size(40)
	}
	field(INDN,DBF_STRING) {
		prompt("INPD PV Name")
		promptgroup(GUI_CALC)
		asl(ASL0)
		special(113)
		interest(1)
		size(40)
	}
	field(INEN,DBF_STRING) {
		prompt("INPE PV Name")
		promptgroup(GUI_CALC)
		asl(ASL0)
		special(114)
		interest(1)
		size(40)
	}
	field(INFN,DBF_STRING) {
		prompt("INPF PV Name")
		promptgroup(GUI_CALC)
		asl(ASL0)
		special(115)
		interest(1)
		size(40)
	}
	field(INGN,DBF_STRING) {
		prompt("INPG PV Name")
		promptgroup(GUI_CALC)
		asl(ASL0)
		special(116)
		interest(1)
		size(40)
	}
	field(INHN,DBF_STRING) {
		prompt("INPH PV Name")
		promptgroup(GUI_CALC)
		asl(ASL0)
		special(117)
		interest(1)
		size(40)
	}
	field(ININ,DBF_STRING) {
		prompt("INPI PV Name")
		promptgroup(GUI_CALC)
		asl(ASL0)
		special(118)
		interest(1)
		size(40)
	}
	field(INJN,DBF_STRING) {
		prompt("INPJ PV Name")
		promptgroup(GUI_CALC)
		asl(ASL0)
		special(119)
		interest(1)
		size(40)
	}
	field(INKN,DBF_STRING) {
		prompt("INPK PV Name")
		promptgroup(GUI_CALC)
		asl(ASL0)
		special(120)
		interest(1)
		size(40)
	}
	field(INLN,DBF_STRING) {
		prompt("INPL PV Name")
		promptgroup(GUI_CALC)
		asl(ASL0)
		special(121)
		interest(1)
		size(40)
	}
	field(DOLN,DBF_STRING) {
		prompt("DOL  PV Name")
		promptgroup(GUI_CALC)
		asl(ASL0)
		special(122)
		interest(1)
		size(40)
	}
	field(OUTN,DBF_STRING) {
		prompt("OUT  PV Name")
		promptgroup(GUI_CALC)
		asl(ASL0)
		special(123)
		interest(1)
		size(40)
	}
	field(INAV,DBF_MENU) {
		prompt("INPA PV Status")
		special(SPC_NOMOD)
		interest(1)
		menu(waitINAV)
	}
	field(INBV,DBF_MENU) {
		prompt("INPB PV Status")
		special(SPC_NOMOD)
		interest(1)
		menu(waitINAV)
	}
	field(INCV,DBF_MENU) {
		prompt("INPC PV Status")
		special(SPC_NOMOD)
		interest(1)
		menu(waitINAV)
	}
	field(INDV,DBF_MENU) {
		prompt("INPD PV Status")
		special(SPC_NOMOD)
		interest(1)
		menu(waitINAV)
	}
	field(INEV,DBF_MENU) {
		prompt("INPE PV Status")
		special(SPC_NOMOD)
		interest(1)
		menu(waitINAV)
	}
	field(INFV,DBF_MENU) {
		prompt("INPF PV Status")
		special(SPC_NOMOD)
		interest(1)
		menu(waitINAV)
	}
	field(INGV,DBF_MENU) {
		prompt("INPG PV Status")
		special(SPC_NOMOD)
		interest(1)
		menu(waitINAV)
	}
	field(INHV,DBF_MENU) {
		prompt("INPH PV Status")
		special(SPC_NOMOD)
		interest(1)
		menu(waitINAV)
	}
	field(INIV,DBF_MENU) {
		prompt("INPI PV Status")
		special(SPC_NOMOD)
		interest(1)
		menu(waitINAV)
	}
	field(INJV,DBF_MENU) {
		prompt("INPJ PV Status")
		special(SPC_NOMOD)
		interest(1)
		menu(waitINAV)
	}
	field(INKV,DBF_MENU) {
		prompt("INPK PV Status")
		special(SPC_NOMOD)
		interest(1)
		menu(waitINAV)
	}
	field(INLV,DBF_MENU) {
		prompt("INPL PV Status")
		special(SPC_NOMOD)
		interest(1)
		menu(waitINAV)
	}
	field(DOLV,DBF_MENU) {
		prompt("DOL  PV Status")
		special(SPC_NOMOD)
		interest(1)
		menu(waitINAV)
	}
	field(OUTV,DBF_MENU) {
		prompt("OUT  PV Status")
		special(SPC_NOMOD)
		interest(1)
		menu(waitINAV)
	}
	field(A,DBF_DOUBLE) {
		prompt("Value of Input A")
		pp(TRUE)
	}
	field(B,DBF_DOUBLE) {
		prompt("Value of Input B")
		pp(TRUE)
	}
	field(C,DBF_DOUBLE) {
		prompt("Value of Input C")
		pp(TRUE)
	}
	field(D,DBF_DOUBLE) {
		prompt("Value of Input D")
		pp(TRUE)
	}
	field(E,DBF_DOUBLE) {
		prompt("Value of Input E")
		pp(TRUE)
	}
	field(F,DBF_DOUBLE) {
		prompt("Value of Input F")
		pp(TRUE)
	}
	field(G,DBF_DOUBLE) {
		prompt("Value of Input G")
		pp(TRUE)
	}
	field(H,DBF_DOUBLE) {
		prompt("Value of Input H")
		pp(TRUE)
	}
	field(I,DBF_DOUBLE) {
		prompt("Value of Input I")
		pp(TRUE)
	}
	field(J,DBF_DOUBLE) {
		prompt("Value of Input J")
		pp(TRUE)
	}
	field(K,DBF_DOUBLE) {
		prompt("Value of Input K")
		pp(TRUE)
	}
	field(L,DBF_DOUBLE) {
		prompt("Value of Input L")
		pp(TRUE)
	}
	field(LA,DBF_DOUBLE) {
		prompt("Last Val of Input A")
	}
	field(LB,DBF_DOUBLE) {
		prompt("Last Val of Input B")
	}
	field(LC,DBF_DOUBLE) {
		prompt("Last Val of Input C")
	}
	field(LD,DBF_DOUBLE) {
		prompt("Last Val of Input D")
	}
	field(LE,DBF_DOUBLE) {
		prompt("Last Val of Input E")
	}
	field(LF,DBF_DOUBLE) {
		prompt("Last Val of Input F")
	}
	field(LG,DBF_DOUBLE) {
		prompt("Last Val of Input G")
	}
	field(LH,DBF_DOUBLE) {
		prompt("Last Val of Input H")
	}
	field(LI,DBF_DOUBLE) {
		prompt("Last Val of Input I")
	}
	field(LJ,DBF_DOUBLE) {
		prompt("Last Val of Input J")
	}
	field(LK,DBF_DOUBLE) {
		prompt("Last Val of Input K")
	}
	field(LL,DBF_DOUBLE) {
		prompt("Last Val of Input L")
	}
	field(INAP,DBF_MENU) {
		prompt("INPA causes I/O INTR")
		promptgroup(GUI_CALC)
		interest(1)
		menu(waitINAP)
		initial("Yes")
	}
	field(INBP,DBF_MENU) {
		prompt("INPB causes I/O INTR")
		promptgroup(GUI_CALC)
		interest(1)
		menu(waitINAP)
		initial("Yes")
	}
	field(INCP,DBF_MENU) {
		prompt("INPC causes I/O INTR")
		promptgroup(GUI_CALC)
		interest(1)
		menu(waitINAP)
		initial("Yes")
	}
	field(INDP,DBF_MENU) {
		prompt("INPD causes I/O INTR")
		promptgroup(GUI_CALC)
		interest(1)
		menu(waitINAP)
		initial("Yes")
	}
	field(INEP,DBF_MENU) {
		prompt("INPE causes I/O INTR")
		promptgroup(GUI_CALC)
		interest(1)
		menu(waitINAP)
		initial("Yes")
	}
	field(INFP,DBF_MENU) {
		prompt("INPF causes I/O INTR")
		promptgroup(GUI_CALC)
		interest(1)
		menu(waitINAP)
		initial("Yes")
	}
	field(INGP,DBF_MENU) {
		prompt("INPG causes I/O INTR")
		promptgroup(GUI_CALC)
		interest(1)
		menu(waitINAP)
		initial("Yes")
	}
	field(INHP,DBF_MENU) {
		prompt("INPH causes I/O INTR")
		promptgroup(GUI_CALC)
		interest(1)
		menu(waitINAP)
		initial("Yes")
	}
	field(INIP,DBF_MENU) {
		prompt("INPI causes I/O INTR")
		promptgroup(GUI_CALC)
		interest(1)
		menu(waitINAP)
		initial("Yes")
	}
	field(INJP,DBF_MENU) {
		prompt("INPJ causes I/O INTR")
		promptgroup(GUI_CALC)
		interest(1)
		menu(waitINAP)
		initial("Yes")
	}
	field(INKP,DBF_MENU) {
		prompt("INPK causes I/O INTR")
		promptgroup(GUI_CALC)
		interest(1)
		menu(waitINAP)
		initial("Yes")
	}
	field(INLP,DBF_MENU) {
		prompt("INPL causes I/O INTR")
		promptgroup(GUI_CALC)
		interest(1)
		menu(waitINAP)
		initial("Yes")
	}
	field(CALC,DBF_STRING) {
		prompt("Calculation")
		promptgroup(GUI_CLOCK)
		asl(ASL0)
		special(SPC_CALC)
		size(40)
	}
	field(RPCL,DBF_NOACCESS) {
		prompt("Reverse Polish Calc")
		special(SPC_NOMOD)
		interest(4)
		extra("char    rpcl[184]")
	}
	field(CLCV,DBF_LONG) {
		prompt("CALC Valid")
		interest(1)
	}
	field(VAL,DBF_DOUBLE) {
		prompt("Value Field")
	}
	field(OVAL,DBF_DOUBLE) {
		prompt("Old Value")
	}
	field(PREC,DBF_SHORT) {
		prompt("Display Precision")
		promptgroup(GUI_COMMON)
		interest(1)
	}
	field(OOPT,DBF_MENU) {
		prompt("Output Execute Opt")
		promptgroup(GUI_CALC)
		interest(1)
		menu(waitOOPT)
	}
	field(ODLY,DBF_FLOAT) {
		prompt("Output Execute Delay")
		promptgroup(GUI_ALARMS)
		asl(ASL0)
		interest(1)
	}
	field(DOPT,DBF_MENU) {
		prompt("Output Data Option")
		promptgroup(GUI_CALC)
		interest(1)
		menu(waitDOPT)
	}
	field(DOLD,DBF_DOUBLE) {
		prompt("Desired Output Data")
		promptgroup(GUI_CLOCK)
		asl(ASL0)
		interest(1)
	}
	field(OEVT,DBF_USHORT) {
		prompt("Event To Issue")
		promptgroup(GUI_CLOCK)
		asl(ASL0)
	}
	field(ADEL,DBF_DOUBLE) {
		prompt("Archive Deadband")
		promptgroup(GUI_CLOCK)
		interest(1)
	}
	field(MDEL,DBF_DOUBLE) {
		prompt("Monitor Deadband")
		promptgroup(GUI_CLOCK)
		interest(1)
	}
	field(ALST,DBF_DOUBLE) {
		prompt("Last Value Archived")
		special(SPC_NOMOD)
		interest(3)
	}
	field(MLST,DBF_DOUBLE) {
		prompt("Last Val Monitored")
		special(SPC_NOMOD)
		interest(3)
	}
	field(SIOL,DBF_INLINK) {
		prompt("Sim Input Specifctn")
		promptgroup(GUI_PULSE)
		interest(1)
	}
	field(SVAL,DBF_DOUBLE) {
		prompt("Simulation Value")
	}
	field(SIML,DBF_INLINK) {
		prompt("Sim Mode Location")
		promptgroup(GUI_PULSE)
		interest(1)
	}
	field(SIMM,DBF_MENU) {
		prompt("Simulation Mode")
		interest(1)
		menu(menuYesNo)
	}
	field(SIMS,DBF_MENU) {
		prompt("Sim mode Alarm Svrty")
		promptgroup(GUI_SELECT)
		interest(2)
		menu(menuAlarmSevr)
	}
}
