aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/usrp/multi_usrp.cpp
diff options
context:
space:
mode:
authorJosh Blum <josh@joshknows.com>2011-06-29 11:03:20 -0700
committerJosh Blum <josh@joshknows.com>2011-06-29 11:03:20 -0700
commitbcd2c4e2839aefdb8c8031f51c08bbc8e2be447e (patch)
tree8a70be74a39bcb40ac45108a104989af87254cc2 /host/lib/usrp/multi_usrp.cpp
parentadbe1a0efe7598a9e0433675e2852aad2e280c62 (diff)
downloaduhd-bcd2c4e2839aefdb8c8031f51c08bbc8e2be447e.tar.gz
uhd-bcd2c4e2839aefdb8c8031f51c08bbc8e2be447e.tar.bz2
uhd-bcd2c4e2839aefdb8c8031f51c08bbc8e2be447e.zip
usrp: filled in the to pp string method
Diffstat (limited to 'host/lib/usrp/multi_usrp.cpp')
-rw-r--r--host/lib/usrp/multi_usrp.cpp49
1 files changed, 48 insertions, 1 deletions
diff --git a/host/lib/usrp/multi_usrp.cpp b/host/lib/usrp/multi_usrp.cpp
index 4c16772b3..c3926b6c4 100644
--- a/host/lib/usrp/multi_usrp.cpp
+++ b/host/lib/usrp/multi_usrp.cpp
@@ -215,7 +215,54 @@ public:
}
std::string get_pp_string(void){
- return "TODO";
+ std::string buff = str(boost::format(
+ "%s USRP:\n"
+ " Device: %s\n"
+ )
+ % ((get_num_mboards() > 1)? "Multi" : "Single")
+ % (_tree->access<std::string>("/name").get())
+ );
+ for (size_t m = 0; m < get_num_mboards(); m++){
+ buff += str(boost::format(
+ " Mboard %d: %s\n"
+ ) % m
+ % (_tree->access<std::string>(mb_root(m) / "name").get())
+ );
+ }
+
+ //----------- rx side of life ----------------------------------
+ for (size_t m = 0, chan = 0; m < get_num_mboards(); m++){
+ for (; chan < (m + 1)*get_rx_subdev_spec(m).size(); chan++){
+ buff += str(boost::format(
+ " RX Channel: %u\n"
+ " RX DSP: %s\n"
+ " RX Dboard: %s\n"
+ " RX Subdev: %s\n"
+ ) % chan
+ % rx_dsp_root(chan).leaf()
+ % rx_rf_fe_root(chan).branch_path().branch_path().leaf()
+ % (_tree->access<std::string>(rx_rf_fe_root(chan) / "name").get())
+ );
+ }
+ }
+
+ //----------- tx side of life ----------------------------------
+ for (size_t m = 0, chan = 0; m < get_num_mboards(); m++){
+ for (; chan < (m + 1)*get_tx_subdev_spec(m).size(); chan++){
+ buff += str(boost::format(
+ " TX Channel: %u\n"
+ " TX DSP: %s\n"
+ " TX Dboard: %s\n"
+ " TX Subdev: %s\n"
+ ) % chan
+ % tx_dsp_root(chan).leaf()
+ % tx_rf_fe_root(chan).branch_path().branch_path().leaf()
+ % (_tree->access<std::string>(tx_rf_fe_root(chan) / "name").get())
+ );
+ }
+ }
+
+ return buff;
}
std::string get_mboard_name(size_t mboard){