aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/usrp/dboard_manager.cpp
diff options
context:
space:
mode:
authorJosh Blum <josh@joshknows.com>2010-10-20 17:41:59 -0700
committerJosh Blum <josh@joshknows.com>2010-10-20 17:41:59 -0700
commitd96b2e7587962c43c1db895b3340f9d868cbd704 (patch)
tree1bf3f1a77312695cef87e696be9eb905617c2ec3 /host/lib/usrp/dboard_manager.cpp
parent8e341caadf19db645635e3e7e1a26e6b00e64c70 (diff)
downloaduhd-d96b2e7587962c43c1db895b3340f9d868cbd704.tar.gz
uhd-d96b2e7587962c43c1db895b3340f9d868cbd704.tar.bz2
uhd-d96b2e7587962c43c1db895b3340f9d868cbd704.zip
usrp: use the dboard id to prefix the subdev gain group names
Diffstat (limited to 'host/lib/usrp/dboard_manager.cpp')
-rw-r--r--host/lib/usrp/dboard_manager.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/host/lib/usrp/dboard_manager.cpp b/host/lib/usrp/dboard_manager.cpp
index 78daa1b4d..d7e7943c4 100644
--- a/host/lib/usrp/dboard_manager.cpp
+++ b/host/lib/usrp/dboard_manager.cpp
@@ -77,12 +77,13 @@ void dboard_manager::register_dboard(
get_xcvr_id_to_id_map()[tx_dboard_id] = rx_dboard_id;
}
+std::string dboard_id_t::to_cname(void) const{
+ if (not get_id_to_args_map().has_key(*this)) return "Unknown";
+ return get_id_to_args_map()[*this].get<1>();
+}
+
std::string dboard_id_t::to_pp_string(void) const{
- std::string name = "unknown";
- if (get_id_to_args_map().has_key(*this)){
- name = get_id_to_args_map()[*this].get<1>();
- }
- return str(boost::format("%s (%s)") % name % this->to_string());
+ return str(boost::format("%s (%s)") % this->to_cname() % this->to_string());
}
/***********************************************************************