aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/usrp/usrp_e
diff options
context:
space:
mode:
authorJosh Blum <josh@joshknows.com>2010-06-16 17:35:20 +0000
committerJosh Blum <josh@joshknows.com>2010-06-16 17:35:20 +0000
commite18a963fb5c35ba9ccf03986e8c82adfe44f0b89 (patch)
treefc3049fef0075dfa59c191b6729dfb0b3ae92f00 /host/lib/usrp/usrp_e
parent830ce3f8dfc0fcc29c4ad2165bab7a994a3082da (diff)
downloaduhd-e18a963fb5c35ba9ccf03986e8c82adfe44f0b89.tar.gz
uhd-e18a963fb5c35ba9ccf03986e8c82adfe44f0b89.tar.bz2
uhd-e18a963fb5c35ba9ccf03986e8c82adfe44f0b89.zip
usrp-e: added type device address argument to usrp-e
Diffstat (limited to 'host/lib/usrp/usrp_e')
-rw-r--r--host/lib/usrp/usrp_e/usrp_e_impl.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/host/lib/usrp/usrp_e/usrp_e_impl.cpp b/host/lib/usrp/usrp_e/usrp_e_impl.cpp
index 226825510..a534c74b2 100644
--- a/host/lib/usrp/usrp_e/usrp_e_impl.cpp
+++ b/host/lib/usrp/usrp_e/usrp_e_impl.cpp
@@ -44,6 +44,9 @@ static std::string abs_path(const std::string &file_path){
device_addrs_t usrp_e::find(const device_addr_t &hint){
device_addrs_t usrp_e_addrs;
+ //return an empty list of addresses when type is set to non-usrp-e
+ if (hint.has_key("type") and hint["type"] != "usrp-e") return usrp_e_addrs;
+
//device node not provided, assume its 0
if (not hint.has_key("node")){
device_addr_t new_addr = hint;
@@ -54,7 +57,7 @@ device_addrs_t usrp_e::find(const device_addr_t &hint){
//use the given device node name
if (fs::exists(hint["node"])){
device_addr_t new_addr;
- new_addr["name"] = "USRP-E";
+ new_addr["type"] = "usrp-e";
new_addr["node"] = abs_path(hint["node"]);
usrp_e_addrs.push_back(new_addr);
}