diff options
Diffstat (limited to 'host/lib/rfnoc/mock_block.cpp')
-rw-r--r-- | host/lib/rfnoc/mock_block.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/host/lib/rfnoc/mock_block.cpp b/host/lib/rfnoc/mock_block.cpp index ee35eae7e..834803bd5 100644 --- a/host/lib/rfnoc/mock_block.cpp +++ b/host/lib/rfnoc/mock_block.cpp @@ -18,13 +18,15 @@ uhd::rfnoc::mock_block_container uhd::rfnoc::get_mock_block(const noc_id_t noc_i const size_t num_outputs, const device_addr_t& args, const size_t mtu, - const device_type_t device_id) + const device_type_t device_id, + std::shared_ptr<mock_reg_iface_t> client_reg_iface) { block_factory_info_t fac_info = factory::get_block_factory(noc_id, device_id); mock_block_container ret_val; ret_val.factory = fac_info.factory_fn; - ret_val.reg_iface = std::make_shared<mock_reg_iface_t>(); + ret_val.reg_iface = (client_reg_iface) ? client_reg_iface + : std::make_shared<mock_reg_iface_t>(); ret_val.tree = uhd::property_tree::make(); // Create make args ret_val.make_args = std::make_unique<noc_block_base::make_args_t>(); |