diff options
author | Martin Braun <martin.braun@ettus.com> | 2019-06-05 12:05:30 -0700 |
---|---|---|
committer | Martin Braun <martin.braun@ettus.com> | 2019-11-26 11:49:25 -0800 |
commit | bba75b29feed2d3b42f9b6c4eb4bc574c09924c7 (patch) | |
tree | 49eb882993e936e80eddc44c39b68fe727b311fc /host/lib/include | |
parent | bb7ed79f012faa4c59e4c312dddc46822968e6c4 (diff) | |
download | uhd-bba75b29feed2d3b42f9b6c4eb4bc574c09924c7.tar.gz uhd-bba75b29feed2d3b42f9b6c4eb4bc574c09924c7.tar.bz2 uhd-bba75b29feed2d3b42f9b6c4eb4bc574c09924c7.zip |
rfnoc: Add mb_controller base class and X300/MPMD implementations
Diffstat (limited to 'host/lib/include')
-rw-r--r-- | host/lib/include/uhdlib/rfnoc/rfnoc_device.hpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/host/lib/include/uhdlib/rfnoc/rfnoc_device.hpp b/host/lib/include/uhdlib/rfnoc/rfnoc_device.hpp index 7197bc9c4..1c2997f80 100644 --- a/host/lib/include/uhdlib/rfnoc/rfnoc_device.hpp +++ b/host/lib/include/uhdlib/rfnoc/rfnoc_device.hpp @@ -9,6 +9,7 @@ #include <uhd/device.hpp> #include <uhd/exception.hpp> +#include <uhd/rfnoc/mb_controller.hpp> #include <uhdlib/rfnoc/client_zero.hpp> #include <uhdlib/rfnoc/mb_iface.hpp> #include <boost/shared_ptr.hpp> @@ -41,6 +42,12 @@ public: return *_iface_registry.at(mb_idx); } + //! Return a reference to an MB controller + mb_controller::sptr get_mb_controller(const size_t mb_idx) const + { + return _mbc_registry.at(mb_idx); + } + /*! Return the number of motherboards in this device */ size_t get_num_mbs() @@ -73,8 +80,14 @@ protected: _iface_registry.emplace(mb_idx, std::move(mb_if)); } + void register_mb_controller(const size_t mb_idx, mb_controller::sptr mbc) + { + _mbc_registry.emplace(mb_idx, mbc); + } + private: std::unordered_map<size_t, mb_iface::uptr> _iface_registry; + std::unordered_map<size_t, mb_controller::sptr> _mbc_registry; }; // class rfnoc_device }}} // namespace uhd::rfnoc::detail |