aboutsummaryrefslogtreecommitdiffstats
path: root/host/include
diff options
context:
space:
mode:
authorMartin Braun <martin.braun@ettus.com>2019-06-03 19:22:23 -0700
committerMartin Braun <martin.braun@ettus.com>2019-11-26 11:49:23 -0800
commit6460e07f91bc468e7c094785093426ee07e26bcb (patch)
tree649ac875f5c54c7a94ff8fee1b470d63f5a265d1 /host/include
parent0f8718176993b3460b12720e639b030be9b86943 (diff)
downloaduhd-6460e07f91bc468e7c094785093426ee07e26bcb.tar.gz
uhd-6460e07f91bc468e7c094785093426ee07e26bcb.tar.bz2
uhd-6460e07f91bc468e7c094785093426ee07e26bcb.zip
rfnoc: noc_block_base: Pass args into block on construction
These args come from the framework, e.g., because the UHD session was launched with them.
Diffstat (limited to 'host/include')
-rw-r--r--host/include/uhd/rfnoc/noc_block_base.hpp8
-rw-r--r--host/include/uhd/rfnoc/noc_block_make_args.hpp3
2 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 6396d64df..fb26f6089 100644
--- a/host/include/uhd/rfnoc/noc_block_base.hpp
+++ b/host/include/uhd/rfnoc/noc_block_base.hpp
@@ -11,6 +11,7 @@
#include <uhd/rfnoc/block_id.hpp>
#include <uhd/rfnoc/node.hpp>
#include <uhd/rfnoc/register_iface_holder.hpp>
+#include <uhd/types/device_addr.hpp>
//! Shorthand for block constructor
#define RFNOC_BLOCK_CONSTRUCTOR(CLASS_NAME) \
@@ -100,6 +101,10 @@ public:
*/
double get_tick_rate() const { return _tick_rate; }
+ /*! Return the arguments that were passed into this block from the framework
+ */
+ uhd::device_addr_t get_block_args() const { return _block_args; }
+
protected:
noc_block_base(make_args_ptr make_args);
@@ -184,6 +189,9 @@ private:
// block had requested and was granted access
std::shared_ptr<mb_controller> _mb_controller;
+ //! Arguments that were passed into this block
+ const uhd::device_addr_t _block_args;
+
}; // class noc_block_base
}} /* namespace uhd::rfnoc */
diff --git a/host/include/uhd/rfnoc/noc_block_make_args.hpp b/host/include/uhd/rfnoc/noc_block_make_args.hpp
index 2d42d476e..8a5fbd46f 100644
--- a/host/include/uhd/rfnoc/noc_block_make_args.hpp
+++ b/host/include/uhd/rfnoc/noc_block_make_args.hpp
@@ -51,6 +51,9 @@ struct noc_block_base::make_args_t
//! The subtree for this block
uhd::property_tree::sptr tree;
+
+ //! Additional args that can be parsed and used by this block
+ uhd::device_addr_t args;
};
}} /* namespace uhd::rfnoc */