diff options
author | Martin Braun <martin.braun@ettus.com> | 2019-05-30 14:21:41 -0700 |
---|---|---|
committer | Martin Braun <martin.braun@ettus.com> | 2019-11-26 11:49:18 -0800 |
commit | 6ec8cf3eeac70d4458ad7a4f7f1eea4f082c140d (patch) | |
tree | b85288ac4916432aba5ff287acaac0e014c36b0f /host/lib/rfnoc/registry_factory.cpp | |
parent | 36853315741aaba41af91cca93c742a6171ae46d (diff) | |
download | uhd-6ec8cf3eeac70d4458ad7a4f7f1eea4f082c140d.tar.gz uhd-6ec8cf3eeac70d4458ad7a4f7f1eea4f082c140d.tar.bz2 uhd-6ec8cf3eeac70d4458ad7a4f7f1eea4f082c140d.zip |
rfnoc: Add default block controller
The default block controller should get instantiated when no other
suitable block controller can be found.
Diffstat (limited to 'host/lib/rfnoc/registry_factory.cpp')
-rw-r--r-- | host/lib/rfnoc/registry_factory.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/host/lib/rfnoc/registry_factory.cpp b/host/lib/rfnoc/registry_factory.cpp index cf7b897f7..e9ad4f89c 100644 --- a/host/lib/rfnoc/registry_factory.cpp +++ b/host/lib/rfnoc/registry_factory.cpp @@ -6,6 +6,7 @@ #include <uhd/exception.hpp> #include <uhd/rfnoc/registry.hpp> +#include <uhd/rfnoc/defaults.hpp> #include <uhd/utils/static.hpp> #include <uhdlib/rfnoc/factory.hpp> #include <unordered_map> @@ -81,7 +82,7 @@ std::pair<registry::factory_t, std::string> factory::get_block_factory( UHD_LOG_WARNING("RFNOC::BLOCK_FACTORY", "Could not find block with Noc-ID " << std::hex << std::setw(sizeof(noc_block_base::noc_id_t) * 2) << noc_id); - throw uhd::key_error("Block not found!"); + noc_id = DEFAULT_NOC_ID; } auto& block_info = get_direct_block_registry().at(noc_id); return {std::get<1>(block_info), std::get<0>(block_info)}; |