Commit Graph

4 Commits

Author SHA1 Message Date
Lars Amsel
4708d01d9e host: allow multiple repeats for play command of replay block
Add a new play command that accepts a size_t for iterations. This
allows arbritrary iteration on the signal as well as continous
play (max value of iteration). Use the CONTINOUS_PLAY command for
that.

The old play command (using bool) is deprecated but stays in
for backward capabilities.
2025-07-18 11:19:41 +02:00
Martin Braun
7fb64baf10 python: Make block_controller_factory_python.hpp public
This moves said file into include/, making it available for OOT block
authors.
2024-02-28 09:38:28 -06:00
Martin Braun
e1d98d2bcd 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!")
```
2022-03-30 10:28:07 -07:00
mattprost
6d4c07d09a python: Add replay RFNoC block controller bindings
Signed-off-by: mattprost <matt.prost@ni.com>
2020-08-04 15:40:30 -05:00