Channel Access Foreign Function Interface
Project description
caffi is the Channel Access Foreign Function Interface. It uses CFFI to call EPICS channel access library.
This package provides direct low level interface to channel access, alike the C API.
Install
EPICS dynamic libraries have been shipped with the package for Windows, Linux and macOS. But if the environment variables EPICS_BASE and EPICS_HOST_ARCH are set on macOS and Linux, those libraries under path ${EPICS_BASE}/lib/${EPICS_HOST_ARCH} will be used.
Either use pip,
$ pip install caffi
or checkout source code from the git repository,
$ git clone https://github.com/CaChannel/caffi.git $ cd caffi $ python setup.py install
Documents
Latest documents are hosted at Read the Dcos.
Example
import caffi.ca as ca status = ca.create_context() assert status == ca.ECA.NORMAL status, chid = ca.create_channel('catest') assert status == ca.ECA.NORMAL status = ca.pend_io(3) assert status == ca.ECA.NORMAL status = ca.put(chid, 123) status = ca.flush_io() status, value = ca.get(chid) assert status == ca.ECA.NORMAL status = ca.pend_io(3) assert status == ca.ECA.NORMAL assert value.get() == 123
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
caffi-1.0.0b3.tar.gz
(3.1 MB
view hashes)
Built Distribution
Close
Hashes for caffi-1.0.0b3-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2b5521a3915bd2a0aa61233930f125528ecf1afb6890255ffab845150630f720 |
|
MD5 | e7f6e053551db90c55ba3389b5ca7242 |
|
BLAKE2b-256 | cd3654a6af65badd47b95051ee63fb661c998d03d2fe00166ba2678172f091b8 |