Skip to main content

This library contains a low-level binding to the cas library in EPICS base and a thread-safe high level interface to create channel access servers.

For the client implementation see channel_access.client.

Installation

Before installing the library, the environment variables EPICS_BASE and EPICS_HOST_ARCH must be set.

Then the library can be installed with pip:

pip install channel_access.server

If numpy can be imported at install time, numpy support is automatically activated. This can be explicitly controlled with the environment variable CA_WITH_NUMPY:

CA_WITH_NUMPY=0 pip install channel_access.server
CA_WITH_NUMPY=1 pip install channel_access.server

If the package is compiled with numpy support, numpy arrays are used by default. If numpy arrays should not be used, the parameter use_numpy can be set to False.

Example

This example shows a simple server with a PV counting up:

import time
import channel_access.common as ca
import channel_access.server as cas

with cas.Server() as server:
    pv = server.createPV('CAS:Test', ca.Type.LONG)
    while True:
        pv.value += 1
        time.sleep(1.0)

Documentation

The documentation is available online or it can be generated from the source code with sphinx:

cd /path/to/repository
pip install -e .[doc]
python setup.py build_sphinx

Then open build/sphinx/html/index.html.

Get the source

The source code is available in a Github repository:

git clone https://github.com/delta-accelerator/channel_access.server

Tests

Tests are run with pytest:

cd /path/to/repository
pip install -e .[dev]
pytest -v

To run the tests for all supported version use tox:

cd /path/to/repository
tox

Release files for channel-access.server 0.2.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for channel-access.server 0.2.3
File Size Uploaded
channel_access.server-0.2.3.tar.gz 34.0 kB Details

Release files / channel_access.server-0.2.3.tar.gz

Download URL channel_access.server-0.2.3.tar.gz
Size 34.0 kB
Tags Source
SHA-256 checksum
How to use checksums
5282c880095e6fcdcd3de7af3e583f4554bb939e13321cf1751d30f043d03de2
BLAKE2b-256 checksum
How to use checksums
80a2f18ea28cf17df40bd5db517c044ac5123da579af2f18d27124184b411add
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.6.0 importlib_metadata/4.8.1 pkginfo/1.8.3 requests/2.28.1 requests-toolbelt/0.9.1 tqdm/4.64.0 CPython/3.10.6

Release history Release notifications | RSS feed

This release

0.2.3 This release

1 release file

0.2.2

1 release file

0.2.1

1 release file

0.2.0

1 release file

0.1.1

1 release file

0.1.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page