aboutsummaryrefslogtreecommitdiffstats
path: root/host/utils
diff options
context:
space:
mode:
authorMartin Braun <martin.braun@ettus.com>2017-05-03 15:58:26 -0700
committerMartin Braun <martin.braun@ettus.com>2017-05-03 15:58:26 -0700
commitc88be9542d82798260feb55b0ee5500ff94713cd (patch)
treeac1262500ce386d7df9c241ac311c28087d9a074 /host/utils
parent9830730918ee9b93d9ed14bb53074ed02355ef4e (diff)
downloaduhd-c88be9542d82798260feb55b0ee5500ff94713cd.tar.gz
uhd-c88be9542d82798260feb55b0ee5500ff94713cd.tar.bz2
uhd-c88be9542d82798260feb55b0ee5500ff94713cd.zip
utils: Updated uhd_usrp_probe to be more lenient with missing properties
Diffstat (limited to 'host/utils')
-rw-r--r--host/utils/uhd_usrp_probe.cpp26
1 files changed, 16 insertions, 10 deletions
diff --git a/host/utils/uhd_usrp_probe.cpp b/host/utils/uhd_usrp_probe.cpp
index 5bb2ead5e..dc0f98832 100644
--- a/host/utils/uhd_usrp_probe.cpp
+++ b/host/utils/uhd_usrp_probe.cpp
@@ -179,24 +179,30 @@ static std::string get_mboard_pp_string(property_tree::sptr tree, const fs_path
const std::vector< std::string > clock_sources = tree->access<std::vector<std::string> >(path / "clock_source" / "options").get();
ss << "Clock sources: " << prop_names_to_pp_string(clock_sources) << std::endl;
}
- ss << "Sensors: " << prop_names_to_pp_string(tree->list(path / "sensors")) << std::endl;
+ if (tree->exists(path / "sensors")){
+ ss << "Sensors: " << prop_names_to_pp_string(tree->list(path / "sensors")) << std::endl;
+ }
if (tree->exists(path / "rx_dsps")){
for(const std::string &name: tree->list(path / "rx_dsps")){
ss << make_border(get_dsp_pp_string("RX", tree, path / "rx_dsps" / name));
}
}
- for(const std::string &name: tree->list(path / "dboards")){
- ss << make_border(get_dboard_pp_string("RX", tree, path / "dboards" / name));
- }
- if (tree->exists(path / "tx_dsps")){
- for(const std::string &name: tree->list(path / "tx_dsps")){
- ss << make_border(get_dsp_pp_string("TX", tree, path / "tx_dsps" / name));
+ if (tree->exists(path / "dboards")) {
+ for(const std::string &name: tree->list(path / "dboards")){
+ ss << make_border(get_dboard_pp_string("RX", tree, path / "dboards" / name));
+ }
+ if (tree->exists(path / "tx_dsps")){
+ for(const std::string &name: tree->list(path / "tx_dsps")){
+ ss << make_border(get_dsp_pp_string("TX", tree, path / "tx_dsps" / name));
+ }
+ }
+ for(const std::string &name: tree->list(path / "dboards")){
+ ss << make_border(get_dboard_pp_string("TX", tree, path / "dboards" / name));
}
}
- for(const std::string &name: tree->list(path / "dboards")){
- ss << make_border(get_dboard_pp_string("TX", tree, path / "dboards" / name));
- }
+ if (tree->exists(path / "xbar")){
ss << make_border(get_rfnoc_pp_string(tree, path / "xbar"));
+ }
}
catch (const uhd::lookup_error&) {
/* nop */