Simple async
/await
wrapper for PyEpics.
There are two main types:
PvMonitor
- subscribed to PV updates,get
returns last received value.Pv
- connected but not subscribed, eachget
requests PV value over network.
from pyepics_asyncio import Pv
pv = await Pv.connect("pvname")
await pv.put(3.1415)
print(await pv.get())
with pv.monitor() as mon:
async for value in mon:
print(value)
To run tests you need to have dummy IOC running (located in ioc
dir):
- Set appropriate
EPICS_BASE
path inconfigure/RELEASE
. - Build with
make
. - Go to
iocBoot/iocTest/
and run scriptst.cmd
and don't stop it.
In separate shell run poetry run pytest --verbose
.