A Python client to control and data ports of the PandABlocks TCP server
Project description
A Python client to control and data ports of the PandABlocks TCP server.
(this is the first version to be published on gh-pages)
PyPI |
pip install pandablocks |
Source code |
|
Documentation |
https://pandablocks.github.io/PandABlocks-client/master/index.html |
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}")
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 Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distribution
Close
Hashes for pandablocks-0.1.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b14432c6467a15798400b078e5f1855741d2848ec14c3305d324d016b9c1f92d |
|
MD5 | af4f9d5060fbf8c2f1bc24123cf0fc0e |
|
BLAKE2b-256 | f38f774112839fc04b4efd6062c8a0c35c5da07b375a2e52a982b0026de3ee76 |