Skip to content

agerasev/pyepics-asyncio

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pyepics-asyncio

Simple async/await wrapper for PyEpics.

Overview

There are two main types:

  • PvMonitor - subscribed to PV updates, get returns last received value.
  • Pv - connected but not subscribed, each get requests PV value over network.

Usage

Connect to PV

from pyepics_asyncio import Pv

pv = await Pv.connect("pvname")

Write value to PV

await pv.put(3.1415)

Read value from PV

print(await pv.get())

Monitor PV value updates

with pv.monitor() as mon:
    async for value in mon:
        print(value)

Testing

To run tests you need to have dummy IOC running (located in ioc dir):

  • Set appropriate EPICS_BASE path in configure/RELEASE.
  • Build with make.
  • Go to iocBoot/iocTest/ and run script st.cmd and don't stop it.

In separate shell run poetry run pytest --verbose.

About

Async/await support for PyEpics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published