2 ## @file SDTEST-default.proto Default device protocol file
4 ## Make device specific versions based on this (but with a different filename) and place into $(ICPCONFIGROOT)/ioc/SDTEST
5 ## you must implement initDev(), getValue() and setValue() functions
7 ## See http://epics.web.psi.ch/software/streamdevice/doc/
10 ## The terminator for output and input is set in st.cmd via asynOctetSetOutputEos() using the IEOS and OEOS macros
11 ## so do not set in this file, it defaults to CR LF if not specified.
14 ## retrieve a value from the device. Argument $1 is the $(P)$(Q) EPICS DB record prefix,
15 ## and the $(P)$(Q)GETVAL:_OUT PV used by the function containes the string to send which has been populated from the $(GETOUT) macro
16 ## The format of the value returned is contained in $2 passed in via the $(GETIN) macro, typically $2 would be %f or similar
17 ## $1 and $2 need not be used in a custom device protocol file.
19 # ExtraInput = Ignore;
20 out
"%(\$1GETVAL:_OUT.VAL)s"; in
"\$2";
23 ## send a value to the device, argument $1 is the $(P)$(Q) EPICS DB record prefix,
24 ## and the $(P)$(Q)SETVAL:_OUT PV will contain the strings to prefix the value to send from the $(SETOUTA) macro
25 ## $2 is $(SETOUTB) and $3 is $(SETOUTC) to complete the output string
26 ## $4 is the reply format $(SETIN)
27 ## These arguments need not be used in a custome device protocol file.
29 # ExtraInput = Ignore;
30 out
"%(\$1SETVAL:_OUT.VAL)s",$2,
"\$3"; in
"\$4";
33 ## initialise device, argument $1 is the $(P)$(Q) EPICS DB record prefix
34 ## called when PV $(P)$(Q)INIT is written to, but is also called if PINI=YES has been set by the $(INITP) macro
35 ## $(P)$(Q)INIT:_OUT PV used by the function containes the string to send which has been populated from the $(INITOUT) macro
36 ## The format of the value returned is contained in $2 passed in via the $(INITIN) macro
38 # ExtraInput = Ignore;
39 out
"%(\$1INIT:_OUT.VAL)s"; in
"\$2";
setValue()
send a value to the device, argument $1 is the EPICS DB record prefix, and the SETVAL:_OUT PV will c...
getValue()
The terminator for output and input is set in st.cmd via asynOctetSetOutputEos() using the IEOS and O...
initDev()
initialise device, argument $1 is the EPICS DB record prefix called when PV INIT is written to...