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 http://bitbucket.org/xwang/caffi
$ cd caffi
$ python setup.py install

Documents

Latest documents are hosted at Read the Dcos.

Example

import sys
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, value = ca.get(chid)
assert status == ca.ECA.NORMAL

status = ca.pend_io(3)
assert status == ca.ECA.NORMAL

print(value.get())

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

Uploaded Source

File details

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

File metadata

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

File hashes

Hashes for caffi-0.99.tar.gz
Algorithm Hash digest
SHA256 14555fd0b061940c567b98a860812df14d0515eb7aaca1973ff9ca5bb1725d2b
MD5 ed3376725f3902563bcab43a3fe98d2c
BLAKE2b-256 d93fc2ef8a0610d02d543d1d1c9e9007dfa993931f06cc1167f52270748250b9

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