aboutsummaryrefslogtreecommitdiffstats
path: root/host/include
diff options
context:
space:
mode:
authorMartin Braun <martin.braun@ettus.com>2022-01-26 09:52:48 +0100
committerAaron Rossetto <aaron.rossetto@ni.com>2022-02-01 14:39:35 -0600
commitc3327801ca43f3fdeca669e3aff470ce05e439a0 (patch)
tree3615492eba2327c3299e36cfe34215025bf0af29 /host/include
parent13f4b9ec43e581f994a235619495ccd06c98ad54 (diff)
downloaduhd-c3327801ca43f3fdeca669e3aff470ce05e439a0.tar.gz
uhd-c3327801ca43f3fdeca669e3aff470ce05e439a0.tar.bz2
uhd-c3327801ca43f3fdeca669e3aff470ce05e439a0.zip
rfnoc: Add post_init() method to noc_block_base
This method allows running a fixed set of rules to check the internal consistency of a block. This may be necessary, because blocks authors may incorrectly implement a certain design rule, and we want the ability to not start an RFNoC graph with blocks that have rule violations which we can write checks for.
Diffstat (limited to 'host/include')
-rw-r--r--host/include/uhd/rfnoc/noc_block_base.hpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/host/include/uhd/rfnoc/noc_block_base.hpp b/host/include/uhd/rfnoc/noc_block_base.hpp
index b9ebda63b..b18de41fc 100644
--- a/host/include/uhd/rfnoc/noc_block_base.hpp
+++ b/host/include/uhd/rfnoc/noc_block_base.hpp
@@ -311,6 +311,8 @@ protected:
virtual void deinit();
private:
+ friend struct block_initializer;
+
/*! Update the tick rate of this block
*
* This will make sure that the underlying register_iface is notified of the
@@ -325,6 +327,15 @@ private:
*/
void shutdown() override;
+ /*! Run post-init tasks, i.e., after the constructor concludes.
+ *
+ * The purpose of this method is to make sure the block is in a good state
+ * after the block controller's ctor has concluded. This allows checking
+ * that block configurations follow certain rules, even though they may not
+ * even be part of UHD.
+ */
+ void post_init();
+
/**************************************************************************
* Attributes
**************************************************************************/