From 51742c90911ecd10ca8abfddaa851b510a4a5aa7 Mon Sep 17 00:00:00 2001 From: Martin Braun Date: Fri, 7 Jun 2019 16:53:21 -0700 Subject: rfnoc: rfnoc_device: Make get_mb_iface() pure virtual --- host/lib/include/uhdlib/rfnoc/rfnoc_device.hpp | 23 +---------------------- 1 file changed, 1 insertion(+), 22 deletions(-) diff --git a/host/lib/include/uhdlib/rfnoc/rfnoc_device.hpp b/host/lib/include/uhdlib/rfnoc/rfnoc_device.hpp index 1c2997f80..cbb9aa120 100644 --- a/host/lib/include/uhdlib/rfnoc/rfnoc_device.hpp +++ b/host/lib/include/uhdlib/rfnoc/rfnoc_device.hpp @@ -32,15 +32,7 @@ public: /*! Return a reference to the mb_iface for a given motherboard */ - uhd::rfnoc::mb_iface& get_mb_iface(const size_t mb_idx) - { - if (mb_idx >= _iface_registry.size()) { - throw uhd::index_error( - std::string("Cannot get mb_iface, invalid motherboard index: ") - + std::to_string(mb_idx)); - } - return *_iface_registry.at(mb_idx); - } + virtual uhd::rfnoc::mb_iface& get_mb_iface(const size_t mb_idx) = 0; //! Return a reference to an MB controller mb_controller::sptr get_mb_controller(const size_t mb_idx) const @@ -48,13 +40,6 @@ public: return _mbc_registry.at(mb_idx); } - /*! Return the number of motherboards in this device - */ - size_t get_num_mbs() - { - return _iface_registry.size(); - } - //! Directly getting a streamer no longer supported uhd::rx_streamer::sptr get_rx_stream(const stream_args_t&) { @@ -75,18 +60,12 @@ public: protected: - void register_mb_iface(const size_t mb_idx, mb_iface* mb_if) - { - _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 _iface_registry; std::unordered_map _mbc_registry; }; // class rfnoc_device -- cgit v1.2.3