summaryrefslogtreecommitdiffstats
path: root/host/lib/device.cpp
diff options
context:
space:
mode:
authorJosh Blum <josh@joshknows.com>2010-02-25 12:48:51 -0800
committerJosh Blum <josh@joshknows.com>2010-02-25 12:48:51 -0800
commit3571f65a1184dd65be39bc19708cc316fd017497 (patch)
treecc9c0f7600c6f72807ab12f0ed6307d079af29a6 /host/lib/device.cpp
parentc12d6d0f5f2bbfd749b5a18b167ed7a485cd03a1 (diff)
downloaduhd-3571f65a1184dd65be39bc19708cc316fd017497.tar.gz
uhd-3571f65a1184dd65be39bc19708cc316fd017497.tar.bz2
uhd-3571f65a1184dd65be39bc19708cc316fd017497.zip
use a single addr param for the usrp2
Diffstat (limited to 'host/lib/device.cpp')
-rw-r--r--host/lib/device.cpp7
1 files changed, 2 insertions, 5 deletions
diff --git a/host/lib/device.cpp b/host/lib/device.cpp
index e376a5c50..f181d31e4 100644
--- a/host/lib/device.cpp
+++ b/host/lib/device.cpp
@@ -24,10 +24,7 @@ using namespace uhd;
device_addrs_t device::discover(const device_addr_t &hint){
device_addrs_t device_addrs;
- if (not hint.has_key("type")){
- //TODO call discover for others and append results
- }
- else if (hint["type"] == "udp"){
+ if (hint.has_key("addr")){
std::vector<device_addr_t> usrp2_addrs = usrp::usrp2::discover(hint);
device_addrs.insert(device_addrs.begin(), usrp2_addrs.begin(), usrp2_addrs.end());
}
@@ -53,7 +50,7 @@ device::sptr device::make(const device_addr_t &hint, size_t which){
//create the new device with the discovered address
//TODO only a usrp2 device will be made (until others are supported)
- if (hint.has_key("type") and hint["type"] == "udp"){
+ if (hint.has_key("addr")){
return usrp::usrp2::make(device_addrs.at(which));
}
throw std::runtime_error("cant make a device");