EPICS test database#
To test the program during its development, a test database (test.db) was prepared. The database creates two PVs:
pvMail:trigger
the PV to watch
pvMail:message
the message to be sent
starting: softIoc#
Start the database by adding it to an existing EPIC IOC configuration
or by starting a soft IOC using the softIoc
program softIOC
from EPICS base.
Here is an example of how that looks from a Linux command shell:
1$ softIoc -d test.db
2Starting iocInit
3############################################################################
4## EPICS R3.14.12 $Date: Wed 2010-11-24 14:50:38 -0600$
5## EPICS Base built Feb 27 2011
6############################################################################
7iocRun: All initialization complete
8epics>
Note
Here, the shell prompt is signified by the $
symbol.
watching: camonitor#
Once the EPICS IOC is started and the PVs are available,
it is possible to watch them
for any changes from the command line using the camonitor
camonitor
application from EPICS base:
$ camonitor pvMail:trigger pvMail:message
pvMail:trigger <undefined> off UDF INVALID
pvMail:message <undefined> pvMail default message UDF INVALID
Note
Do not be concerned about the UDF INVALID
notices, they will disappear
once the PVs have been written to at least once.
changing a PV: caput#
You can test changing the value of the trigger PV using the caput
caput
application from EPICS base:
$ caput pvMail:trigger 1
Old : pvMail:trigger off
New : pvMail:trigger on
changing a PV: dbpf (in the IOC shell)#
You can change the value of the trigger PV using the dbpf
dbpf
command in the IOC shell:
$ dbpf("pvMail:trigger", 1)
"on"
$ dbpf("pvMail:trigger", 0)
"off"
test.db#
Here is the full listing of the test EPICS database used for program development.
1# EPICS database to use while testing and developing pvMail.py code
2
3# softIoc -d test.db
4#
5# IOC: softIoc -d test.db
6# client: camonitor pvMail:{trigger,message}
7# pvMail: pvMail.py pvMail:trigger pvMail:message prjemian@gmail.com,jemian@anl.gov
8
9record(bo, "pvMail:trigger")
10{
11 field(DESC, "trigger PV")
12 field(ZNAM, "off")
13 field(ONAM, "on")
14}
15record(stringout, "pvMail:message")
16{
17 field(DESC, "message to be sent by email")
18 field(VAL, "pvMail default message")
19}
20
21
22# Copyright (c) 2009-2024, UChicago Argonne, LLC. See LICENSE file.