From 3571f65a1184dd65be39bc19708cc316fd017497 Mon Sep 17 00:00:00 2001 From: Josh Blum Date: Thu, 25 Feb 2010 12:48:51 -0800 Subject: use a single addr param for the usrp2 --- host/apps/discover_usrps.cpp | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) (limited to 'host/apps/discover_usrps.cpp') diff --git a/host/apps/discover_usrps.cpp b/host/apps/discover_usrps.cpp index 02c05b7cc..08135a27c 100644 --- a/host/apps/discover_usrps.cpp +++ b/host/apps/discover_usrps.cpp @@ -22,13 +22,12 @@ #include namespace po = boost::program_options; -using namespace uhd; int main(int argc, char *argv[]){ po::options_description desc("Allowed options"); desc.add_options() ("help", "help message") - ("ip-addr", po::value(), "usrp2 ip address") + ("addr", po::value(), "resolvable network address") ; po::variables_map vm; @@ -41,13 +40,12 @@ int main(int argc, char *argv[]){ return ~0; } - //extract the ip address (not optional for now) + //extract the address (not optional for now) uhd::device_addr_t device_addr; - device_addr["type"] = "udp"; - if (vm.count("ip-addr")) { - device_addr["addr"] = vm["ip-addr"].as(); + if (vm.count("addr")) { + device_addr["addr"] = vm["addr"].as(); } else { - std::cout << "IP Addess was not set" << std::endl; + std::cout << "The address was not set" << std::endl; return ~0; } @@ -59,7 +57,7 @@ int main(int argc, char *argv[]){ std::cout << "--------------------------------------------------" << std::endl; std::cout << device_addrs[i] << std::endl << std::endl; //make each device just to test (TODO: remove this) - uhd::device::sptr dev = device::make(device_addrs[i]); + uhd::device::sptr dev = uhd::device::make(device_addrs[i]); std::cout << wax::cast((*dev)[uhd::DEVICE_PROP_MBOARD][uhd::MBOARD_PROP_NAME]) << std::endl; } -- cgit v1.2.3