Skip to content
Xiaoqiang Wang edited this page Mar 26, 2018 · 14 revisions

PCASpy provides not only the low level python binding to EPICS Portable Channel Access Server but also the necessary high level abstraction to ease the server tool programming.

Introduction

Portable Channel Access Server (PCAS) library exists along with database channel access server (RSRV) in EPICS base. PCAS provides several C++ classes (server tool), making use of abstract callback methods, to let server application respond to channel access clients requests. Due to the intrinsic complexity of C++ and channel access request/data handling, this is not widely used among EPICS developers.

Python is a language easy enough to get in quickly while possessing rich standard libraries and numerous extensions. This makes it very attractive to prototype a PCAS application in Python.

The goal of this project is to make PCAS applications easy to write. This easiness is achieved in two levels:

  • Necessary C++ classes are wrapped using SWIG.
  • Wrapper Python classes to encapsulate the detail handling and expose a clean interface.

Features

  • Single interface (Driver class) to PV read/write request.
  • PV database as Python dict
  • Using python native data type
  • Access security control

News

  • 12/01/2018 - 0.7.1 release

    • Fixed spurious value update after startup. (Issue #50)
    • Mitigated the race condition in Driver.updatePV. It could cause one event to fire twice in rare cases. This is not a total fix but good enough. (PR #49)
    • Changed SimplePV.writeValue to post the update event only on the this specific PV. (Issue #48)
    • Changed Driver.setParamInfo and Driver.setParamEnums not to call Driver.updatePVs, and leave that to the user.
  • 21/09/2017 - 0.7.0 release

    • Changed gdd.get to return empty string if char(int8/uin8) type scalar is 0. It used to return '\x00', this confuses the check for an empty string.
    • Fixed numpy array checking. (Issue #44)
    • Added adel/mdel fields in PV configuration in analog to EPICS IOC records. (Issue #46)
    • Added Driver.getParamInfo to retrieve the current PV configuration. (PR #45)
  • 09/05/2017 - 0.6.5 release

    • Rebuilt PyPI/Anaconda packages to fix the wrong number of elements transfer when ca_array_get_backack requests with 0 count. This requires a patch to EPICS base. (Issue #43)
  • 26/04/2017 - 0.6.4 release

    • Fixed the crash on Windows when epics base libraries are compiled using different visual studio version than python. (Issue #41)
    • Fixed the sphinx docs build. (Issue #37)
    • Added a spec file for rpmbuild.
  • 28/02/2017 - 0.6.3 release

    • Fixed that string type is wrongly converted to number. (Issue #24)
    • Fixed that gdd.put crashes when input is string but primitiveType is other that Int8 or Uint8. (Issue #26)
    • Added support of numpy array in gdd.put (Issue #28)
    • Changed Python 3 support from 2to3 conversion to direct compatible source code. (Issue #30)
    • Binary packages on PyPI is built with EPICS base 3.14.12.6. (Issue #25 and #29)
    • Continuous integration/deployment configured at Travis and AppVeyor.
  • 02/08/2016 - 0.6.2 release

    • Fixed that the alarm/severity of string type PVs remain UDF/INVALID. (Issue #23)
    • Fixed that the monitor event of string type PVs are wrongly posted as double. (Issue #24)
  • 01/07/2016 - 0.6.1 release

    • Fixed that PV graphics/control meta properties are not posted. See https://bugs.launchpad.net/epics-base/+bug/1510955 for the failure.
    • Added support of EPICS 3.15
    • Added :meth:Driver.setParamInfo to set PV graphics/control meta properties, e.g. limits, units, precision.
  • 06/06/2016 - 0.6.0 release

    • Added support of request type DBR_CLASS_NAME in casPV base class. It is not overloaded in SimplePV. The default implementation returns an empty string.
    • Warns and truncates if enums type PV has more than 16 states or any state string length > 25. (Issue #18)
    • Fixed that PV of char type cannot be set to empty string. (Issue #14)
    • Fixed that DBE_ALARM event was not posted. (Issue #13)
  • 10/10/2014 - 0.5.1 release

    • Fixed that alarm and warn limits are taken from lolo/hihi and low/high fields. (Issue #11).
    • Fixed example/alarm_severity.py so that MTEST:STATUS and MTEST:RAND are writable.
  • 06/10/2014 - 0.5.0 hotfix

    • Fixed that cas.py is not installed/included in egg file (Issue #10). Version number remains 0.5.0.
  • 01/10/2014 - 0.5.0 release.

    • Fixed that put callback may fail if driver invokes callbackPV too soon(Issue #9). Thanks to Kay Kasemir.
    • Added 16bit short integer type.
    • Added printout of exceptions that are raised inside Python code.
    • Added method Driver.setParamEnum to change the states of enumerate PV (Issue #4).
    • Added basic logging support.
    • Changed so that timestamp is updated whenever Driver.setParam is called.
    • Packaging changes:
  • 23/04/2013 - 0.4.1 release.

    • Change PV's initial alarm/severity status to UDF/INVALID.
    • String typed PV returns NO_ALARM by default.
    • Driver.setPatam makes a copy of mutable objects like list and numpy.ndarray. Before it only holds a reference to them and these value can get changed without notice. Thanks to Kay Kasemir for the fix.
  • 14/01/2013 - 0.4 release.

    • Fix timestamp information.
    • Add long string support by char type.
    • Add Access Security Control support.
    • Add alarm/severity support.
    • Other Changes.
  • 21/09/2011 - 0.3 release.

    • The major change is to release GIL for each C function call. This simplifies the process loop and shows better performance in certain case, e.g. pysh.py under Windows.
    • Fixed a gdd memory leak introduced in 0.2.
    • Other Changes.
  • 16/08/2011 - 0.2 release.

  • 19/07/2011 - 0.1 release.

  • 17/07/2011 - The project and module name has changed from pcas to pcaspy to avoid potential confusion with the C++ PCAS implementation. Hence old project pcas is deleted.

  • 18/01/2011 - The code repository is changed to googlecode.

Clone this wiki locally