Skip to main content

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

Package

RPM

The SPEC file python-caffi.spec is included. Get the source tarball either from PyPI or create it by python setup.py sdist, and run:

$ rpmbuild -ta caffi-1.0.0.tar.gz

The binary and source RPM will be created. The package name is python-caffi.

Anaconda

The recipe is included.:

$ conda build conda-recipe

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


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.4.tar.gz (3.5 MB view details)

Uploaded Source

Built Distribution

caffi-1.0.4-py2.py3-none-any.whl (3.5 MB view details)

Uploaded Python 2 Python 3

File details

Details for the file caffi-1.0.4.tar.gz.

File metadata

  • Download URL: caffi-1.0.4.tar.gz
  • Upload date:
  • Size: 3.5 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.12.1

File hashes

Hashes for caffi-1.0.4.tar.gz
Algorithm Hash digest
SHA256 45dcb301cca98bf90f56b3d3eda4e9a2c0c1e27d47ff2761bc56db434bafd4c0
MD5 013fc7fdde0d1a2399bf787fb8454cd4
BLAKE2b-256 fee2beeefde9e7d69c76ccc049fd7e593395372c8794dd57faaa8fc52013ebd6

See more details on using hashes here.

File details

Details for the file caffi-1.0.4-py2.py3-none-any.whl.

File metadata

  • Download URL: caffi-1.0.4-py2.py3-none-any.whl
  • Upload date:
  • Size: 3.5 MB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.12.1

File hashes

Hashes for caffi-1.0.4-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 befcc2618966fceac519a2933d6d984a70a1206be64a03a48642c73fe73100e3
MD5 562f26f81a1b39d85f41953e289b17a3
BLAKE2b-256 8948cc1115bd491ba15e0facd16bb500781d63835fcc79cc218e4399a95545da

See more details on using hashes here.

Supported by

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