./epics_log.py /local.1/htdocs/mvdconfig/setup/PRESTO_2018_readout.xml --epics-ca-addr-list 192.168.10.46
"""
-import argparse, sys, os
+import argparse, sys, os, time
+from datetime import datetime as dt
# external dependencies
import lxml.etree # (OpenSuse package: python3-lxml)
import caproto # (No OpenSuse package / pip install caproto)
# VARIANT caproto threaded client Batch mode
import caproto.threading.client
- import time, functools
+ import functools
ctx = caproto.threading.client.Context(timeout=context_timeout)
pvs = ctx.get_pvs(*pvlist)
start = time.time()
pv = f"{args.pv_prefix}SENSOR:{name}:{fname}"
updates.append((pv, value))
eprint(section_divider)
+ updates.append((f"{args.pv_prefix}LAST_RUN:UNIX", time.time()))
+ updates.append((f"{args.pv_prefix}LAST_RUN:ISO", dt.utcnow().replace(microsecond=0).isoformat()+'Z'))
pvs = [update[0] for update in updates]
values = [update[1] for update in updates]
results = caput_many(pvs, values)