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.
This commit is contained in:
Martin Braun 2020-01-29 11:44:05 -08:00 committed by atrnati
parent 1fb1ac4e29
commit defcb174eb
3 changed files with 14 additions and 0 deletions

View file

@ -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;

View file

@ -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;

View file

@ -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);