diff options
author | Aaron Rossetto <aaron.rossetto@ni.com> | 2020-06-04 09:04:24 -0500 |
---|---|---|
committer | Aaron Rossetto <aaron.rossetto@ni.com> | 2020-06-09 07:12:15 -0500 |
commit | dac56ff0dcf35c4bf8ecb1e127465f6f726de737 (patch) | |
tree | 092c168788d8770844896a9e4ed5d2c4012b09e3 /host/lib/include | |
parent | 65578ebd055c65f8e3ddf68f97cf1e0a4afdffa7 (diff) | |
download | uhd-dac56ff0dcf35c4bf8ecb1e127465f6f726de737.tar.gz uhd-dac56ff0dcf35c4bf8ecb1e127465f6f726de737.tar.bz2 uhd-dac56ff0dcf35c4bf8ecb1e127465f6f726de737.zip |
python: Add __repr__, property bindings to NocBlockBase
This commit adds a __repr__ function to the noc_block_base bindings,
which helpfully displays the block's unique ID, e.g.:
>>> block = g.get_block('0/VectorIIR#0')
>>> block
<NocBlock for block ID '0/VectorIIR#0'>
Also added are get_property_ids and set_properties functions, so Python
clients can set block properties by string if desired, e.g.:
>>> block.get_property_ids()
['alpha', 'beta', 'delay', 'max_delay']
>>> block.set_properties('alpha=0.45,beta=0.77,delay=41')
>>> viir = uhd.rfnoc.VectorIirBlockControl(block)
>>> viir.get_alpha(0)
0.45
>>> viir.get_beta(0)
0.77
Diffstat (limited to 'host/lib/include')
0 files changed, 0 insertions, 0 deletions