From d0f2cd1e6fdccb07656a36634ff535ca20b3abbf Mon Sep 17 00:00:00 2001 From: Pete R Jemian Date: Fri, 16 Aug 2024 14:58:14 -0500 Subject: [PATCH] PKG and STY CRLF -> LF --- README.md | 2 +- docs/source/command_line.rst | 590 +++++++++++++++--------------- docs/source/gui.rst | 122 +++--- docs/source/index.rst | 2 +- docs/source/info.rst | 2 +- docs/source/pvMail/cli.rst | 20 +- docs/source/pvMail/ini_config.rst | 436 +++++++++++----------- docs/source/pvMail/mailer.rst | 2 +- docs/source/pvMail/uic_gui.rst | 25 +- pyproject.toml | 14 +- src/PvMail/LICENSE | 96 ++--- src/PvMail/__init__.py | 22 +- src/PvMail/resources/about.ui | 216 +++++------ src/PvMail/resources/gui.ui | 514 +++++++++++++------------- src/PvMail/test.db | 46 +-- 15 files changed, 1054 insertions(+), 1055 deletions(-) diff --git a/README.md b/README.md index 77bc1e6..af9cc37 100644 --- a/README.md +++ b/README.md @@ -9,6 +9,6 @@ tag | release | PyPI | conda - copyright: (c) 2009-2024, UChicago Argonne, LLC - license: [ANL OPEN SOURCE LICENSE](./src/PvMail/LICENSE) -- documentation: [https://prjemian.github.io/pvMail/](https://prjemian.github.io/pvMail/) +- documentation: [https://BCDA-APS.github.io/pvMail/](https://BCDA-APS.github.io/pvMail/) - source: [https://github.com/BCDA-APS/pvMail](https://github.com/BCDA-APS/pvMail) - authors: Pete R. Jemian, Kurt Goetze \ No newline at end of file diff --git a/docs/source/command_line.rst b/docs/source/command_line.rst index 5a33868..5a1f13e 100644 --- a/docs/source/command_line.rst +++ b/docs/source/command_line.rst @@ -1,295 +1,295 @@ -.. _cli: - -pvMail: command-line interface -============================== - -Basically, you use it either as a background daemon or as a GUI. Call -it with a ``-g`` or ``--gui`` command line option to force the GUI to run, -otherwise you get the background daemon. Either way, it makes a log -file (based on PID number) with any program output. - -.. index:: example - -background daemon:: - - pvMail triggerPV messagePV user1@email.domain,user2@host.server & - -GUI:: - - pvMail triggerPV messagePV user1@email.domain,user2@host.server -g & - -.. tip:: - Since *PvMail* creates a log file (by default in the current working directory), - be sure you start the program from a directory to which you have write - access or specify the absolute path to the log file as a command line - argument:: - - pvMail -l /path/to/log_file.txt triggerPV messagePV user1@email.domain & - - -Starting PvMail -+++++++++++++++ - - -Starting PvMail from the command-line -------------------------------------- - -.. index:: example - -PvMail is started from the command line:: - - $ pvMail pvMail:trigger pvMail:message jemian - -.. index:: log file - -No program output is printed to the screen. Instead, the output is directed -to a log file. Here is an example:: - - INFO:root:(pvMail.py,2011-11-27 19:03:23.072392) ############################################################ - INFO:root:(pvMail.py,2011-11-27 19:03:23.072826) startup - INFO:root:(pvMail.py,2011-11-27 19:03:23.072897) trigger PV = pvMail:trigger - INFO:root:(pvMail.py,2011-11-27 19:03:23.073323) message PV = pvMail:message - INFO:root:(pvMail.py,2011-11-27 19:03:23.073401) email list = ['jemian'] - INFO:root:(pvMail.py,2011-11-27 19:03:23.073463) log file = logfile.log - INFO:root:(pvMail.py,2011-11-27 19:03:23.073667) logging interval = 5.0 - INFO:root:(pvMail.py,2011-11-27 19:03:23.073735) sleep duration = 0.2 - INFO:root:(pvMail.py,2011-11-27 19:03:23.073795) interface = command-line - INFO:root:(pvMail.py,2011-11-27 19:03:23.073855) user = jemian - INFO:root:(pvMail.py,2011-11-27 19:03:23.073952) host = como-ubuntu64 - INFO:root:(pvMail.py,2011-11-27 19:03:23.074053) program = ./pvMail.py - INFO:root:(pvMail.py,2011-11-27 19:03:23.074124) PID = 8903 - INFO:root:(pvMail.py,2011-11-27 19:03:23.074196) do_start - INFO:root:(pvMail.py,2011-11-27 19:03:23.074280) test connect with pvMail:message - INFO:root:(pvMail.py,2011-11-27 19:03:23.445334) test connect with pvMail:trigger - INFO:root:(pvMail.py,2011-11-27 19:03:23.468540) passed basicChecks(), starting monitors - INFO:root:(pvMail.py,2011-11-27 19:03:23.477917) checkpoint - INFO:root:(pvMail.py,2011-11-27 19:03:27.373142) pvMail:trigger = 1 - INFO:root:(pvMail.py,2011-11-27 19:03:27.373908) SendMessage - INFO:root:(pvMail.py,2011-11-27 19:03:27.374199) sending email to: jemian - INFO:root:(pvMail.py,2011-11-27 19:03:27.374716) mail -s "pvMail.py: pvMail:trigger" jemian < /tmp/pvmail_message.txt - INFO:root:(pvMail.py,2011-11-27 19:03:27.538022) message(s) sent - INFO:root:(pvMail.py,2011-11-27 19:03:28.092551) checkpoint - INFO:root:(pvMail.py,2011-11-27 19:03:29.440516) pvMail:trigger = 0 - -The program starts, reports its configurations, and connects with the -EPICS PVs, and then goes into a background mode. A checkpoint (command-line -option ``-i``) is reported periodically. The default is 5 seconds. This may -be changed to 10 minutes or longer for production use, but is always -specified in seconds. - -Observe that, in the above example, the trigger PV changed from 0 to 1 at -19:03:27.373142 (and back to 0 at 19:03:29.440516). -The change at ~19:03:27 triggered PvMail to send an email as configured. -For now, the code writes the text of the email to a temporary file -(command-line option ``-m``, default is "/tmp/pvmail_message.txt"). -In this example, the message reads:: - - pvMail default message - - user: jemian - host: como-ubuntu64 - date: 2011-11-27 19:03:27.374135 - program: ./pvMail.py - PID: 8903 - trigger PV: pvMail:trigger - message PV: pvMail:message - recipients: jemian - -The message shows up in the mail browser (here my Linux ``mail`` program):: - - jemian@como-ubuntu64$ mail - Mail version 8.1.2 01/15/2001. Type ? for help. - "/var/mail/jemian": 3 messages 3 new - >N 1 jemian@como-ubunt Sun Nov 27 18:27 25/730 pvMail.py: pvMail:trigger - N 2 jemian@como-ubunt Sun Nov 27 18:58 25/730 pvMail.py: pvMail:trigger - N 3 jemian@como-ubunt Sun Nov 27 19:03 25/730 pvMail.py: pvMail:trigger - -.. index:: email - -The full message, as seen in the mail browser is:: - - Message 3: - From jemian@como-ubuntu64 Sun Nov 27 19:03:27 2011 - Envelope-to: jemian@como-ubuntu64 - Delivery-date: Sun, 27 Nov 2011 19:03:27 -0600 - To: jemian@como-ubuntu64 - Subject: pvMail.py: pvMail:trigger - From: Pete R Jemian - Date: Sun, 27 Nov 2011 19:03:27 -0600 - - pvMail default message - - user: jemian - host: como-ubuntu64 - date: 2011-11-27 19:03:27.374135 - program: ./pvMail.py - PID: 8903 - trigger PV: pvMail:trigger - message PV: pvMail:message - recipients: jemian - -Starting PvMail from the command-line at the APS ------------------------------------------------- - -At the APS, Enthought Python Distribution is installed on the /APSshare partition -available to all beam lines. - -.. index:: example - -Here is a command to run PvMail and get the help message:: - - /APSshare/epd/rh5-x86_64/bin/pvMail -h - -or the 32-bit version:: - - /APSshare/epd/rh5-x86/bin/pvMail -h - -.. note:: - Support at APS for both RHEL5 and RHEL6 use the same Enthought Python Distribution. - - - -command-line parameters -+++++++++++++++++++++++ - -.. index:: command-line - -.. index:: usage - -usage ------ - -.. index:: example - -When PvMail is started from the command line with no additional parameters:: - - $ pvMail - - usage: pvMail [-h] [-l LOG_FILE] [-i LOGGING_INTERVAL] - [-r SLEEP_DURATION] [-g] [-v] - trigger_PV message_PV email_addresses - pvMail: error: too few arguments - -This is the *usage* message. -It tells us we must supply three :index:`positional arguments`: -``trigger_PV message_PV email_addresses``. - -positional argument: ``trigger_PV`` -------------------------------------- - -EPICS process variable name to watch using a CA monitor. -When ``trigger_PV`` makes a transition from 0 (zero) to 1 (one), -then get the string from the ``message_PV`` and send an email -to all of the ``email_addresses`` on the list. - -positional argument: ``message_PV`` -------------------------------------- - -EPICS process variable name pointing to a (short) message that will -be used as the first part of the email message to be sent. - -.. Can this be a waveform of char acting as a string? Probably but test it. - -positional argument: ``email_addresses`` ----------------------------------------- - -List of email addresses, separated by commas if more than one. For example, -``user1@email.domain,user2@host.server`` will send one email to -``user1@email.domain`` and another email to ``user2@host.server``. - -.. index:: email to a pager at APS - -.. note:: - At Argonne, it is possible to send email to a pager using - the email address ``####@pager.anl.gov`` and the pager number. - Be sure not to use a preceding ``4-`` or the email will not be - deliverable. - -.. index:: optional arguments - -option: ``--version`` or ``-v`` ------------------------------------ - -The current version of the program can always be printed using the -``-v`` or ``--version``. With this option, the program prints -the version number and then quits. - -:: - - $ pvMail --version - 3.0-663 - -option: ``--help`` or ``-h`` ------------------------------------ - -It may be easier to review the short help instructions for command-line options:: - - $ ./pvMail --help - usage: pvMail [-h] [-l LOG_FILE] [-i LOGGING_INTERVAL] - [-r SLEEP_DURATION] [-g] [-v] - trigger_PV message_PV email_addresses - - Watch an EPICS PV. Send email when it changes from 0 to 1. - - positional arguments: - trigger_PV EPICS trigger PV name - message_PV EPICS message PV name - email_addresses email address(es), comma-separated if more than one - - optional arguments: - -h, --help show this help message and exit - -l LOG_FILE for logging program progress and comments - -i LOGGING_INTERVAL checkpoint reporting interval (s) in log file - -r SLEEP_DURATION sleep duration (s) in main event loop - -g, --gui Use the graphical rather than command-line interface - -v, --version show program's version number and exit - -option: ``--gui`` or ``-g`` ------------------------------------ - -This command line option is used to start the GUI (see :ref:`GUI`). -If either GUI option is used, then the positional arguments -(``triggerPV messagePV email@address``) are optional. - -option: ``-l LOG_FILE`` ------------------------------------ - -Both the command-line and GUI versions of PvMail log all -program output to a log file. If a LOG_FILE is not specified on the command -line, the default file will be ``pvMail-PID.log`` in the current directory -where *PID* is the process identifier of the running ``pvMail`` program. - -.. note:: - If the LOG_FILE already exists, new information will be appended. - It is up to the account owner to delete a LOG_FILE when it is no - longer useful. - -The PID number is useful when you wish to end a program that is running -as a background daemon. The UNIX/Linux command is:: - - kill PID - -option: ``-i LOGGING_INTERVAL`` ------------------------------------ - -:units: seconds - -When a program runs in the background, waiting for occasional activity, -there is often some concern that the program is actually prepared to act -when needed. To offset this concern, PvMail will report a -*checkpoint* message periodically (every LOGGING_INTERVAL seconds, -default is every 5 minutes) to the LOG_FILE. The program ensures that -LOGGING_INTERVAL is no shorter than 5 seconds or longer than 1 hour. - -option: ``-r SLEEP_DURATION`` ------------------------------------ - -:units: seconds - -For operation as a background daemon process, the command-line version -must check periodically for new EPICS CA events, using a call to -:meth:`epics.ca.poll()`. In between calls, the application is told to sleep -for SLEEP_DURATION seconds. The default SLEEP_DURATION is 0.2 seconds and -is limited to values between 0.1 ms and 5 s. - - +.. _cli: + +pvMail: command-line interface +============================== + +Basically, you use it either as a background daemon or as a GUI. Call +it with a ``-g`` or ``--gui`` command line option to force the GUI to run, +otherwise you get the background daemon. Either way, it makes a log +file (based on PID number) with any program output. + +.. index:: example + +background daemon:: + + pvMail triggerPV messagePV user1@email.domain,user2@host.server & + +GUI:: + + pvMail triggerPV messagePV user1@email.domain,user2@host.server -g & + +.. tip:: + Since *PvMail* creates a log file (by default in the current working directory), + be sure you start the program from a directory to which you have write + access or specify the absolute path to the log file as a command line + argument:: + + pvMail -l /path/to/log_file.txt triggerPV messagePV user1@email.domain & + + +Starting PvMail ++++++++++++++++ + + +Starting PvMail from the command-line +------------------------------------- + +.. index:: example + +PvMail is started from the command line:: + + $ pvMail pvMail:trigger pvMail:message jemian + +.. index:: log file + +No program output is printed to the screen. Instead, the output is directed +to a log file. Here is an example:: + + INFO:root:(pvMail.py,2011-11-27 19:03:23.072392) ############################################################ + INFO:root:(pvMail.py,2011-11-27 19:03:23.072826) startup + INFO:root:(pvMail.py,2011-11-27 19:03:23.072897) trigger PV = pvMail:trigger + INFO:root:(pvMail.py,2011-11-27 19:03:23.073323) message PV = pvMail:message + INFO:root:(pvMail.py,2011-11-27 19:03:23.073401) email list = ['jemian'] + INFO:root:(pvMail.py,2011-11-27 19:03:23.073463) log file = logfile.log + INFO:root:(pvMail.py,2011-11-27 19:03:23.073667) logging interval = 5.0 + INFO:root:(pvMail.py,2011-11-27 19:03:23.073735) sleep duration = 0.2 + INFO:root:(pvMail.py,2011-11-27 19:03:23.073795) interface = command-line + INFO:root:(pvMail.py,2011-11-27 19:03:23.073855) user = jemian + INFO:root:(pvMail.py,2011-11-27 19:03:23.073952) host = como-ubuntu64 + INFO:root:(pvMail.py,2011-11-27 19:03:23.074053) program = ./pvMail.py + INFO:root:(pvMail.py,2011-11-27 19:03:23.074124) PID = 8903 + INFO:root:(pvMail.py,2011-11-27 19:03:23.074196) do_start + INFO:root:(pvMail.py,2011-11-27 19:03:23.074280) test connect with pvMail:message + INFO:root:(pvMail.py,2011-11-27 19:03:23.445334) test connect with pvMail:trigger + INFO:root:(pvMail.py,2011-11-27 19:03:23.468540) passed basicChecks(), starting monitors + INFO:root:(pvMail.py,2011-11-27 19:03:23.477917) checkpoint + INFO:root:(pvMail.py,2011-11-27 19:03:27.373142) pvMail:trigger = 1 + INFO:root:(pvMail.py,2011-11-27 19:03:27.373908) SendMessage + INFO:root:(pvMail.py,2011-11-27 19:03:27.374199) sending email to: jemian + INFO:root:(pvMail.py,2011-11-27 19:03:27.374716) mail -s "pvMail.py: pvMail:trigger" jemian < /tmp/pvmail_message.txt + INFO:root:(pvMail.py,2011-11-27 19:03:27.538022) message(s) sent + INFO:root:(pvMail.py,2011-11-27 19:03:28.092551) checkpoint + INFO:root:(pvMail.py,2011-11-27 19:03:29.440516) pvMail:trigger = 0 + +The program starts, reports its configurations, and connects with the +EPICS PVs, and then goes into a background mode. A checkpoint (command-line +option ``-i``) is reported periodically. The default is 5 seconds. This may +be changed to 10 minutes or longer for production use, but is always +specified in seconds. + +Observe that, in the above example, the trigger PV changed from 0 to 1 at +19:03:27.373142 (and back to 0 at 19:03:29.440516). +The change at ~19:03:27 triggered PvMail to send an email as configured. +For now, the code writes the text of the email to a temporary file +(command-line option ``-m``, default is "/tmp/pvmail_message.txt"). +In this example, the message reads:: + + pvMail default message + + user: jemian + host: como-ubuntu64 + date: 2011-11-27 19:03:27.374135 + program: ./pvMail.py + PID: 8903 + trigger PV: pvMail:trigger + message PV: pvMail:message + recipients: jemian + +The message shows up in the mail browser (here my Linux ``mail`` program):: + + jemian@como-ubuntu64$ mail + Mail version 8.1.2 01/15/2001. Type ? for help. + "/var/mail/jemian": 3 messages 3 new + >N 1 jemian@como-ubunt Sun Nov 27 18:27 25/730 pvMail.py: pvMail:trigger + N 2 jemian@como-ubunt Sun Nov 27 18:58 25/730 pvMail.py: pvMail:trigger + N 3 jemian@como-ubunt Sun Nov 27 19:03 25/730 pvMail.py: pvMail:trigger + +.. index:: email + +The full message, as seen in the mail browser is:: + + Message 3: + From jemian@como-ubuntu64 Sun Nov 27 19:03:27 2011 + Envelope-to: jemian@como-ubuntu64 + Delivery-date: Sun, 27 Nov 2011 19:03:27 -0600 + To: jemian@como-ubuntu64 + Subject: pvMail.py: pvMail:trigger + From: Pete R Jemian + Date: Sun, 27 Nov 2011 19:03:27 -0600 + + pvMail default message + + user: jemian + host: como-ubuntu64 + date: 2011-11-27 19:03:27.374135 + program: ./pvMail.py + PID: 8903 + trigger PV: pvMail:trigger + message PV: pvMail:message + recipients: jemian + +Starting PvMail from the command-line at the APS +------------------------------------------------ + +At the APS, Enthought Python Distribution is installed on the /APSshare partition +available to all beam lines. + +.. index:: example + +Here is a command to run PvMail and get the help message:: + + /APSshare/epd/rh5-x86_64/bin/pvMail -h + +or the 32-bit version:: + + /APSshare/epd/rh5-x86/bin/pvMail -h + +.. note:: + Support at APS for both RHEL5 and RHEL6 use the same Enthought Python Distribution. + + + +command-line parameters ++++++++++++++++++++++++ + +.. index:: command-line + +.. index:: usage + +usage +----- + +.. index:: example + +When PvMail is started from the command line with no additional parameters:: + + $ pvMail + + usage: pvMail [-h] [-l LOG_FILE] [-i LOGGING_INTERVAL] + [-r SLEEP_DURATION] [-g] [-v] + trigger_PV message_PV email_addresses + pvMail: error: too few arguments + +This is the *usage* message. +It tells us we must supply three :index:`positional arguments`: +``trigger_PV message_PV email_addresses``. + +positional argument: ``trigger_PV`` +------------------------------------- + +EPICS process variable name to watch using a CA monitor. +When ``trigger_PV`` makes a transition from 0 (zero) to 1 (one), +then get the string from the ``message_PV`` and send an email +to all of the ``email_addresses`` on the list. + +positional argument: ``message_PV`` +------------------------------------- + +EPICS process variable name pointing to a (short) message that will +be used as the first part of the email message to be sent. + +.. Can this be a waveform of char acting as a string? Probably but test it. + +positional argument: ``email_addresses`` +---------------------------------------- + +List of email addresses, separated by commas if more than one. For example, +``user1@email.domain,user2@host.server`` will send one email to +``user1@email.domain`` and another email to ``user2@host.server``. + +.. index:: email to a pager at APS + +.. note:: + At Argonne, it is possible to send email to a pager using + the email address ``####@pager.anl.gov`` and the pager number. + Be sure not to use a preceding ``4-`` or the email will not be + deliverable. + +.. index:: optional arguments + +option: ``--version`` or ``-v`` +----------------------------------- + +The current version of the program can always be printed using the +``-v`` or ``--version``. With this option, the program prints +the version number and then quits. + +:: + + $ pvMail --version + 3.0-663 + +option: ``--help`` or ``-h`` +----------------------------------- + +It may be easier to review the short help instructions for command-line options:: + + $ ./pvMail --help + usage: pvMail [-h] [-l LOG_FILE] [-i LOGGING_INTERVAL] + [-r SLEEP_DURATION] [-g] [-v] + trigger_PV message_PV email_addresses + + Watch an EPICS PV. Send email when it changes from 0 to 1. + + positional arguments: + trigger_PV EPICS trigger PV name + message_PV EPICS message PV name + email_addresses email address(es), comma-separated if more than one + + optional arguments: + -h, --help show this help message and exit + -l LOG_FILE for logging program progress and comments + -i LOGGING_INTERVAL checkpoint reporting interval (s) in log file + -r SLEEP_DURATION sleep duration (s) in main event loop + -g, --gui Use the graphical rather than command-line interface + -v, --version show program's version number and exit + +option: ``--gui`` or ``-g`` +----------------------------------- + +This command line option is used to start the GUI (see :ref:`GUI`). +If either GUI option is used, then the positional arguments +(``triggerPV messagePV email@address``) are optional. + +option: ``-l LOG_FILE`` +----------------------------------- + +Both the command-line and GUI versions of PvMail log all +program output to a log file. If a LOG_FILE is not specified on the command +line, the default file will be ``pvMail-PID.log`` in the current directory +where *PID* is the process identifier of the running ``pvMail`` program. + +.. note:: + If the LOG_FILE already exists, new information will be appended. + It is up to the account owner to delete a LOG_FILE when it is no + longer useful. + +The PID number is useful when you wish to end a program that is running +as a background daemon. The UNIX/Linux command is:: + + kill PID + +option: ``-i LOGGING_INTERVAL`` +----------------------------------- + +:units: seconds + +When a program runs in the background, waiting for occasional activity, +there is often some concern that the program is actually prepared to act +when needed. To offset this concern, PvMail will report a +*checkpoint* message periodically (every LOGGING_INTERVAL seconds, +default is every 5 minutes) to the LOG_FILE. The program ensures that +LOGGING_INTERVAL is no shorter than 5 seconds or longer than 1 hour. + +option: ``-r SLEEP_DURATION`` +----------------------------------- + +:units: seconds + +For operation as a background daemon process, the command-line version +must check periodically for new EPICS CA events, using a call to +:meth:`epics.ca.poll()`. In between calls, the application is told to sleep +for SLEEP_DURATION seconds. The default SLEEP_DURATION is 0.2 seconds and +is limited to values between 0.1 ms and 5 s. + + diff --git a/docs/source/gui.rst b/docs/source/gui.rst index 8435ac9..ef4f153 100644 --- a/docs/source/gui.rst +++ b/docs/source/gui.rst @@ -1,61 +1,61 @@ - -.. _GUI: - -pvMail: graphical user interface -################################ - -.. index:: example - -The *PvMail* program GUI is started from the command line with the ``-g`` -or ``--gui`` command-line options. -If either GUI option is used, then the positional arguments -(``triggerPV messagePV email@address``) are optional. -Without either GUI option, the -command-line interface is started.:: - - $ pvMail -g & - -.. tip:: - Usually, you want to run the GUI as a background task by appending - the ampersand (``&``) on the command line, as shown above. - -.. figure:: gui.png - - GUI of the *PvMail* application - -The GUI provides editable text entry widgets for each of the required -command-line terms (a.k.a. *positional arguments*): -``trigger_PV message_PV email_addresses``. -The list of email addresses is separated. The GUI provides a tool -to add additional address or remove addresses. - -The GUI also shows (using *running* or *stopped* text) whether or not -the PV monitor process is running. - -.. warning:: - If either of the PVs fail to connect, it is likely that the GUI may - become confused whether or not it is running. In such cases, press - the *Stop* button, then press the *Run* button to try to restart monitoring. - -All *PvMail* monitoring will be stopped if the GUI window is closed. -At present, there is no feature to detach or reattach a monitor set. -Also, *PvMail* can only monitor a single set of PVs using the current design. -A request to enhance this capability is on the TODO list (see :ref:`TODO`). - -At the bottom of the GUI panel, a status log is shown. -These are the contents of the log file. - -.. tip:: - Since *PvMail* creates a log file (by default in the current working directory), - be sure you start the program from a directory to which you have write - access or specify the absolute path to the log file as a command line - argument:: - - pvMail -g -l /path/to/log_file.txt & - -Send test email -*************** - -Under the *File* menu, there is an item to ``send test email`` which attenpts -to send a test email using the current settings as described in the configuration -file. + +.. _GUI: + +pvMail: graphical user interface +################################ + +.. index:: example + +The *PvMail* program GUI is started from the command line with the ``-g`` +or ``--gui`` command-line options. +If either GUI option is used, then the positional arguments +(``triggerPV messagePV email@address``) are optional. +Without either GUI option, the +command-line interface is started.:: + + $ pvMail -g & + +.. tip:: + Usually, you want to run the GUI as a background task by appending + the ampersand (``&``) on the command line, as shown above. + +.. figure:: gui.png + + GUI of the *PvMail* application + +The GUI provides editable text entry widgets for each of the required +command-line terms (a.k.a. *positional arguments*): +``trigger_PV message_PV email_addresses``. +The list of email addresses is separated. The GUI provides a tool +to add additional address or remove addresses. + +The GUI also shows (using *running* or *stopped* text) whether or not +the PV monitor process is running. + +.. warning:: + If either of the PVs fail to connect, it is likely that the GUI may + become confused whether or not it is running. In such cases, press + the *Stop* button, then press the *Run* button to try to restart monitoring. + +All *PvMail* monitoring will be stopped if the GUI window is closed. +At present, there is no feature to detach or reattach a monitor set. +Also, *PvMail* can only monitor a single set of PVs using the current design. +A request to enhance this capability is on the TODO list (see :ref:`TODO`). + +At the bottom of the GUI panel, a status log is shown. +These are the contents of the log file. + +.. tip:: + Since *PvMail* creates a log file (by default in the current working directory), + be sure you start the program from a directory to which you have write + access or specify the absolute path to the log file as a command line + argument:: + + pvMail -g -l /path/to/log_file.txt & + +Send test email +*************** + +Under the *File* menu, there is an item to ``send test email`` which attenpts +to send a test email using the current settings as described in the configuration +file. diff --git a/docs/source/index.rst b/docs/source/index.rst index 500f383..d5f49da 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -36,7 +36,7 @@ About :email: jemian@anl.gov :copyright: 2009-2024, UChicago Argonne, LLC :license: ANL OPEN SOURCE LICENSE (see *LICENSE*) -:docs: https://prjemian.github.io/pvMail/ +:docs: https://BCDA-APS.github.io/pvMail/ :git: https://github.com/BCDA-APS/pvMail :PyPI: https://pypi.python.org/pypi/PvMail :version: |version| diff --git a/docs/source/info.rst b/docs/source/info.rst index 64b0955..307dd5a 100644 --- a/docs/source/info.rst +++ b/docs/source/info.rst @@ -42,7 +42,7 @@ Documentation for the PvMail project, maintained using Sphinx (http://www.sphinx-doc.org), is available from: -* https://prjemian.github.io/pvMail +* https://BCDA-APS.github.io/pvMail .. index:: TODO items diff --git a/docs/source/pvMail/cli.rst b/docs/source/pvMail/cli.rst index 288998e..0c513a0 100644 --- a/docs/source/pvMail/cli.rst +++ b/docs/source/pvMail/cli.rst @@ -1,10 +1,10 @@ - -:mod:`cli` Module -================= - -Source code documentation for EPICS :mod:`cli` - -.. automodule:: PvMail.cli - :members: - :undoc-members: - :show-inheritance: + +:mod:`cli` Module +================= + +Source code documentation for EPICS :mod:`cli` + +.. automodule:: PvMail.cli + :members: + :undoc-members: + :show-inheritance: diff --git a/docs/source/pvMail/ini_config.rst b/docs/source/pvMail/ini_config.rst index 88fc1c9..120fcb3 100644 --- a/docs/source/pvMail/ini_config.rst +++ b/docs/source/pvMail/ini_config.rst @@ -1,218 +1,218 @@ - -.. _ini_config: - - -:mod:`ini_config` Module -######################## - -Application defaults are stored in a file compatible with -:class:`ConfigParser.Config`. This file is to be stored in -a *secure* location such that it is accessible and readable -only to the account user (to the extent possible on the -operating system). - -.. index:: configuration file; default path - -The application configuration settings file *pvMail.ini* -is stored in a directory that depends on the operating system, -as selected by the :attr:`os.name` value, as shown in this table: - -=============== ======================================= -:attr:`os.name` path -=============== ======================================= -*posix* ``*$HOST/.pvMail/pvMail.ini*`` -*nt* ``*%APPDATA%\\\\pvMail\\\\pvMail.ini*`` -=============== ======================================= - -The user can override this path by defining the -**PVMAIL_INI_FILE** environment variable to point -to the desired application configuration settings file. -This definition must be made before the call to -:class:`PvMail.ini_config.Config`. - -.. index:: configuration file; create new file as template - -If the application configuration settings file does not exist, -a default one will be created on the first call to -:class:`PvMail.ini_config.Config`. This default configuration file -is only a template and **must be modified** with the user's settings -before email can be sent successfully. - -OBJECTIVE -********* - -The main reason why an application configuration settings file -is needed is to supply the configuration to send email from -:mod:`PvMail.pvMail` through an SMTP server. - -.. index:: configuration file; default - -example application configuration settings (``pvMail.ini``) file: - -.. literalinclude:: ../../../src/PvMail/pvMail.ini - :tab-width: 4 - :linenos: - :language: guess - - -OVERVIEW -******** - -.. index:: configuration file; overview - -The :class:`PvMail.ini_config.Config` class reads the entire contents -of the application configuration settings file and copies that to -a dictionary in the class: *self.agent_db*. Each of the sections in the file -(such as *SMTP*, *sendmail*) comprise subdictionaries with *key = value* content. -The *header* section contains metadata about the file and is not read. -The *mailer* section has a key *mail_transfer_agent* that indicates -which mail transport agent [#]_ will be used to send the email. -Current choices available are: *SMTP* or *sendmail* (supported on Linux only). - -.. [#] MTA: https://en.wikipedia.org/wiki/Message_transfer_agent - -Comments in the application configuration settings file will be ignored -and will not be written back to the file if the file is rewritten -from :meth:`ini_config.Config.write`. A tricky way to preserve -*comment* information is to write the comment as if it were a variable -to be set inside a section, or possible an entire section. Such as: - -.. index:: SMTP - -.. code-block:: guess - :linenos: - - [SMTP] - server = smtp.mycompany.com - user = j.o.e.user@mycompany.com - password = keep_this_private - hint = comment: use your email as "user" name - -or: - -.. code-block:: guess - :linenos: - - [comment] - comment_2 = this is also a comment - -It is possible to define other sections, such as to preserve the content -of two different SMTP configurations. For example: - -.. index:: configuration file; example - -.. code-block:: ini - :linenos: - - [header] - application = pvMail - written = 2014-11-09 11:47:47.709000 - - [mailer] - mail_transfer_agent = SMTP - - [SMTP] - server = smtp.mycompany.com - user = j.o.e.user - password = keep_this_private - port = 465 - connection_security = STARTTLS - - [work-SMTP] - server = smtp.mycompany.com - user = j.o.e.user - password = keep_this_private - port = 465 - connection_security = STARTTLS - - [gmail-SMTP] - server = smtp.googlemail.com - user = joeuser@gmail.com - hint = use your gmail account as "user" name - password = keep_this_private - port = 587 - authentication = Normal password - connection_security = STARTTLS - - [sendmail] - user = joeuser - -To manage between multiple *SMTP* configurations, -copy the settings from the desired section and replace -the content of the *SMTP* section. The above example -is configured for the work email SMTP server. - -KEYWORDS -******** - -.. index:: configuration file; keywords - -These keywords (exact spelling) are recognized (others are ignored): - -:server: IP name or address of email server -:user: username accepted by *server* to send an email -:password: (optional) if required by SMTP server -:port: port number to be used -:authentication: ``Normal password`` -:connection_security: ``STARTTLS`` (SSL/TLS is not available via smtplib) - -WRITING THE CONFIGURATION FILE -****************************** - -Under normal use, the application configuration settings file -is only read. It is possible to create a new configuration -file (in the default location) by running the -:mod:`PvMail.ini_config` program directly from the command line. -A new file will be created if none existed. -If the file already exists, it will not be modified. -The only output from this program will be the absolute path name -to the application configuration settings file. - -It is possible to edit this file with any text editor. - -.. tip:: It is advised to set the permissions on the - application configuration settings file so that only the - owner can read the file (owner: read+write). - One way to do this on a linux system: - - .. code-block:: bash - :linenos: - - $ /path/to/PvMail/ini_config.py - /home/joeuser/.pvMail/pvMail.ini - $ chmod 600 /home/joeuser/.pvMail/pvMail.ini - - It is also advisable to restrict access to the parent - directory of this file (owner: read+write+executable), - such as this linux command: - - .. code-block:: bash - :linenos: - - $ chmod 700 /home/joeuser/.pvMail - -On Windows, the default file might be: -``C:\\Users\\JoeUser\\AppData\\Roaming\\pvMail\\pvMail.ini``. - -It is possible to provide a custom editor (command-line or GUI) -for the application configuration settings file. For now, -a text editor will suffice. - - -ALTERNATE CONFIGURATION FILE -**************************** - -.. index:: PVMAIL_INI_FILE -.. index:: configuration file; environment variable - -An alternate application configuration settings file may be -used by setting the **PVMAIL_INI_FILE** environment variable -with the absolute file path to the desired file. - -Source Code Documentation -************************* - -.. automodule:: PvMail.ini_config - :members: - :undoc-members: - :show-inheritance: + +.. _ini_config: + + +:mod:`ini_config` Module +######################## + +Application defaults are stored in a file compatible with +:class:`ConfigParser.Config`. This file is to be stored in +a *secure* location such that it is accessible and readable +only to the account user (to the extent possible on the +operating system). + +.. index:: configuration file; default path + +The application configuration settings file *pvMail.ini* +is stored in a directory that depends on the operating system, +as selected by the :attr:`os.name` value, as shown in this table: + +=============== ======================================= +:attr:`os.name` path +=============== ======================================= +*posix* ``*$HOST/.pvMail/pvMail.ini*`` +*nt* ``*%APPDATA%\\\\pvMail\\\\pvMail.ini*`` +=============== ======================================= + +The user can override this path by defining the +**PVMAIL_INI_FILE** environment variable to point +to the desired application configuration settings file. +This definition must be made before the call to +:class:`PvMail.ini_config.Config`. + +.. index:: configuration file; create new file as template + +If the application configuration settings file does not exist, +a default one will be created on the first call to +:class:`PvMail.ini_config.Config`. This default configuration file +is only a template and **must be modified** with the user's settings +before email can be sent successfully. + +OBJECTIVE +********* + +The main reason why an application configuration settings file +is needed is to supply the configuration to send email from +:mod:`PvMail.pvMail` through an SMTP server. + +.. index:: configuration file; default + +example application configuration settings (``pvMail.ini``) file: + +.. literalinclude:: ../../../src/PvMail/pvMail.ini + :tab-width: 4 + :linenos: + :language: guess + + +OVERVIEW +******** + +.. index:: configuration file; overview + +The :class:`PvMail.ini_config.Config` class reads the entire contents +of the application configuration settings file and copies that to +a dictionary in the class: *self.agent_db*. Each of the sections in the file +(such as *SMTP*, *sendmail*) comprise subdictionaries with *key = value* content. +The *header* section contains metadata about the file and is not read. +The *mailer* section has a key *mail_transfer_agent* that indicates +which mail transport agent [#]_ will be used to send the email. +Current choices available are: *SMTP* or *sendmail* (supported on Linux only). + +.. [#] MTA: https://en.wikipedia.org/wiki/Message_transfer_agent + +Comments in the application configuration settings file will be ignored +and will not be written back to the file if the file is rewritten +from :meth:`ini_config.Config.write`. A tricky way to preserve +*comment* information is to write the comment as if it were a variable +to be set inside a section, or possible an entire section. Such as: + +.. index:: SMTP + +.. code-block:: guess + :linenos: + + [SMTP] + server = smtp.mycompany.com + user = j.o.e.user@mycompany.com + password = keep_this_private + hint = comment: use your email as "user" name + +or: + +.. code-block:: guess + :linenos: + + [comment] + comment_2 = this is also a comment + +It is possible to define other sections, such as to preserve the content +of two different SMTP configurations. For example: + +.. index:: configuration file; example + +.. code-block:: ini + :linenos: + + [header] + application = pvMail + written = 2014-11-09 11:47:47.709000 + + [mailer] + mail_transfer_agent = SMTP + + [SMTP] + server = smtp.mycompany.com + user = j.o.e.user + password = keep_this_private + port = 465 + connection_security = STARTTLS + + [work-SMTP] + server = smtp.mycompany.com + user = j.o.e.user + password = keep_this_private + port = 465 + connection_security = STARTTLS + + [gmail-SMTP] + server = smtp.googlemail.com + user = joeuser@gmail.com + hint = use your gmail account as "user" name + password = keep_this_private + port = 587 + authentication = Normal password + connection_security = STARTTLS + + [sendmail] + user = joeuser + +To manage between multiple *SMTP* configurations, +copy the settings from the desired section and replace +the content of the *SMTP* section. The above example +is configured for the work email SMTP server. + +KEYWORDS +******** + +.. index:: configuration file; keywords + +These keywords (exact spelling) are recognized (others are ignored): + +:server: IP name or address of email server +:user: username accepted by *server* to send an email +:password: (optional) if required by SMTP server +:port: port number to be used +:authentication: ``Normal password`` +:connection_security: ``STARTTLS`` (SSL/TLS is not available via smtplib) + +WRITING THE CONFIGURATION FILE +****************************** + +Under normal use, the application configuration settings file +is only read. It is possible to create a new configuration +file (in the default location) by running the +:mod:`PvMail.ini_config` program directly from the command line. +A new file will be created if none existed. +If the file already exists, it will not be modified. +The only output from this program will be the absolute path name +to the application configuration settings file. + +It is possible to edit this file with any text editor. + +.. tip:: It is advised to set the permissions on the + application configuration settings file so that only the + owner can read the file (owner: read+write). + One way to do this on a linux system: + + .. code-block:: bash + :linenos: + + $ /path/to/PvMail/ini_config.py + /home/joeuser/.pvMail/pvMail.ini + $ chmod 600 /home/joeuser/.pvMail/pvMail.ini + + It is also advisable to restrict access to the parent + directory of this file (owner: read+write+executable), + such as this linux command: + + .. code-block:: bash + :linenos: + + $ chmod 700 /home/joeuser/.pvMail + +On Windows, the default file might be: +``C:\\Users\\JoeUser\\AppData\\Roaming\\pvMail\\pvMail.ini``. + +It is possible to provide a custom editor (command-line or GUI) +for the application configuration settings file. For now, +a text editor will suffice. + + +ALTERNATE CONFIGURATION FILE +**************************** + +.. index:: PVMAIL_INI_FILE +.. index:: configuration file; environment variable + +An alternate application configuration settings file may be +used by setting the **PVMAIL_INI_FILE** environment variable +with the absolute file path to the desired file. + +Source Code Documentation +************************* + +.. automodule:: PvMail.ini_config + :members: + :undoc-members: + :show-inheritance: diff --git a/docs/source/pvMail/mailer.rst b/docs/source/pvMail/mailer.rst index 3a11650..a0eb462 100644 --- a/docs/source/pvMail/mailer.rst +++ b/docs/source/pvMail/mailer.rst @@ -55,7 +55,7 @@ An email message is sent from *joeuser* to joeuser@example.com: From: joeuser@example.com This is a test of the PvMail mailer, v4.0.0 - For more help, see: https://prjemian.github.io/pvMail + For more help, see: https://BCDA-APS.github.io/pvMail Source Code Documentation diff --git a/docs/source/pvMail/uic_gui.rst b/docs/source/pvMail/uic_gui.rst index 1816e57..8f92615 100644 --- a/docs/source/pvMail/uic_gui.rst +++ b/docs/source/pvMail/uic_gui.rst @@ -1,13 +1,12 @@ - -.. _uic_gui: - - -:mod:`uic_gui` Module -##################### - -Source code documentation for EPICS :mod:`uic_gui` - -.. automodule:: PvMail.uic_gui - :members: - :undoc-members: - :show-inheritance: +.. _uic_gui: + + +:mod:`uic_gui` Module +##################### + +Source code documentation for EPICS :mod:`uic_gui` + +.. automodule:: PvMail.uic_gui + :members: + :undoc-members: + :show-inheritance: diff --git a/pyproject.toml b/pyproject.toml index 8b5b865..9e618e0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -45,18 +45,16 @@ dependencies = [ "pyepics", ] -[tool.setuptools_scm] - -[project.urls] -"Homepage" = "https://prjemian.github.io/pvmail/" -"Source" = "https://github.com/BCDA-APS/pvmail" -"Bug Tracker" = "https://github.com/BCDA-APS/pvmail/issues" - [project.scripts] pvMail = "PvMail.cli:main" pvMail_mail_test = "PvMail.mailer:main" pvMail_mail_config_file = "PvMail.ini_config:main" +[project.urls] +"Homepage" = "https://BCDA-APS.github.io/pvmail/" +"Source" = "https://github.com/BCDA-APS/pvmail" +"Bug Tracker" = "https://github.com/BCDA-APS/pvmail/issues" + [tool.black] line_length = 88 @@ -84,3 +82,5 @@ force_single_line = true # multi_line_output = 1 line_length = 88 include_trailing_comma = true + +[tool.setuptools_scm] diff --git a/src/PvMail/LICENSE b/src/PvMail/LICENSE index 1b0745c..aa31488 100644 --- a/src/PvMail/LICENSE +++ b/src/PvMail/LICENSE @@ -1,48 +1,48 @@ -Copyright (c) 2009-2024, UChicago Argonne, LLC - -All Rights Reserved - -PvMail - -BCDA, Advanced Photon Source, Argonne National Laboratory - - -OPEN SOURCE LICENSE - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - -1. Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. Software changes, - modifications, or derivative works, should be noted with comments and - the author and organization's name. - -2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - -3. Neither the names of UChicago Argonne, LLC or the Department of Energy - nor the names of its contributors may be used to endorse or promote - products derived from this software without specific prior written - permission. - -4. The software and the end-user documentation included with the - redistribution, if any, must include the following acknowledgment: - - "This product includes software produced by UChicago Argonne, LLC - under Contract No. DE-AC02-06CH11357 with the Department of Energy." - -**************************************************************************** - -DISCLAIMER - -THE SOFTWARE IS SUPPLIED "AS IS" WITHOUT WARRANTY OF ANY KIND. - -Neither the United States GOVERNMENT, nor the United States Department -of Energy, NOR uchicago argonne, LLC, nor any of their employees, makes -any warranty, express or implied, or assumes any legal liability or -responsibility for the accuracy, completeness, or usefulness of any -information, data, apparatus, product, or process disclosed, or -represents that its use would not infringe privately owned rights. - -**************************************************************************** +Copyright (c) 2009-2024, UChicago Argonne, LLC + +All Rights Reserved + +PvMail + +BCDA, Advanced Photon Source, Argonne National Laboratory + + +OPEN SOURCE LICENSE + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. Software changes, + modifications, or derivative works, should be noted with comments and + the author and organization's name. + +2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +3. Neither the names of UChicago Argonne, LLC or the Department of Energy + nor the names of its contributors may be used to endorse or promote + products derived from this software without specific prior written + permission. + +4. The software and the end-user documentation included with the + redistribution, if any, must include the following acknowledgment: + + "This product includes software produced by UChicago Argonne, LLC + under Contract No. DE-AC02-06CH11357 with the Department of Energy." + +**************************************************************************** + +DISCLAIMER + +THE SOFTWARE IS SUPPLIED "AS IS" WITHOUT WARRANTY OF ANY KIND. + +Neither the United States GOVERNMENT, nor the United States Department +of Energy, NOR uchicago argonne, LLC, nor any of their employees, makes +any warranty, express or implied, or assumes any legal liability or +responsibility for the accuracy, completeness, or usefulness of any +information, data, apparatus, product, or process disclosed, or +represents that its use would not infringe privately owned rights. + +**************************************************************************** diff --git a/src/PvMail/__init__.py b/src/PvMail/__init__.py index 169acd5..59976e0 100644 --- a/src/PvMail/__init__.py +++ b/src/PvMail/__init__.py @@ -1,21 +1,21 @@ """Configuration of PvMail package.""" -try: - from setuptools_scm import get_version - - __version__ = get_version(root="../..", relative_to=__file__) - del get_version -except (LookupError, ModuleNotFoundError): - from importlib.metadata import version - - __version__ = version("PvMail") - PROJECT = "PvMail" DESCRIPTION = "Watch an EPICS PV. Send email when it changes from 0 to 1." -DOCS_URL = "https://prjemian.github.io/pvMail" +DOCS_URL = "https://BCDA-APS.github.io/pvMail" AUTHORS = [ "Pete Jemian", "Kurt Goetze", ] COPYRIGHT = "Copyright (c) 2009-2024, UChicago Argonne, LLC." LICENSE = "LICENSE" + +try: + from setuptools_scm import get_version + + __version__ = get_version(root="../..", relative_to=__file__) + del get_version +except (LookupError, ModuleNotFoundError): + from importlib.metadata import version + + __version__ = version(PROJECT) diff --git a/src/PvMail/resources/about.ui b/src/PvMail/resources/about.ui index 469315f..ea602ed 100644 --- a/src/PvMail/resources/about.ui +++ b/src/PvMail/resources/about.ui @@ -1,108 +1,108 @@ - - - Dialog - - - - 0 - 0 - 688 - 231 - - - - Dialog - - - - - - - - - - - - - logo2.png - - - Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop - - - - - - - - - - - - 24 - 75 - true - - - - pvMail v3.2.0 - - - Qt::AlignHCenter|Qt::AlignTop - - - - - - - - 12 - - - - Watch an EPICS PV. Send email when it changes from 0 to 1. - - - Qt::AlignCenter - - - - - - - - 18 - - - - Pete Jemian, Kurt Goetze - - - Qt::AlignCenter - - - - - - - - 10 - - - - (c) 2009-2024, UChicago Argonne, LLC, (see LICENSE file for details) - - - Qt::AlignCenter - - - - - - - - - - - - + + + Dialog + + + + 0 + 0 + 688 + 231 + + + + Dialog + + + + + + + + + + + + + logo2.png + + + Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop + + + + + + + + + + + + 24 + 75 + true + + + + pvMail v3.2.0 + + + Qt::AlignHCenter|Qt::AlignTop + + + + + + + + 12 + + + + Watch an EPICS PV. Send email when it changes from 0 to 1. + + + Qt::AlignCenter + + + + + + + + 18 + + + + Pete Jemian, Kurt Goetze + + + Qt::AlignCenter + + + + + + + + 10 + + + + (c) 2009-2024, UChicago Argonne, LLC, (see LICENSE file for details) + + + Qt::AlignCenter + + + + + + + + + + + + diff --git a/src/PvMail/resources/gui.ui b/src/PvMail/resources/gui.ui index 02616ad..1639ac9 100644 --- a/src/PvMail/resources/gui.ui +++ b/src/PvMail/resources/gui.ui @@ -1,257 +1,257 @@ - - - MainWindow - - - - 0 - 0 - 600 - 464 - - - - pvMail - - - - logo-icon.pnglogo-icon.png - - - - - - - Qt::Vertical - - - - - - - QFormLayout::AllNonFixedFieldsGrow - - - - - config file - - - - - - - email configuration settings file name goes here - - - - - - - log file - - - - - - - log file name goes here - - - - - - - trigger PV - - - - - - - - - - message PV - - - - - - - - - - email address(es) - - - - - - - - 16777215 - 60 - - - - true - - - true - - - - - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - Run - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - running | stopped - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - Stop - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - - - - - - - History - - - - - - true - - - - - - - - - - - - 0 - 0 - 600 - 21 - - - - - File - - - - - - - - Edit - - - - - Help - - - - - - - - - - - About pvMail - - - - - E&xit - - - - - send test email - - - - - - + + + MainWindow + + + + 0 + 0 + 600 + 464 + + + + pvMail + + + + logo-icon.pnglogo-icon.png + + + + + + + Qt::Vertical + + + + + + + QFormLayout::AllNonFixedFieldsGrow + + + + + config file + + + + + + + email configuration settings file name goes here + + + + + + + log file + + + + + + + log file name goes here + + + + + + + trigger PV + + + + + + + + + + message PV + + + + + + + + + + email address(es) + + + + + + + + 16777215 + 60 + + + + true + + + true + + + + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + Run + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + running | stopped + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + Stop + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + + + + + History + + + + + + true + + + + + + + + + + + + 0 + 0 + 600 + 21 + + + + + File + + + + + + + + Edit + + + + + Help + + + + + + + + + + + About pvMail + + + + + E&xit + + + + + send test email + + + + + + diff --git a/src/PvMail/test.db b/src/PvMail/test.db index 0449002..eb176a2 100644 --- a/src/PvMail/test.db +++ b/src/PvMail/test.db @@ -1,23 +1,23 @@ - -# 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) 2009-2024, UChicago Argonne, LLC. See LICENSE file. + +# EPICS database to use while testing and developing pvMail.py code + +# 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) 2009-2024, UChicago Argonne, LLC. See LICENSE file.