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.

It is the goal of this package to provide 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 OS X. But if the environment variables EPICS_BASE and EPICS_HOST_ARCH are set, 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

context = ca.create_context()

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.0b2.tar.gz (3.4 MB view details)

Uploaded Source

Built Distribution

caffi-1.0b2-py2.py3-none-any.whl (3.4 MB view details)

Uploaded Python 2Python 3

File details

Details for the file caffi-1.0b2.tar.gz.

File metadata

  • Download URL: caffi-1.0b2.tar.gz
  • Upload date:
  • Size: 3.4 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for caffi-1.0b2.tar.gz
Algorithm Hash digest
SHA256 6685ade6aea9b1fe32561621a7b55a28758960a122a1f33892a317a56bfc1965
MD5 88b855ee02e22d04c02f98a2bd91fa40
BLAKE2b-256 c1dc5ddf80dc6ed073c83bc6f09f14d9313996b5e63ea667e567697872870d39

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for caffi-1.0b2-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 0f1e9b992297da7fc26ce5797f044182ec3b344a6ad1c084ddad40f0184af4c6
MD5 a675bde5462c02326a76276848db7576
BLAKE2b-256 5dfc13f27b06c46ad2cc08556a34ab014a18dc3c01a66fcdcc02612c4ac74bc5

See more details on using hashes here.

Supported by

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