# Name of the monitoring application, set by the monitoring application.
record(stringout, "$(S):$(N)") {
        field(DESC, "$(N) Monitor")
        field(PINI, "YES")
	field(VAL,  "$(P)")
}
# Status message set by the monitoring application.
record(stringout, "$(S):$(N)StatusMsg") {
        field(DESC, "$(N) Monitor Status")
        field(PINI, "YES")
	field(VAL,  "")
}
# Heart beat (counter), incremented by monitoring applicaton.
# Program updates count on every cycle - when count is not incremented
# in CountDelay seconds, then status is set to dead.  
# A CountDelay of 0 means program does not update Count.  
record(ao, "$(S):$(N)Count") {
	field(DESC, "$(N) Monitor Count")
	field(PINI, "YES")
	field(DOL,  "0")
	field(MDEL, "-1")
}
# If the alarm monitor does not see a change in Count after this delay, 
# it assumes the monitoring application is dead and
# triggers an alarm. This alarm sets Status to 10.
record(longout, "$(S):$(N)CountDelay") {
	field(DESC, "$(N) Monitor Count Delay")
	field(PINI, "YES")
	field(DOL,  "$(CDLY)")
	field(DRVH, "600")
	field(EGU,  "Sec")
	field(MDEL, "-1")
}
# Changes in Status are accepted into Latch after this delay. 
# This parameter can filter short glitches.
record(longout, "$(S):$(N)LatchDelay") {
	field(DESC, "$(N) Latch  Delay")
	field(PINI, "YES")
	field(DOL,  "$(LDLY)")
	field(DRVH, "120")
	field(EGU,  "Sec")
	field(MDEL, "-1")
}
# Acknowledge button from operator. Acknowledges the current AlarmState.
record(bo, "$(S):$(N)Ack") {
	field(DESC, "$(N) Monitor Ack State")
	field(PINI, "YES")
        field(ZNAM, "UnAcknowledge")
        field(ONAM, "Acknowledge")
}
# Type of acknowledgement.
record(mbbo, "$(S):$(N)AckType") {
	field(DESC, "$(N) Monitor Ack Type")
	field(PINI, "YES")
	field(DOL,  "$(ACKT)")
# Automatically acknowledge all alarms and return-to-normals
        field(ZRST, "Auto Ack")
# Automatically acknowledge when return-to-normals (AlarmStatus going down)
        field(ONST, "Auto Ack RTN")
# User must acknowledge any AlarmStatus change
        field(TWST, "Acknowledge")
}
# Filter alarms dependant on external conditions. 
# Initially, only the SPEAR status will be used. 
# This filter only filters alarms with a Status value of < 10.
record(mbbo, "$(S):$(N)ModeFilter") {
	field(DESC, "$(N) Monitor Mode Filter")
	field(PINI, "YES")
	field(DOL,  "$(MODE)")
# No Filter
        field(ZRST, "None")
# Suppress alarm in DOWN mode
        field(ONST, "Down")
# Suppress alarm in ACCPHY mode
        field(TWST, "AccPhy")
# Suppress alarm in INJECT mode
        field(THST, "Inject")
}
# Audio alarm (on/off). Can be disabled by AudioState = 0. 
# OUT field defines wolf box channel.
record(bo, "$(S):$(N)Audio") {       
	field(DESC, "$(N) Monitor Audio")
	field(DTYP, "Raw Soft Channel")
        field(OUT,  "$(AOUT)")
	    field(DOL,  "0")
        field(ZNAM, "No Alarm")
        field(ONAM, "Alarm")
        field(OSV,  "MAJOR")
    	field(PINI, "YES")		
}
# Disable/Enable audio alarm. 
# (Should not be used by operator but for general configuration purpose only)
record(bo, "$(S):$(N)AudioState") {       
	field(DESC, "$(N) Monitor Audio State")
	field(PINI, "YES")
	field(DOL,  "1")
        field(ZNAM, "Off")
        field(ONAM, "On")
}
# Delay after which (unacknowledged) alarm will be retriggered
# 0 = no repetitive alarms.
record(longout, "$(S):$(N)AudioRepeat") {
	field(DESC, "$(N) Audio Repeat")
	field(PINI, "YES")
	field(DOL,  "$(ARPT)")
	field(DRVH, "300")
	field(EGU,  "Sec")
	field(MDEL, "-1")
}
# Delay after which an alarm (Status > 1 ) sounds the audible alarm.
record(longout, "$(S):$(N)AudioDelay") {
	field(DESC, "$(N) Monitor Audio Delay")
	field(PINI, "YES")
	field(DOL,  "$(ADLY)")
	field(DRVH, "120")
	field(EGU,  "Sec")
	field(MDEL, "-1")
}
# Disable record for use by application.
record(bo, "$(S):$(N)Disable") {
	field(DESC, "$(N) Disable State")
	field(PINI, "YES")
        field(ZNAM, "Enabled")
        field(ONAM, "Disabled")
}
