#*************************************************************************
# 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(pulseTrainCTYP) {
	choice(pulseTrainCTYP_Internal,"Internal")
	choice(pulseTrainCTYP_External,"External")
}
menu(pulseTrainLLOW) {
	choice(pulseTrainLLOW_Logic_Low_0,"Logic Low=0")
	choice(pulseTrainLLOW_Logic_Low_1,"Logic Low=1")
}
menu(pulseTrainCEDG) {
	choice(pulseTrainCEDG_Rising_Edge,"Rising Edge")
	choice(pulseTrainCEDG_Falling_Edge,"Falling Edge")
}
menu(pulseTrainGTYP) {
	choice(pulseTrainGTYP_Hardware,"Hardware")
	choice(pulseTrainGTYP_Software,"Software")
}
menu(pulseTrainSGV) {
	choice(pulseTrainSGV_Inactive,"Inactive")
	choice(pulseTrainSGV_Active,"Active")
}
menu(pulseTrainUNIT) {
	choice(pulseTrainUNIT_Seconds,"Seconds")
	choice(pulseTrainUNIT_Milliseconds,"Milliseconds")
	choice(pulseTrainUNIT_Microseconds,"Microseconds")
	choice(pulseTrainUNIT_Nanoseconds,"Nanoseconds")
	choice(pulseTrainUNIT_Picoseconds,"Picoseconds")
}
recordtype(pulseTrain) {
	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(pulseTrainUNIT)
	}
	field(PER,DBF_DOUBLE) {
		prompt("Pulse Period")
		promptgroup(GUI_PULSE)
		interest(1)
	}
	field(DCY,DBF_DOUBLE) {
		prompt("Duty Cycle %")
		promptgroup(GUI_PULSE)
		interest(1)
	}
	field(OPER,DBF_DOUBLE) {
		prompt("Old pulse Period")
		special(SPC_NOMOD)
		pp(TRUE)
		interest(3)
	}
	field(ODCY,DBF_DOUBLE) {
		prompt("Old duty Cycle %")
		special(SPC_NOMOD)
		pp(TRUE)
		interest(3)
	}
	field(GTYP,DBF_MENU) {
		prompt("Gate Type")
		promptgroup(GUI_PULSE)
		interest(1)
		menu(pulseTrainGTYP)
	}
	field(HGV,DBF_SHORT) {
		prompt("Hardware Gate Value")
		promptgroup(GUI_PULSE)
	}
	field(SGV,DBF_MENU) {
		prompt("Soft Gate Value")
		promptgroup(GUI_PULSE)
		menu(pulseTrainSGV)
	}
	field(SGL,DBF_INLINK) {
		prompt("Soft Gate Location")
		promptgroup(GUI_PULSE)
		interest(1)
	}
	field(OSGV,DBF_USHORT) {
		prompt("Old Soft Gate Value")
		special(SPC_NOMOD)
	}
	field(VAL,DBF_SHORT) {
		prompt("Not Used")
		asl(ASL0)
		pp(TRUE)
	}
	field(CTYP,DBF_MENU) {
		prompt("Clock Type")
		promptgroup(GUI_CLOCK)
		interest(1)
		menu(pulseTrainCTYP)
	}
	field(CEDG,DBF_MENU) {
		prompt("Clock Signal Edge")
		promptgroup(GUI_CLOCK)
		interest(1)
		menu(pulseTrainCEDG)
	}
	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(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(LLOW,DBF_MENU) {
		prompt("Low Logic Level")
		promptgroup(GUI_CLOCK)
		interest(1)
		menu(pulseTrainLLOW)
	}
}
