Skip to main content

A generic bridge between EPICS IOCs and Python logic.

Project description

EPICS Bridge

Python License

epics-bridge is a Python framework for synchronous, high-availability EPICS daemons over PVA. It provides the control-loop contract, watchdog/heartbeat behavior, logging PVs, and failure handling used by daemon projects built on top of it.

Start here

Build a new daemon

Use the cookiecutter scaffold:

  • Canonical repo: https://gitlab.esss.lu.se/icshwi/pydaemon/cookiecutter-epics-bridge
  • Generate a project:
cookiecutter git@gitlab.esss.lu.se:icshwi/pydaemon/cookiecutter-epics-bridge.git
cd <project_name>
conda env create -f environment.yml
conda activate <project_name>
pre-commit install
pytest -m "not slow" -v

The scaffold is the primary starting point for new daemon development. It creates a standalone Python package, IOC startup files, a test harness, and project-local docs.

Understand the framework

Use these docs when you need framework behavior, design constraints, or the reference example:

What this repo contains

  • epics_bridge/: framework package
  • tests/: framework and example verification
  • examples/echo_daemon/: end-to-end reference daemon + IOC
  • docs/README.md: canonical framework guide

Install and verify

For local framework work:

pip install -e .
pip install -r requirements-test.txt
pytest -m "not slow" -v

For IOC-backed integration work, use the provided conda environment:

conda env create -f environment.yml
conda activate epics-bridge
pip install -e .
pytest -m slow -v

For the full project verifier used in this repo, prefer running the entire suite through the environment directly:

mamba run -n epics-bridge pytest -q

environment.yml uses ess-conda-local and conda-forge. If you are outside ESS, you may need to adjust channel/package availability for the EPICS toolchain.

Architecture summary

epics-bridge uses two threads:

  1. Main thread: synchronous control loop (trigger -> run_task -> reset -> telemetry)
  2. Heartbeat thread: independent watchdog with its own PVA context

If the main loop stalls, the heartbeat stops pulsing. If I/O failures persist past the configured threshold, the daemon exits so an external supervisor can restart it.

For the full EPICS contract, TaskStatus semantics, PV model, and extension points, see docs/README.md.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

epics_bridge-5.0.0.tar.gz (24.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

epics_bridge-5.0.0-py3-none-any.whl (29.8 kB view details)

Uploaded Python 3

File details

Details for the file epics_bridge-5.0.0.tar.gz.

File metadata

  • Download URL: epics_bridge-5.0.0.tar.gz
  • Upload date:
  • Size: 24.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.12

File hashes

Hashes for epics_bridge-5.0.0.tar.gz
Algorithm Hash digest
SHA256 3f055876524041bb644156cf47fd18eb897ba648f331398c806584789ba1618e
MD5 5c9d77194a66641528f68697e1c2abf1
BLAKE2b-256 6c35132e471e50110be820d48467cacd50d4a25d673ec715742c55e4da6d7df9

See more details on using hashes here.

File details

Details for the file epics_bridge-5.0.0-py3-none-any.whl.

File metadata

  • Download URL: epics_bridge-5.0.0-py3-none-any.whl
  • Upload date:
  • Size: 29.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.12

File hashes

Hashes for epics_bridge-5.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 506cdff5f1fe553f531a08d89e362115e75a9e5a9174a1ad778d0fbf2cf081f1
MD5 8b990e641d8a6688bacf9cc96d68b9b0
BLAKE2b-256 f7ba23a56a3f3cdeea628ad571c651dcc23825ad45200c28ba16ecc3439740b3

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page