4000-520-616
欢迎来到免疫在线!(蚂蚁淘生物旗下平台)  请登录 |  免费注册 |  询价篮
主营:原厂直采,平行进口,授权代理(蚂蚁淘为您服务)
咨询热线电话
4000-520-616
当前位置: 首页 > 新闻动态 >
热卖商品
新闻详情
channel-access.server-通道访问服务器库-André Althaus...
来自 : 开源中国 发布时间:2021-03-25
Channel Access server library

This library contains a low-level binding to the cas library in EPICS base and a thread-safe high level interface to create channel access servers.

For the client implementation see channel_access.client_.

.. channelaccess.client: https://pypi.org/project/channel_access.client

Installation

Before installing the library, the environment variables EPICS_BASE and EPICS_HOST_ARCH must be set.

Then the library can be installed with pip::

pip install channel_access.server

If numpy can be imported at install time, numpy support is automatically activated. This can be explicitly controlled with the environment variable CA_WITH_NUMPY::

CA_WITH_NUMPY=0 pip install channel_access.serverCA_WITH_NUMPY=1 pip install channel_access.server

If the package is compiled with numpy support, numpy arrays are used by default. If numpy arrays should not be used, the parameter use_numpy can be set to False.

Example

This example shows a simple server with a PV counting up:

.. code:: python

import timeimport channel_access.common as caimport channel_access.server as caswith cas.Server() as server: pv = server.createPV(\'CAS:Test\', ca.Type.LONG) while True: pv.value += 1 time.sleep(1.0)
Documentation

The documentation is available online_ or it can be generated from the source code with sphinx::

cd /path/to/repositorypip install -e .[doc]python setup.py build_sphinx

Then open build/sphinx/html/index.html.

.. online: https://delta-accelerator.github.io/channelaccess.server

Get the source

The source code is available in a Github repository_::

git clone https://github.com/delta-accelerator/channel_access.server

.. Github repository: https://github.com/delta-accelerator/channelaccess.server

Tests

Tests are run with pytest::

cd /path/to/repositorypip install -e .[dev]pytest -v

To run the tests for all supported version use tox::

cd /path/to/repository

本文链接: http://accessmylibrary.immuno-online.com/view-727043.html

发布于 : 2021-03-25 阅读(0)
公司介绍
品牌分类
联络我们
服务热线:4000-520-616
(限工作日9:00-18:00)
QQ :1570468124
手机:18915418616