aboutsummaryrefslogtreecommitdiffstats
path: root/host
diff options
context:
space:
mode:
authorMartin Braun <martin.braun@ettus.com>2019-06-07 16:53:21 -0700
committerMartin Braun <martin.braun@ettus.com>2019-11-26 11:49:27 -0800
commit51742c90911ecd10ca8abfddaa851b510a4a5aa7 (patch)
tree2126accbfbbd8fdc3347c7ca6ffcda7627ce6080 /host
parent20baa413a08cdf42ec30d6bc0aeb0c665ee590fe (diff)
downloaduhd-51742c90911ecd10ca8abfddaa851b510a4a5aa7.tar.gz
uhd-51742c90911ecd10ca8abfddaa851b510a4a5aa7.tar.bz2
uhd-51742c90911ecd10ca8abfddaa851b510a4a5aa7.zip
rfnoc: rfnoc_device: Make get_mb_iface() pure virtual
Diffstat (limited to 'host')
-rw-r--r--host/lib/include/uhdlib/rfnoc/rfnoc_device.hpp23
1 files changed, 1 insertions, 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<size_t, mb_iface::uptr> _iface_registry;
std::unordered_map<size_t, mb_controller::sptr> _mbc_registry;
}; // class rfnoc_device