cli Module

Source code documentation for EPICS cli

Watch an EPICS PV. Send email when it changes from 0 to 1

class PvMail.cli.PvMail(config=None)[source]

Bases: threading.Thread

Watch an EPICS PV (using PyEpics interface) and send an email when the PV changes from 0 to 1.

basicChecks()[source]

check for valid inputs, raise exceptions as discovered, otherwise no return result

do_restart()[source]

restart watching for triggers

do_start()[source]

start watching for triggers

do_stop()[source]

stop watching for triggers

receiveMessageMonitor(value, **kw)[source]

respond to EPICS CA monitors on message PV

receiveTriggerMonitor(value, **kw)[source]

respond to EPICS CA monitors on trigger PV

testConnect(pvname, timeout=5.0)[source]

create PV, wait for connection, return connection state (True | False)

adapted from PyEpics __createPV() method

PvMail.cli.SendMessage(pvm, agent_db, reporter=None)[source]

construct and send the message

Parameters:pvm (obj) – instance of PvMail object on which to report
PvMail.cli.cli(results, config=None)[source]

command-line interface to the PvMail class

Parameters:
  • results (obj) – default parameters from argparse, see main()
  • config (obj) – email configuration from ini_config.Config()
PvMail.cli.getUserName(db)[source]
PvMail.cli.gui(results, config=None)[source]

graphical user interface to the PvMail class

Parameters:
  • results (obj) – default parameters from argparse, see main()
  • config (obj) – email configuration from ini_config.Config()
PvMail.cli.logger(message)[source]

log a message or report from PvMail

Parameters:message (str) – words to be logged
PvMail.cli.main()[source]

parse command-line arguments and choose which interface to use