跳转到主要内容

用于控制PandABlocks TCP服务器和控制端口的Python客户端

项目描述

CI Coverage PyPI License

pandablocks

用于控制PandABlocks TCP服务器和控制端口的Python客户端

源代码 https://github.com/PandABlocks/PandABlocks-client
PyPI pip install pandablocks
Docker docker run ghcr.io/pandablocks/PandABlocks-client:latest
文档 https://pandablocks.github.io/PandABlocks-client
发布 https://github.com/PandABlocks/PandABlocks-client/releases

命令行工具具有交互式控制台、加载/保存控制和HDF5写入功能

$ pip install pandablocks

$ pandablocks control <panda-hostname>
< PCAP.     # Hit TAB key...
PCAP.ACTIVE     PCAP.BITS1      PCAP.BITS3      PCAP.GATE       PCAP.SAMPLES    PCAP.TRIG       PCAP.TS_END     PCAP.TS_TRIG
PCAP.BITS0      PCAP.BITS2      PCAP.ENABLE     PCAP.HEALTH     PCAP.SHIFT_SUM  PCAP.TRIG_EDGE  PCAP.TS_START
< PCAP.ACTIVE?
OK =1

$ pandablocks hdf <panda-hostname> /tmp/panda-%d.h5
INFO:Opened '/tmp/panda-1.h5' with 60 byte samples stored in 11 datasets
INFO:Closed '/tmp/panda-1.h5' after writing 50000000 samples. End reason is 'Disarmed'

库具有具有异步和阻塞包装器的Sans-IO核心

from pandablocks.blocking import BlockingClient
from pandablocks.commands import Get

with BlockingClient("hostname-or-ip") as client:
    # Commands sent to Control port
    idn = client.send(Get("*IDN"))
    print(f"Hello {idn}")
    for data in client.data():
        # Data captured from Data port
        print(f"I got some PCAP data {data}")

有关更详细的文档,请参阅 https://pandablocks.github.io/PandABlocks-client

项目详情


下载文件

下载适用于您平台的文件。如果您不确定选择哪个,请了解更多关于 安装包 的信息。

源代码分发

pandablocks-0.10.1.tar.gz (502.3 kB 查看散列值)

上传时间 源代码

构建分发

pandablocks-0.10.1-py3-none-any.whl (44.6 kB 查看散列值)

上传时间 Python 3

支持