aboutsummaryrefslogtreecommitdiffstats
path: root/host
diff options
context:
space:
mode:
authorMartin Braun <martin.braun@ettus.com>2020-01-29 11:44:05 -0800
committeratrnati <54334261+atrnati@users.noreply.github.com>2020-02-04 08:11:16 -0600
commitdefcb174ebb274d4621a2b958a78ed6cb6cd6aed (patch)
treed979270c1a704fec855e6b7b7435600c6ebdd87f /host
parent1fb1ac4e2939197a6642ac1631a4c2e3c07ae00d (diff)
downloaduhd-defcb174ebb274d4621a2b958a78ed6cb6cd6aed.tar.gz
uhd-defcb174ebb274d4621a2b958a78ed6cb6cd6aed.tar.bz2
uhd-defcb174ebb274d4621a2b958a78ed6cb6cd6aed.zip
multi_usrp: Add get_tree() API call
This allows access to the underlying property tree without having to refer to the device object. Useful for RFNoC objects, where the device object is not accessible.
Diffstat (limited to 'host')
-rw-r--r--host/include/uhd/usrp/multi_usrp.hpp4
-rw-r--r--host/lib/usrp/multi_usrp.cpp5
-rw-r--r--host/lib/usrp/multi_usrp_rfnoc.cpp5
3 files changed, 14 insertions, 0 deletions
diff --git a/host/include/uhd/usrp/multi_usrp.hpp b/host/include/uhd/usrp/multi_usrp.hpp
index 3e2cf0a47..f6a68ef3e 100644
--- a/host/include/uhd/usrp/multi_usrp.hpp
+++ b/host/include/uhd/usrp/multi_usrp.hpp
@@ -127,6 +127,10 @@ public:
*/
virtual device::sptr get_device(void) = 0;
+ /*! Return a reference to the property tree
+ */
+ virtual uhd::property_tree::sptr get_tree(void) const = 0;
+
//! Convenience method to get a RX streamer. See also uhd::device::get_rx_stream().
virtual rx_streamer::sptr get_rx_stream(const stream_args_t& args) = 0;
diff --git a/host/lib/usrp/multi_usrp.cpp b/host/lib/usrp/multi_usrp.cpp
index 202f8b2df..0ea25b099 100644
--- a/host/lib/usrp/multi_usrp.cpp
+++ b/host/lib/usrp/multi_usrp.cpp
@@ -405,6 +405,11 @@ public:
return _dev;
}
+ uhd::property_tree::sptr get_tree() const
+ {
+ return _tree;
+ }
+
dict<std::string, std::string> get_usrp_rx_info(size_t chan){
mboard_chan_pair mcp = rx_chan_to_mcp(chan);
dict<std::string, std::string> usrp_info;
diff --git a/host/lib/usrp/multi_usrp_rfnoc.cpp b/host/lib/usrp/multi_usrp_rfnoc.cpp
index b2070c53d..b34860989 100644
--- a/host/lib/usrp/multi_usrp_rfnoc.cpp
+++ b/host/lib/usrp/multi_usrp_rfnoc.cpp
@@ -161,6 +161,11 @@ public:
return nullptr;
}
+ uhd::property_tree::sptr get_tree() const
+ {
+ return _tree;
+ }
+
rx_streamer::sptr get_rx_stream(const stream_args_t& args_)
{
std::lock_guard<std::recursive_mutex> l(_graph_mutex);