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
2
3
4
5
6
7
8
$ softIoc -d test.db
Starting iocInit
############################################################################
## EPICS R3.14.12 $Date: Wed 2010-11-24 14:50:38 -0600$
## EPICS Base built Feb 27 2011
############################################################################
iocRun: All initialization complete
epics>

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
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
# EPICS database to use while testing and developing pvMail.py code

#  /APSshare/epics/base-3.14.12.1/bin/linux-x86-el5-debug/softIoc -d test.db
#
#  IOC:     softIoc -d test.db
#  client:  camonitor pvMail:{trigger,message}
#  pvMail:  pvMail.py  pvMail:trigger pvMail:message prjemian@gmail.com,jemian@anl.gov

record(bo, "pvMail:trigger")
{
	field(DESC, "trigger PV")
	field(ZNAM, "off")
	field(ONAM, "on")
}
record(stringout, "pvMail:message")
{
	field(DESC, "message to be sent by email")
	field(VAL,  "pvMail default message")
}


# Copyright (c) 2014, UChicago Argonne, LLC.  See LICENSE file.