aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/rfnoc/rfnoc_graph.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'host/lib/rfnoc/rfnoc_graph.cpp')
-rw-r--r--host/lib/rfnoc/rfnoc_graph.cpp18
1 files changed, 18 insertions, 0 deletions
diff --git a/host/lib/rfnoc/rfnoc_graph.cpp b/host/lib/rfnoc/rfnoc_graph.cpp
index 35a5cb28c..0d0e03043 100644
--- a/host/lib/rfnoc/rfnoc_graph.cpp
+++ b/host/lib/rfnoc/rfnoc_graph.cpp
@@ -58,8 +58,25 @@ struct route_info_t
graph_edge_t src_static_edge;
graph_edge_t dst_static_edge;
};
+
} // namespace
+// Define an attorney to limit access to noc_block_base internals
+class rfnoc_graph_impl;
+namespace uhd { namespace rfnoc {
+
+class block_initializer
+{
+ static void post_init(noc_block_base::sptr block)
+ {
+ block->post_init();
+ }
+ friend rfnoc_graph_impl;
+};
+
+}} // namespace uhd::rfnoc
+
+
class rfnoc_graph_impl : public rfnoc_graph
{
public:
@@ -731,6 +748,7 @@ private:
try {
_block_registry->register_block(
block_factory_info.factory_fn(std::move(make_args_uptr)));
+ block_initializer::post_init(_block_registry->get_block(block_id));
} catch (...) {
UHD_LOG_ERROR(
LOG_ID, "Error during initialization of block " << block_id << "!");