aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/rfnoc
diff options
context:
space:
mode:
authorMartin Braun <martin.braun@ettus.com>2019-05-21 17:08:07 -0700
committerBrent Stapleton <brent.stapleton@ettus.com>2019-07-15 10:12:33 -0700
commit7e1b567d538011df383c62239ca52fe6887d54d9 (patch)
treed6d672e4e0d42901b92163ae0a08acafa5d518f8 /host/lib/rfnoc
parentcd755b0a51bb136ce4f17a83157c4d8fe5ffa972 (diff)
downloaduhd-7e1b567d538011df383c62239ca52fe6887d54d9.tar.gz
uhd-7e1b567d538011df383c62239ca52fe6887d54d9.tar.bz2
uhd-7e1b567d538011df383c62239ca52fe6887d54d9.zip
rfnoc: Add update_graph() API call
Blocks that change scaling, tick rate, or sampling rate can now notify the graph to update streamers. Before, this was handled only by mult_usrp, and only for DDC and DUC blocks.
Diffstat (limited to 'host/lib/rfnoc')
-rw-r--r--host/lib/rfnoc/ddc_block_ctrl_impl.cpp9
-rw-r--r--host/lib/rfnoc/duc_block_ctrl_impl.cpp6
-rw-r--r--host/lib/rfnoc/legacy_compat.cpp6
3 files changed, 9 insertions, 12 deletions
diff --git a/host/lib/rfnoc/ddc_block_ctrl_impl.cpp b/host/lib/rfnoc/ddc_block_ctrl_impl.cpp
index 7785d525d..13bf43072 100644
--- a/host/lib/rfnoc/ddc_block_ctrl_impl.cpp
+++ b/host/lib/rfnoc/ddc_block_ctrl_impl.cpp
@@ -52,11 +52,12 @@ public:
.set_coercer([this, chan](const double value) {
return this->set_output_rate(value, chan);
})
- .set(default_output_rate);
+ .set(default_output_rate)
+ .add_coerced_subscriber([this](const double) { update_graph(); });
_tree->access<double>(get_arg_path("input_rate/value", chan))
- .add_coerced_subscriber([this, chan](const double rate) {
- this->set_input_rate(rate, chan);
- });
+ .add_coerced_subscriber(
+ [this, chan](const double rate) { this->set_input_rate(rate, chan); })
+ .add_coerced_subscriber([this](const double) { update_graph(); });
// Legacy properties (for backward compat w/ multi_usrp)
const uhd::fs_path dsp_base_path = _root_path / "legacy_api" / chan;
diff --git a/host/lib/rfnoc/duc_block_ctrl_impl.cpp b/host/lib/rfnoc/duc_block_ctrl_impl.cpp
index 0a24fcc31..18f6c9fb5 100644
--- a/host/lib/rfnoc/duc_block_ctrl_impl.cpp
+++ b/host/lib/rfnoc/duc_block_ctrl_impl.cpp
@@ -53,11 +53,13 @@ public:
.set_coercer([this, chan](const double value) {
return this->set_input_rate(value, chan);
})
- .set(default_input_rate);
+ .set(default_input_rate)
+ .add_coerced_subscriber([this](const double) { update_graph(); });
_tree->access<double>(get_arg_path("output_rate/value", chan))
.add_coerced_subscriber([this, chan](const double rate) {
this->set_output_rate(rate, chan);
- });
+ })
+ .add_coerced_subscriber([this](const double) { update_graph(); });
// Legacy properties (for backward compat w/ multi_usrp)
const uhd::fs_path dsp_base_path = _root_path / "legacy_api" / chan;
diff --git a/host/lib/rfnoc/legacy_compat.cpp b/host/lib/rfnoc/legacy_compat.cpp
index 3f2bc9584..30c3f628f 100644
--- a/host/lib/rfnoc/legacy_compat.cpp
+++ b/host/lib/rfnoc/legacy_compat.cpp
@@ -406,9 +406,6 @@ public:
.set(rate);
}
}
- // Update streamers:
- boost::dynamic_pointer_cast<uhd::usrp::device3_impl>(_device)
- ->update_rx_streamers();
}
void set_tx_rate(const double rate, const size_t chan)
@@ -458,9 +455,6 @@ public:
.set(rate);
}
}
- // Update streamers:
- boost::dynamic_pointer_cast<uhd::usrp::device3_impl>(_device)
- ->update_tx_streamers();
}
private: // types