summaryrefslogtreecommitdiffstats
path: root/host/examples
diff options
context:
space:
mode:
authorJosh Blum <josh@joshknows.com>2010-04-20 12:05:33 -0700
committerJosh Blum <josh@joshknows.com>2010-04-20 12:05:33 -0700
commiteae0bec99bca5efa1e86faa03132ec5e8aca5fe5 (patch)
tree12a51e33d54293e2b7911f202fc5ae233fdae7ae /host/examples
parent6b015b1c517733e85cb0c08a379e8d20377bf2fa (diff)
downloaduhd-eae0bec99bca5efa1e86faa03132ec5e8aca5fe5.tar.gz
uhd-eae0bec99bca5efa1e86faa03132ec5e8aca5fe5.tar.bz2
uhd-eae0bec99bca5efa1e86faa03132ec5e8aca5fe5.zip
Created args string contructor for device address.
Using the args string for the find devices app. Added documentation to simple usrp.
Diffstat (limited to 'host/examples')
-rw-r--r--host/examples/rx_timed_samples.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/host/examples/rx_timed_samples.cpp b/host/examples/rx_timed_samples.cpp
index d49f7d182..4b8774036 100644
--- a/host/examples/rx_timed_samples.cpp
+++ b/host/examples/rx_timed_samples.cpp
@@ -26,7 +26,7 @@ namespace po = boost::program_options;
int UHD_SAFE_MAIN(int argc, char *argv[]){
//variables to be set by po
- std::string transport_args;
+ std::string args;
int seconds_in_future;
size_t total_num_samps;
double rx_rate;
@@ -35,7 +35,7 @@ int UHD_SAFE_MAIN(int argc, char *argv[]){
po::options_description desc("Allowed options");
desc.add_options()
("help", "help message")
- ("args", po::value<std::string>(&transport_args)->default_value(""), "simple uhd transport args")
+ ("args", po::value<std::string>(&args)->default_value(""), "simple uhd device address args")
("secs", po::value<int>(&seconds_in_future)->default_value(3), "number of seconds in the future to receive")
("nsamps", po::value<size_t>(&total_num_samps)->default_value(1000), "total number of samples to receive")
("rxrate", po::value<double>(&rx_rate)->default_value(100e6/16), "rate of incoming samples")
@@ -52,9 +52,8 @@ int UHD_SAFE_MAIN(int argc, char *argv[]){
//create a usrp device
std::cout << std::endl;
- std::cout << boost::format("Creating the usrp device with: %s...")
- % transport_args << std::endl;
- uhd::usrp::simple_usrp::sptr sdev = uhd::usrp::simple_usrp::make(transport_args);
+ std::cout << boost::format("Creating the usrp device with: %s...") % args << std::endl;
+ uhd::usrp::simple_usrp::sptr sdev = uhd::usrp::simple_usrp::make(args);
uhd::device::sptr dev = sdev->get_device();
std::cout << boost::format("Using Device: %s") % sdev->get_name() << std::endl;