From eae0bec99bca5efa1e86faa03132ec5e8aca5fe5 Mon Sep 17 00:00:00 2001 From: Josh Blum Date: Tue, 20 Apr 2010 12:05:33 -0700 Subject: Created args string contructor for device address. Using the args string for the find devices app. Added documentation to simple usrp. --- host/utils/uhd_find_devices.cpp | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) (limited to 'host/utils/uhd_find_devices.cpp') diff --git a/host/utils/uhd_find_devices.cpp b/host/utils/uhd_find_devices.cpp index 6c945cbca..8222dc1f4 100644 --- a/host/utils/uhd_find_devices.cpp +++ b/host/utils/uhd_find_devices.cpp @@ -27,8 +27,7 @@ int UHD_SAFE_MAIN(int argc, char *argv[]){ po::options_description desc("Allowed options"); desc.add_options() ("help", "help message") - ("addr", po::value(), "resolvable network address") - ("node", po::value(), "path to linux device node") + ("args", po::value()->default_value(""), "device address args") ; po::variables_map vm; @@ -41,17 +40,8 @@ int UHD_SAFE_MAIN(int argc, char *argv[]){ return ~0; } - //load the options into the address - uhd::device_addr_t device_addr; - if (vm.count("addr")){ - device_addr["addr"] = vm["addr"].as(); - } - if (vm.count("node")){ - device_addr["node"] = vm["node"].as(); - } - //discover the usrps and print the results - uhd::device_addrs_t device_addrs = uhd::device::find(device_addr); + uhd::device_addrs_t device_addrs = uhd::device::find(vm["args"].as()); if (device_addrs.size() == 0){ std::cerr << "No UHD Devices Found" << std::endl; -- cgit v1.2.3