A Python client to control and data ports of the PandABlocks TCP server
Project description
pandablocks
A Python client to control and data ports of the PandABlocks TCP server
Source | https://github.com/PandABlocks/PandABlocks-client |
---|---|
PyPI | pip install pandablocks |
Docker | docker run ghcr.io/pandablocks/PandABlocks-client:latest |
Documentation | https://pandablocks.github.io/PandABlocks-client |
Releases | https://github.com/PandABlocks/PandABlocks-client/releases |
Command line tool features an interactive console, load/save control, and HDF5 writing:
$ 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'
Library features a Sans-IO core with both asyncio and blocking wrappers:
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}")
See https://pandablocks.github.io/PandABlocks-client for more detailed documentation.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
pandablocks-0.10.1.tar.gz
(502.3 kB
view details)
Built Distribution
File details
Details for the file pandablocks-0.10.1.tar.gz
.
File metadata
- Download URL: pandablocks-0.10.1.tar.gz
- Upload date:
- Size: 502.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d0edee2a00c1148038bc35c301787192c7bfb27d302145d49a29986db5e9375a |
|
MD5 | c92838e83c52ee7afe9c847ab8b873a9 |
|
BLAKE2b-256 | 2bae0f3634d1ee1934fdf7ac25492e98e89abd935b452458c3a96d1697d002fe |
File details
Details for the file pandablocks-0.10.1-py3-none-any.whl
.
File metadata
- Download URL: pandablocks-0.10.1-py3-none-any.whl
- Upload date:
- Size: 44.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | dac0c2e0f520b03424397541fae2233ee99a708c7d53bcf59a0c42d2776ceb9e |
|
MD5 | d9a9ffc4448b85382157c73985b266e8 |
|
BLAKE2b-256 | 1de225136f0552e985aaf112ff90072a37a650d7e5faa26652b67ef614f40d4a |