#*************************************************************************
# 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(pulseDelayCTYP) {
	choice(pulseDelayCTYP_Internal,"Internal")
	choice(pulseDelayCTYP_External,"External")
}
menu(pulseDelayLLOW) {
	choice(pulseDelayLLOW_Logic_Low_0,"Logic Low=0")
	choice(pulseDelayLLOW_Logic_Low_1,"Logic Low=1")
}
menu(pulseDelayCEDG) {
	choice(pulseDelayCEDG_Rising_Edge,"Rising Edge")
	choice(pulseDelayCEDG_Falling_Edge,"Falling Edge")
}
menu(pulseDelayTTYP) {
	choice(pulseDelayTTYP_Hardware,"Hardware")
	choice(pulseDelayTTYP_Software,"Software")
}
menu(pulseDelaySTV) {
	choice(pulseDelaySTV_Disable,"Disable")
	choice(pulseDelaySTV_Enable,"Enable")
}
menu(pulseDelayUNIT) {
	choice(pulseDelayUNIT_Seconds,"Seconds")
	choice(pulseDelayUNIT_Milliseconds,"Milliseconds")
	choice(pulseDelayUNIT_Microseconds,"Microseconds")
	choice(pulseDelayUNIT_Nanoseconds,"Nanoseconds")
	choice(pulseDelayUNIT_Picoseconds,"Picoseconds")
}
menu(pulseDelayVAL) {
	choice(pulseDelayVAL_Inactive,"Inactive")
	choice(pulseDelayVAL_Active,"Active")
}
recordtype(pulseDelay) {
	include "dbCommon.dbd" 
	field(OUT,DBF_OUTLINK) {
		prompt("Output Specification")
		promptgroup(GUI_PULSE)
		interest(1)
	}
	field(UNIT,DBF_MENU) {
		prompt("Delay Time Units")
		promptgroup(GUI_PULSE)
		interest(1)
		menu(pulseDelayUNIT)
	}
	field(DLY,DBF_DOUBLE) {
		prompt("Pulse Delay")
		promptgroup(GUI_PULSE)
		special(SPC_MOD)
		pp(TRUE)
		interest(1)
	}
	field(WIDE,DBF_DOUBLE) {
		prompt("Pulse Width")
		promptgroup(GUI_PULSE)
		special(SPC_MOD)
		pp(TRUE)
		interest(1)
	}
	field(ODLY,DBF_DOUBLE) {
		prompt("Old Pulse Delay")
		special(SPC_NOMOD)
		interest(3)
	}
	field(OWID,DBF_DOUBLE) {
		prompt("Old Pulse Width")
		special(SPC_NOMOD)
		interest(3)
	}
	field(CTYP,DBF_MENU) {
		prompt("Clock Type")
		promptgroup(GUI_CLOCK)
		interest(1)
		menu(pulseDelayCTYP)
	}
	field(CEDG,DBF_MENU) {
		prompt("Clock Signal Edge")
		promptgroup(GUI_CLOCK)
		interest(1)
		menu(pulseDelayCEDG)
	}
	field(ECS,DBF_SHORT) {
		prompt("Ext Clock Source")
		promptgroup(GUI_CLOCK)
		interest(1)
	}
	field(ECR,DBF_DOUBLE) {
		prompt("Ext Clock Rate (HZ)")
		promptgroup(GUI_CLOCK)
		interest(1)
	}
	field(LLOW,DBF_MENU) {
		prompt("Low Logic Level")
		promptgroup(GUI_CLOCK)
		interest(1)
		menu(pulseDelayLLOW)
	}
	field(VAL,DBF_MENU) {
		prompt("Trigger Detect")
		asl(ASL0)
		menu(pulseDelayVAL)
	}
	field(TTYP,DBF_MENU) {
		prompt("Trigger Type")
		promptgroup(GUI_CLOCK)
		interest(1)
		menu(pulseDelayTTYP)
	}
	field(HTS,DBF_ENUM) {
		prompt("Hardware Trigger Src")
		promptgroup(GUI_CLOCK)
		special(SPC_MOD)
		pp(TRUE)
		interest(1)
	}
	field(STL,DBF_INLINK) {
		prompt("Soft Trigger Location")
		promptgroup(GUI_CLOCK)
		interest(1)
	}
	field(STV,DBF_MENU) {
		prompt("Soft Trigger Value")
		promptgroup(GUI_CLOCK)
		special(SPC_MOD)
		pp(TRUE)
		interest(1)
		menu(pulseDelaySTV)
	}
	field(GLNK,DBF_INLINK) {
		prompt("Soft Gate Location")
		promptgroup(GUI_PULSE)
		interest(1)
	}
	field(GATE,DBF_MENU) {
		prompt("Soft Gate Value")
		promptgroup(GUI_PULSE)
		special(SPC_MOD)
		pp(TRUE)
		interest(1)
		menu(pulseDelaySTV)
		initial("Enable")
	}
	field(HOPR,DBF_FLOAT) {
		prompt("High Operating Range")
		promptgroup(GUI_DISPLAY)
		interest(1)
	}
	field(LOPR,DBF_FLOAT) {
		prompt("Low Operating Range")
		promptgroup(GUI_DISPLAY)
		interest(1)
	}
	field(PREC,DBF_SHORT) {
		prompt("Display Precision")
		promptgroup(GUI_DISPLAY)
		interest(1)
	}
	field(PFLD,DBF_USHORT) {
		prompt("Field Processing")
		special(SPC_NOMOD)
		interest(3)
	}
}
