Table Of Contents

Previous topic

pvMail: graphical user interface

Next topic

PvMail as a Python package

This Page

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

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
23
24
25
26
27
########### SVN repository information ###################
# $Date: 2011-11-25 20:16:30 -0600 (Fri, 25 Nov 2011) $
# $Author: jemian $
# $Revision: 659 $
# $URL: https://subversion.xor.aps.anl.gov/bcdaext/pvMail/src/PvMail/test.db $
# $Id: test.db 659 2011-11-26 02:16:30Z jemian $
########### SVN repository information ###################

# 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")
}