summaryrefslogtreecommitdiffstats
path: root/host/examples
diff options
context:
space:
mode:
authorJosh Blum <josh@joshknows.com>2010-04-05 16:36:51 -0700
committerJosh Blum <josh@joshknows.com>2010-04-05 16:36:51 -0700
commit97496ace66842f9d7529793b2b202be9abe156c3 (patch)
treeb3c584cba724e346e353dd82560644edbf92bfd6 /host/examples
parent1cc8c6c964d4368d9e918e4cb357600453a24c94 (diff)
downloaduhd-97496ace66842f9d7529793b2b202be9abe156c3.tar.gz
uhd-97496ace66842f9d7529793b2b202be9abe156c3.tar.bz2
uhd-97496ace66842f9d7529793b2b202be9abe156c3.zip
simplified the usage of dboard, dsp, and mboard proxies.
removed the dict structure for each, we are just going to have one.
Diffstat (limited to 'host/examples')
-rw-r--r--host/examples/rx_timed_samples.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/host/examples/rx_timed_samples.cpp b/host/examples/rx_timed_samples.cpp
index 7b06981b2..e971e9f6a 100644
--- a/host/examples/rx_timed_samples.cpp
+++ b/host/examples/rx_timed_samples.cpp
@@ -29,6 +29,7 @@ int UHD_SAFE_MAIN(int argc, char *argv[]){
std::string transport_args;
int seconds_in_future;
size_t total_num_samps;
+ double rx_rate;
//setup the program options
po::options_description desc("Allowed options");
@@ -37,6 +38,7 @@ int UHD_SAFE_MAIN(int argc, char *argv[]){
("args", po::value<std::string>(&transport_args)->default_value(""), "simple uhd transport 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")
;
po::variables_map vm;
po::store(po::parse_command_line(argc, argv, desc), vm);
@@ -57,9 +59,9 @@ int UHD_SAFE_MAIN(int argc, char *argv[]){
std::cout << boost::format("Using Device: %s") % sdev->get_name() << std::endl;
//set properties on the device
- double rx_rate = 100e6/16; //FIXME get this from somewhere
std::cout << boost::format("Setting RX Rate: %f Msps...") % (rx_rate/1e6) << std::endl;
sdev->set_rx_rate(rx_rate);
+ std::cout << boost::format("Actual RX Rate: %f Msps...") % (sdev->get_rx_rate()/1e6) << std::endl;
std::cout << boost::format("Setting device timestamp to 0...") << std::endl;
sdev->set_time_now(uhd::time_spec_t(0));