diff options
author | Martin Braun <martin.braun@ettus.com> | 2022-03-17 11:10:57 +0100 |
---|---|---|
committer | Aaron Rossetto <aaron.rossetto@ni.com> | 2022-03-30 10:28:07 -0700 |
commit | e1d98d2bcd21cae4807021564815b6d766575f73 (patch) | |
tree | da14198dc11ddd90f16681da75cf4d83cb0dfd3e /.ci/docker/uhd-builder-fedora35.Dockerfile | |
parent | 1d2ec743170b03a1c1f9618cb48809b2d9794084 (diff) | |
download | uhd-e1d98d2bcd21cae4807021564815b6d766575f73.tar.gz uhd-e1d98d2bcd21cae4807021564815b6d766575f73.tar.bz2 uhd-e1d98d2bcd21cae4807021564815b6d766575f73.zip |
python: rfnoc: Add new replay block APIs to Python API
The new API calls get_{record,play}_async_metadata() calls are now
available in Python. To look more Pythonic, we change the call signature
and return value to either return `None` or the value (if available).
For comparison, this is the C++ code:
```cpp
uhd::rx_metadata_t md;
if (replay_ctrl->get_record_async_metadata(md, 0.1)) {
cout << "Received metadata! Error code: " << md.strerror() << endl;
} else {
cout << "No metadata received!" << endl;
}
```
In Python, this has the more Pythonic form:
```python
md = replay_ctrl.get_record_async_metadata(0.1);
if md is not None:
print("Received metadata! Error code: ", md.strerror())
else:
print("No metadata received!")
```
Diffstat (limited to '.ci/docker/uhd-builder-fedora35.Dockerfile')
0 files changed, 0 insertions, 0 deletions