use the INSTR environment variable instead of PREFIX

This commit is contained in:
2025-04-29 15:58:32 +02:00
parent d4b111ce6d
commit d81105551d
13 changed files with 202 additions and 184 deletions

View File

@@ -1,31 +1,40 @@
# EPICS Database for streamdevice support for testing functionality specific to
# the 2nd Generation Systems
#
# Macros
# INSTR - Prefix
# NAME - the device name, e.g. DAQV2
# PROTO - Stream device protocol file
# ASYN_PORT - Low level Asyn IP Port to Counterbox
################################################################################
# Testing Commands
# These won't match the values on the machine after a full restart But I chose
# not to force their intialisation as they are only important for testing
record(bo, "$(P):$(NAME):TESTGEN")
record(bo, "$(INSTR)$(NAME):TESTGEN")
{
field(DESC, "Turn on/off Testgen Signal")
field(DTYP, "stream")
field(OUT, "@$(PROTO) switchTestgenOnOff($(P):$(NAME):) $(ASYN_PORT)")
field(OUT, "@$(PROTO) switchTestgenOnOff($(INSTR)$(NAME):) $(ASYN_PORT)")
field(VAL, 0)
field(ZNAM, "OFF")
field(ONAM, "ON")
}
record(longout, "$(P):$(NAME):TESTGEN-LOWRATE")
record(longout, "$(INSTR)$(NAME):TESTGEN-LOWRATE")
{
field(DESC, "Set Minimum Testgen Rate")
field(DTYP, "stream")
field(OUT, "@$(PROTO) setTestSignal($(P):$(NAME):) $(ASYN_PORT)")
field(OUT, "@$(PROTO) setTestSignal($(INSTR)$(NAME):) $(ASYN_PORT)")
field(VAL, 1000)
}
record(longout, "$(P):$(NAME):TESTGEN-HIGHRATE")
record(longout, "$(INSTR)$(NAME):TESTGEN-HIGHRATE")
{
field(DESC, "Set Maximum Testgen Rate")
field(DTYP, "stream")
field(OUT, "@$(PROTO) setTestSignal($(P):$(NAME):) $(ASYN_PORT)")
field(OUT, "@$(PROTO) setTestSignal($(INSTR)$(NAME):) $(ASYN_PORT)")
field(VAL, 1000)
}