From 9dff7952f618360943470711636db64fe2376b40 Mon Sep 17 00:00:00 2001 From: Josh Blum Date: Thu, 4 Nov 2010 21:25:25 -0700 Subject: usrp: print eeprom key/value pairs in the probe app, fixed mac addr size --- host/utils/uhd_usrp_probe.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'host/utils/uhd_usrp_probe.cpp') diff --git a/host/utils/uhd_usrp_probe.cpp b/host/utils/uhd_usrp_probe.cpp index 8947034d7..8cea52fa6 100644 --- a/host/utils/uhd_usrp_probe.cpp +++ b/host/utils/uhd_usrp_probe.cpp @@ -26,6 +26,7 @@ #include #include #include +#include #include #include #include @@ -123,10 +124,9 @@ static std::string get_mboard_pp_string(wax::obj mboard){ std::stringstream ss; ss << boost::format("Mboard: %s") % mboard[usrp::MBOARD_PROP_NAME].as() << std::endl; //ss << std::endl; - BOOST_FOREACH(const std::string &other_name, mboard[usrp::MBOARD_PROP_OTHERS].as()){ - try{ - ss << boost::format("%s: %s") % other_name % mboard[other_name].as() << std::endl; - } catch(...){} + usrp::mboard_eeprom_t mb_eeprom = mboard[usrp::MBOARD_PROP_EEPROM_MAP].as(); + BOOST_FOREACH(const std::string &key, mb_eeprom.keys()){ + if (not mb_eeprom[key].empty()) ss << boost::format("%s: %s") % key % mb_eeprom[key] << std::endl; } BOOST_FOREACH(const std::string &dsp_name, mboard[usrp::MBOARD_PROP_RX_DSP_NAMES].as()){ ss << make_border(get_dsp_pp_string("RX", mboard[named_prop_t(usrp::MBOARD_PROP_RX_DSP, dsp_name)])); -- cgit v1.2.3