aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/usrp/netd
diff options
context:
space:
mode:
authorMoritz Fischer <moritz.fischer@ettus.com>2017-04-12 17:54:02 -0700
committerMartin Braun <martin.braun@ettus.com>2017-12-22 15:03:45 -0800
commit58510168d5a033af1450f3ddf4d87ab8f8fa1a6a (patch)
treed4e9fa59394d2ba71daa7c42c429c513f7e41a30 /host/lib/usrp/netd
parent7f7111198816cbf1e0597f7ecc9f46e4c26e916b (diff)
downloaduhd-58510168d5a033af1450f3ddf4d87ab8f8fa1a6a.tar.gz
uhd-58510168d5a033af1450f3ddf4d87ab8f8fa1a6a.tar.bz2
uhd-58510168d5a033af1450f3ddf4d87ab8f8fa1a6a.zip
lib: usrp: magnesium: Stub out a radio_ctrl for magnesium
Signed-off-by: Moritz Fischer <moritz.fischer@ettus.com> Signed-off-by: Martin Braun <martin.braun@ettus.com>
Diffstat (limited to 'host/lib/usrp/netd')
-rw-r--r--host/lib/usrp/netd/netd_impl.cpp25
1 files changed, 23 insertions, 2 deletions
diff --git a/host/lib/usrp/netd/netd_impl.cpp b/host/lib/usrp/netd/netd_impl.cpp
index 555aedea5..5a8b3e59c 100644
--- a/host/lib/usrp/netd/netd_impl.cpp
+++ b/host/lib/usrp/netd/netd_impl.cpp
@@ -71,6 +71,15 @@ netd_mboard_impl::netd_mboard_impl(const std::string& addr)
//}
//}
}
+
+uhd::sid_t netd_mboard_impl::allocate_sid(const uint16_t port,
+ const uhd::sid_t address,
+ const uint32_t xbar_src_addr,
+ const uint32_t xbar_src_port){
+ const uint32_t sid = rpc.call<uint32_t>("allocate_sid", _rpc_token, port,
+ address.get(), xbar_src_addr, xbar_src_port);
+ return sid;
+}
netd_mboard_impl::~netd_mboard_impl() {}
netd_mboard_impl::uptr netd_mboard_impl::make(const std::string& addr)
@@ -84,8 +93,7 @@ netd_mboard_impl::uptr netd_mboard_impl::make(const std::string& addr)
bool netd_mboard_impl::claim() { return rpc.call<bool>("reclaim", _rpc_token); }
netd_impl::netd_impl(const device_addr_t& device_addr) :
- usrp::device3_impl(),
- _sid_framer(0)
+ usrp::device3_impl(), _sid_framer(0)
{
UHD_LOGGER_INFO("NETD") << "NETD initialization sequence...";
_tree->create<std::string>("/name").set("NETD - Series device");
@@ -94,6 +102,19 @@ netd_impl::netd_impl(const device_addr_t& device_addr) :
for (size_t mb_i = 0; mb_i < device_args.size(); ++mb_i) {
_mb.push_back(setup_mb(mb_i, device_args[mb_i]));
}
+
+ try {
+ enumerate_rfnoc_blocks(
+ 0,
+ 1,
+ 3, /* base port */
+ uhd::sid_t(0x0200),
+ device_addr
+ );
+ } catch (...) {
+ printf("%s Derp\n", __func__);
+ }
+
}
netd_impl::~netd_impl() {}