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.
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 Distribution
pandablocks-0.2.1.tar.gz
(18.3 kB
view details)
Built Distribution
File details
Details for the file pandablocks-0.2.1.tar.gz
.
File metadata
- Download URL: pandablocks-0.2.1.tar.gz
- Upload date:
- Size: 18.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/51.0.0 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.8.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
09aa9615d2a9dd37a4adf5c3fe7f1f230412b654803ffb9c942dc577a7629d72
|
|
MD5 |
8bdd2015434a4fc8f3bcca31174aacfa
|
|
BLAKE2b-256 |
8ea44e6eb7e95557f05157765e90cd3c5f2a0e1e5af5c370b2bcc0b50ce0a60d
|
File details
Details for the file pandablocks-0.2.1-py3-none-any.whl
.
File metadata
- Download URL: pandablocks-0.2.1-py3-none-any.whl
- Upload date:
- Size: 25.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/51.0.0 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.8.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
ef76bbd82d6c2c509cb64b539b17d78451ae93478f5d6b29e37d84191bec97a8
|
|
MD5 |
6155df864ae67646b2b2cf1b44e466da
|
|
BLAKE2b-256 |
b52f57e1e3c220797f1e5712ed5035828f575b424891f02e2a290601be05cd3a
|