diff options
author | Martin Braun <martin.braun@ettus.com> | 2017-05-18 12:48:24 -0700 |
---|---|---|
committer | Martin Braun <martin.braun@ettus.com> | 2017-12-22 15:03:53 -0800 |
commit | 0e4eca71df0c8de32c954ff0d6d400e7d90dfc5e (patch) | |
tree | 8ea25af0fbb6f4d80e42d9e71ebabe541e35cb5a /host | |
parent | 06afc8eeef428d1fbd084552eaa64ef74b939d11 (diff) | |
download | uhd-0e4eca71df0c8de32c954ff0d6d400e7d90dfc5e.tar.gz uhd-0e4eca71df0c8de32c954ff0d6d400e7d90dfc5e.tar.bz2 uhd-0e4eca71df0c8de32c954ff0d6d400e7d90dfc5e.zip |
mpmd: Read transport IP address from device args
Diffstat (limited to 'host')
-rw-r--r-- | host/lib/usrp/netd/netd_impl.cpp | 11 | ||||
-rw-r--r-- | host/lib/usrp/netd/netd_impl.hpp | 1 |
2 files changed, 8 insertions, 4 deletions
diff --git a/host/lib/usrp/netd/netd_impl.cpp b/host/lib/usrp/netd/netd_impl.cpp index f412d0f0f..d57fbd901 100644 --- a/host/lib/usrp/netd/netd_impl.cpp +++ b/host/lib/usrp/netd/netd_impl.cpp @@ -38,6 +38,7 @@ using namespace uhd; netd_mboard_impl::netd_mboard_impl(const std::string& addr) : rpc(addr, MPM_RPC_PORT) { + UHD_LOG_TRACE("MPMD", "Initializing mboard, IP address: " << addr); std::map<std::string, std::string> _dev_info = rpc.call<dev_info>("get_device_info"); device_info = @@ -92,10 +93,12 @@ 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) +netd_impl::netd_impl(const device_addr_t& device_addr) + : usrp::device3_impl() + , _device_addr(device_addr) + , _sid_framer(0) { - UHD_LOGGER_INFO("NETD") << "NETD initialization sequence..."; + UHD_LOGGER_INFO("NETD") << "NETD initialization sequence. Device args: " << device_addr.to_string(); _tree->create<std::string>("/name").set("NETD - Series device"); const device_addrs_t device_args = separate_device_addr(device_addr); _mb.reserve(device_args.size()); @@ -216,7 +219,7 @@ both_xports_t netd_impl::make_transport(const sid_t& address, std::cout << address.get_dst_addr() << std::endl; */ - std::string interface_addr = "192.168.10.2"; + std::string interface_addr = _device_addr["addr"]; const uint32_t xbar_src_addr = address.get_src_addr(); const uint32_t xbar_src_dst = 0; diff --git a/host/lib/usrp/netd/netd_impl.hpp b/host/lib/usrp/netd/netd_impl.hpp index ffd794735..b8a3988f2 100644 --- a/host/lib/usrp/netd/netd_impl.hpp +++ b/host/lib/usrp/netd/netd_impl.hpp @@ -84,6 +84,7 @@ class netd_impl : public uhd::usrp::device3_impl private: uhd::device_addr_t get_rx_hints(size_t mb_index); + uhd::device_addr_t _device_addr; std::vector<netd_mboard_impl::uptr> _mb; size_t _sid_framer; }; |