pvWebMonitor Package: pvwatch Module#

pvWebMonitor.pvwatch

exception pvWebMonitor.pvwatch.CouldNotParseXml[source]#

Bases: Exception

Could not parse XML file.

class pvWebMonitor.pvwatch.PvCrossReference[source]#

Bases: object

Maintain cross-references between pvnames, mnemonics, and their signals.

add(pv, mne, entry)[source]#

Collect a new PV name, mnemonic, and PvEntry entry object.

clear()[source]#

Delete the cross-references tables.

get(key)[source]#

Lookup an entry by PV or mnemonic.

known(pv)[source]#

Is this PV known?

property mnemonics#

List the known mnemonics.

property pvnames#

List the known PV names.

class pvWebMonitor.pvwatch.PvEntry(mnemonic, pvname, as_string=False, description=None, fmt='%s')[source]#

Bases: object

Monitor (read-only) a single EPICS PV.

ca_monitor_event(**kwargs)[source]#

Respond to an EPICS CA monitor event.

property connected#

Is EPICS connected?

learn_record_type()[source]#

Record the EPICS RTYP (record type, if available).

learn_units()[source]#

Learn the units from EPICS, adjust for ‘user names’, as known.

exception pvWebMonitor.pvwatch.PvNotRegistered[source]#

Bases: Exception

PV not in ‘pvdb’.

class pvWebMonitor.pvwatch.PvWatch(configuration)[source]#

Bases: object

Core of the pvWebMonitor package.

To call this code, first define configuration=dict() with terms as defined in read_config.read_xml(), then statements such as:

1 watcher = PvWatch(configuration)
2 watcher.start()
add_file_pattern(pattern)[source]#

add pattern as an additional file extension pattern

Any file with extension matching any of the patterns in self.upload_patterns will copied to the WWW directory, if they are newer.

add_pv(mne, pv, desc, fmt, as_string)[source]#

Connect to a EPICS (PyEpics) process variable

buildReport()[source]#

build the report

get(pvname)[source]#

Return the PvEntry object for the named PV.

get_pvlist()[source]#

get the PVs from the XML file

pv_connected(pvname)[source]#

Is the named PV connected?

report()[source]#

write the values out to files

The values of the monitored EPICS PVs (the “raw data”) is written to an XML file. This file is then used with one or more XSLT stylesheets to create HTML pages. An overall “home page” (index.html) is created to provide a table of contents of this static web site.

start()[source]#

begin receiving PV updates and posting new web content