#*************************************************************************
# 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 is distributed subject to a Software License Agreement found
# in file LICENSE that is included with this distribution. 
#*************************************************************************

=title Waveform Record (waveform)

...

=head2 Record-specific Menus

=head3 Menu waveformPOST

The MPST and APST fields use this menu to determine when to post new value
and archive monitors respectively.

=menu waveformPOST

...

=head2 Parameter Fields

The record-specific fields are described below.

=recordtype waveform

...

=cut

menu(waveformPOST) {
    choice(waveformPOST_Always,"Always")
    choice(waveformPOST_OnChange,"On Change")
}

recordtype(waveform) {

=fields VAL, FTVL, MPST, APST

=cut

	include "dbCommon.dbd" 
	field(VAL,DBF_NOACCESS) {
		prompt("Value")
		asl(ASL0)
		special(SPC_DBADDR)
		pp(TRUE)
		extra("void *		val")
		#=type Set by FTVL
		#=read Yes
		#=write Yes
	}
	field(RARM,DBF_SHORT) {
		prompt("Rearm the waveform")
		promptgroup("30 - Action")
		pp(TRUE)
		interest(1)
	}
	field(PREC,DBF_SHORT) {
		prompt("Display Precision")
		promptgroup("80 - Display")
		interest(1)
		prop(YES)
	}
	field(INP,DBF_INLINK) {
		prompt("Input Specification")
		promptgroup("40 - Input")
		interest(1)
	}
	field(EGU,DBF_STRING) {
		prompt("Engineering Units")
		promptgroup("80 - Display")
		interest(1)
		size(16)
		prop(YES)
	}
	field(HOPR,DBF_DOUBLE) {
		prompt("High Operating Range")
		promptgroup("80 - Display")
		interest(1)
		prop(YES)
	}
	field(LOPR,DBF_DOUBLE) {
		prompt("Low Operating Range")
		promptgroup("80 - Display")
		interest(1)
		prop(YES)
	}
	field(NELM,DBF_ULONG) {
		prompt("Number of Elements")
		promptgroup("30 - Action")
		special(SPC_NOMOD)
		interest(1)
		initial("1")
	}
	field(FTVL,DBF_MENU) {
		prompt("Field Type of Value")
		promptgroup("30 - Action")
		special(SPC_NOMOD)
		interest(1)
		menu(menuFtype)
	}
	field(BUSY,DBF_SHORT) {
		prompt("Busy Indicator")
		special(SPC_NOMOD)
	}
	field(NORD,DBF_ULONG) {
		prompt("Number elements read")
		special(SPC_NOMOD)
	}
	field(BPTR,DBF_NOACCESS) {
		prompt("Buffer Pointer")
		special(SPC_NOMOD)
		interest(4)
		extra("void *		bptr")
	}
	field(SIOL,DBF_INLINK) {
		prompt("Sim Input Specifctn")
		promptgroup("90 - Simulate")
		interest(1)
	}
	field(SIML,DBF_INLINK) {
		prompt("Sim Mode Location")
		promptgroup("90 - Simulate")
		interest(1)
	}
	field(SIMM,DBF_MENU) {
		prompt("Simulation Mode")
		interest(1)
		menu(menuYesNo)
	}
	field(SIMS,DBF_MENU) {
		prompt("Sim mode Alarm Svrty")
		promptgroup("90 - Simulate")
		interest(2)
		menu(menuAlarmSevr)
	}
	field(MPST,DBF_MENU) {
		prompt("Post Value Monitors")
		promptgroup("80 - Display")
		interest(1)
		menu(waveformPOST)
	}
	field(APST,DBF_MENU) {
		prompt("Post Archive Monitors")
		promptgroup("80 - Display")
		interest(1)
		menu(waveformPOST)
	}
	field(HASH,DBF_ULONG) {
		prompt("Hash of OnChange data.")
		interest(3)
	}
}
