#*************************************************************************
# Copyright (c) 2007 UChicago Argonne LLC, 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 is distributed subject to a Software License Agreement found
# in file LICENSE that is included with this distribution. 
#*************************************************************************
recordtype(calc) {
	include "dbCommon.dbd" 
	field(VAL,DBF_DOUBLE) {
		prompt("Result")
		asl(ASL0)
	}
	field(CALC,DBF_STRING) {
		prompt("Calculation")
		promptgroup(GUI_CALC)
		special(SPC_CALC)
		pp(TRUE)
		size(80)
		initial("0")
	}
	field(INPA,DBF_INLINK) {
		prompt("Input A")
		promptgroup(GUI_CALC)
		interest(1)
	}
	field(INPB,DBF_INLINK) {
		prompt("Input B")
		promptgroup(GUI_CALC)
		interest(1)
	}
	field(INPC,DBF_INLINK) {
		prompt("Input C")
		promptgroup(GUI_CALC)
		interest(1)
	}
	field(INPD,DBF_INLINK) {
		prompt("Input D")
		promptgroup(GUI_CALC)
		interest(1)
	}
	field(INPE,DBF_INLINK) {
		prompt("Input E")
		promptgroup(GUI_CALC)
		interest(1)
	}
	field(INPF,DBF_INLINK) {
		prompt("Input F")
		promptgroup(GUI_CALC)
		interest(1)
	}
	field(INPG,DBF_INLINK) {
		prompt("Input G")
		promptgroup(GUI_CALC)
		interest(1)
	}
	field(INPH,DBF_INLINK) {
		prompt("Input H")
		promptgroup(GUI_CALC)
		interest(1)
	}
	field(INPI,DBF_INLINK) {
		prompt("Input I")
		promptgroup(GUI_CALC)
		interest(1)
	}
	field(INPJ,DBF_INLINK) {
		prompt("Input J")
		promptgroup(GUI_CALC)
		interest(1)
	}
	field(INPK,DBF_INLINK) {
		prompt("Input K")
		promptgroup(GUI_CALC)
		interest(1)
	}
	field(INPL,DBF_INLINK) {
		prompt("Input L")
		promptgroup(GUI_CALC)
		interest(1)
	}
	field(EGU,DBF_STRING) {
		prompt("Units Name")
		promptgroup(GUI_DISPLAY)
		interest(1)
		size(16)
	}
	field(PREC,DBF_SHORT) {
		prompt("Display Precision")
		promptgroup(GUI_DISPLAY)
		interest(1)
	}
	field(HOPR,DBF_DOUBLE) {
		prompt("High Operating Rng")
		promptgroup(GUI_DISPLAY)
		interest(1)
	}
	field(LOPR,DBF_DOUBLE) {
		prompt("Low Operating Range")
		promptgroup(GUI_DISPLAY)
		interest(1)
	}
	field(HIHI,DBF_DOUBLE) {
		prompt("Hihi Alarm Limit")
		promptgroup(GUI_ALARMS)
		pp(TRUE)
		interest(1)
	}
	field(LOLO,DBF_DOUBLE) {
		prompt("Lolo Alarm Limit")
		promptgroup(GUI_ALARMS)
		pp(TRUE)
		interest(1)
	}
	field(HIGH,DBF_DOUBLE) {
		prompt("High Alarm Limit")
		promptgroup(GUI_ALARMS)
		pp(TRUE)
		interest(1)
	}
	field(LOW,DBF_DOUBLE) {
		prompt("Low Alarm Limit")
		promptgroup(GUI_ALARMS)
		pp(TRUE)
		interest(1)
	}
	field(HHSV,DBF_MENU) {
		prompt("Hihi Severity")
		promptgroup(GUI_ALARMS)
		pp(TRUE)
		interest(1)
		menu(menuAlarmSevr)
	}
	field(LLSV,DBF_MENU) {
		prompt("Lolo Severity")
		promptgroup(GUI_ALARMS)
		pp(TRUE)
		interest(1)
		menu(menuAlarmSevr)
	}
	field(HSV,DBF_MENU) {
		prompt("High Severity")
		promptgroup(GUI_ALARMS)
		pp(TRUE)
		interest(1)
		menu(menuAlarmSevr)
	}
	field(LSV,DBF_MENU) {
		prompt("Low Severity")
		promptgroup(GUI_ALARMS)
		pp(TRUE)
		interest(1)
		menu(menuAlarmSevr)
	}
	field(HYST,DBF_DOUBLE) {
		prompt("Alarm Deadband")
		promptgroup(GUI_ALARMS)
		interest(1)
	}
	field(ADEL,DBF_DOUBLE) {
		prompt("Archive Deadband")
		promptgroup(GUI_DISPLAY)
		interest(1)
	}
	field(MDEL,DBF_DOUBLE) {
		prompt("Monitor Deadband")
		promptgroup(GUI_DISPLAY)
		interest(1)
	}
	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("Prev Value of A")
		special(SPC_NOMOD)
		interest(3)
	}
	field(LB,DBF_DOUBLE) {
		prompt("Prev Value of B")
		special(SPC_NOMOD)
		interest(3)
	}
	field(LC,DBF_DOUBLE) {
		prompt("Prev Value of C")
		special(SPC_NOMOD)
		interest(3)
	}
	field(LD,DBF_DOUBLE) {
		prompt("Prev Value of D")
		special(SPC_NOMOD)
		interest(3)
	}
	field(LE,DBF_DOUBLE) {
		prompt("Prev Value of E")
		special(SPC_NOMOD)
		interest(3)
	}
	field(LF,DBF_DOUBLE) {
		prompt("Prev Value of F")
		special(SPC_NOMOD)
		interest(3)
	}
	field(LG,DBF_DOUBLE) {
		prompt("Prev Value of G")
		special(SPC_NOMOD)
		interest(3)
	}
	field(LH,DBF_DOUBLE) {
		prompt("Prev Value of H")
		special(SPC_NOMOD)
		interest(3)
	}
	field(LI,DBF_DOUBLE) {
		prompt("Prev Value of I")
		special(SPC_NOMOD)
		interest(3)
	}
	field(LJ,DBF_DOUBLE) {
		prompt("Prev Value of J")
		special(SPC_NOMOD)
		interest(3)
	}
	field(LK,DBF_DOUBLE) {
		prompt("Prev Value of K")
		special(SPC_NOMOD)
		interest(3)
	}
	field(LL,DBF_DOUBLE) {
		prompt("Prev Value of L")
		special(SPC_NOMOD)
		interest(3)
	}
	field(LALM,DBF_DOUBLE) {
		prompt("Last Value Alarmed")
		special(SPC_NOMOD)
		interest(3)
	}
	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)
	}
	%#include "postfix.h"
	field(RPCL,DBF_NOACCESS) {
		prompt("Reverse Polish Calc")
		special(SPC_NOMOD)
		interest(4)
		extra("char	rpcl[INFIX_TO_POSTFIX_SIZE(80)]")
	}
}
