aboutsummaryrefslogtreecommitdiffstats
path: root/host
diff options
context:
space:
mode:
authorAndrej Rode <andrej.rode@ettus.com>2017-04-11 15:56:13 -0700
committerMartin Braun <martin.braun@ettus.com>2017-12-22 15:03:45 -0800
commitf27cb2a7711e428a88c59a5af762055c7f1e3e13 (patch)
tree98cf05cc04bd0a96a8f67df38e11729991d9a743 /host
parentc8ae32253b649faea27dcf0d98fd0395924a2eec (diff)
downloaduhd-f27cb2a7711e428a88c59a5af762055c7f1e3e13.tar.gz
uhd-f27cb2a7711e428a88c59a5af762055c7f1e3e13.tar.bz2
uhd-f27cb2a7711e428a88c59a5af762055c7f1e3e13.zip
uhd: add a simple make_transport to netd_impl
Diffstat (limited to 'host')
-rw-r--r--host/lib/usrp/netd/netd_impl.cpp18
-rw-r--r--host/lib/usrp/netd/netd_impl.hpp5
2 files changed, 14 insertions, 9 deletions
diff --git a/host/lib/usrp/netd/netd_impl.cpp b/host/lib/usrp/netd/netd_impl.cpp
index 0b4da86ef..555aedea5 100644
--- a/host/lib/usrp/netd/netd_impl.cpp
+++ b/host/lib/usrp/netd/netd_impl.cpp
@@ -53,8 +53,8 @@ netd_mboard_impl::netd_mboard_impl(const std::string& addr)
};
boost::this_thread::sleep_for(boost::chrono::milliseconds(1000));
});
- std::vector<std::string> data_ifaces =
- rpc.call<std::vector<std::string>>("get_interfaces", _rpc_token);
+ // std::vector<std::string> data_ifaces =
+ // rpc.call<std::vector<std::string>>("get_interfaces", _rpc_token);
// discover path to device and tell MPM our MAC address seen at the data
// interfaces
@@ -81,9 +81,11 @@ netd_mboard_impl::uptr netd_mboard_impl::make(const std::string& addr)
return mb;
}
-bool netd_mboard_impl::claim() { return rpc.call<bool>("claim", _rpc_token); }
+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()
+netd_impl::netd_impl(const device_addr_t& device_addr) :
+ usrp::device3_impl(),
+ _sid_framer(0)
{
UHD_LOGGER_INFO("NETD") << "NETD initialization sequence...";
_tree->create<std::string>("/name").set("NETD - Series device");
@@ -151,9 +153,9 @@ netd_mboard_impl::uptr netd_impl::setup_mb(const size_t mb_i,
// }
// Everything fake below here
-both_xports_t netd_impl::make_transport(const sid_t&,
- usrp::device3_impl::xport_type_t,
- const uhd::device_addr_t&)
+both_xports_t netd_impl::make_transport(const sid_t& address,
+ usrp::device3_impl::xport_type_t xport_type,
+ const uhd::device_addr_t& args)
{
//const size_t mb_index = address.get_dst_addr();
size_t mb_index = 0;
@@ -191,8 +193,6 @@ both_xports_t netd_impl::make_transport(const sid_t&,
xports.send_sid = _mb[mb_index]->allocate_sid(port, address, xbar_src_addr, xbar_src_dst);
xports.recv_sid = xports.send_sid.reversed();
- //std::cout << xports.send_sid << std::endl;
- //std::cout << xports.recv_sid << std::endl;
xports.recv_buff_size = buff_params.recv_buff_size;
xports.send_buff_size = buff_params.send_buff_size;
diff --git a/host/lib/usrp/netd/netd_impl.hpp b/host/lib/usrp/netd/netd_impl.hpp
index 418f3aef6..4b08f50cd 100644
--- a/host/lib/usrp/netd/netd_impl.hpp
+++ b/host/lib/usrp/netd/netd_impl.hpp
@@ -54,6 +54,10 @@ class netd_mboard_impl
std::string loaded_fpga_image;
std::string xport_path;
uhd::rpc_client rpc;
+ uhd::sid_t allocate_sid(const uint16_t port,
+ const uhd::sid_t address,
+ const uint32_t xbar_src_addr,
+ const uint32_t xbar_src_dst);
private:
bool claim();
@@ -76,6 +80,7 @@ class netd_impl : public uhd::usrp::device3_impl
private:
std::vector<netd_mboard_impl::uptr> _mb;
+ size_t _sid_framer;
};
uhd::device_addrs_t netd_find(const uhd::device_addr_t& hint_);
#endif /* INCLUDED_NETD_IMPL_HPP */