From 7e1b567d538011df383c62239ca52fe6887d54d9 Mon Sep 17 00:00:00 2001 From: Martin Braun Date: Tue, 21 May 2019 17:08:07 -0700 Subject: 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. --- host/lib/rfnoc/ddc_block_ctrl_impl.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'host/lib/rfnoc/ddc_block_ctrl_impl.cpp') 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(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; -- cgit v1.2.3