commit-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Commit-gnuradio] r6616 - gnuradio/branches/developers/gnychis/inband-pr


From: gnychis
Subject: [Commit-gnuradio] r6616 - gnuradio/branches/developers/gnychis/inband-profiling/usrp/host/apps-inband
Date: Thu, 11 Oct 2007 11:02:13 -0600 (MDT)

Author: gnychis
Date: 2007-10-11 11:02:13 -0600 (Thu, 11 Oct 2007)
New Revision: 6616

Modified:
   
gnuradio/branches/developers/gnychis/inband-profiling/usrp/host/apps-inband/test_usrp_inband_rx.cc
Log:
hard-coding the number of samples again


Modified: 
gnuradio/branches/developers/gnychis/inband-profiling/usrp/host/apps-inband/test_usrp_inband_rx.cc
===================================================================
--- 
gnuradio/branches/developers/gnychis/inband-profiling/usrp/host/apps-inband/test_usrp_inband_rx.cc
  2007-10-10 17:43:49 UTC (rev 6615)
+++ 
gnuradio/branches/developers/gnychis/inband-profiling/usrp/host/apps-inband/test_usrp_inband_rx.cc
  2007-10-11 17:02:13 UTC (rev 6616)
@@ -46,7 +46,6 @@
 #include <symbols_usrp_rx.h>
 
 static bool verbose = true;
-long samples_to_recv;
 
 class test_usrp_rx : public mb_mblock
 {
@@ -90,7 +89,7 @@
 test_usrp_rx::test_usrp_rx(mb_runtime *runtime, const std::string 
&instance_name, pmt_t user_arg)
   : mb_mblock(runtime, instance_name, user_arg),
     d_samples_recvd(0),
-    d_samples_to_recv(samples_to_recv)
+    d_samples_to_recv(10e6)
 { 
   
   d_rx = define_port("rx0", "usrp-rx", false, mb_port::INTERNAL);
@@ -102,7 +101,7 @@
   // Specify the RBF to use
   pmt_dict_set(usrp_dict,
                pmt_intern("rbf"),
-               pmt_intern("cs1.rbf"));
+               pmt_intern("usrp_inband_profiling.rbf"));
 
   pmt_dict_set(usrp_dict,
                pmt_intern("decim-rx"),
@@ -268,7 +267,7 @@
 test_usrp_rx::close_usrp()
 {
 
-  sleep(5);
+  sleep(10);
 
   d_cs->send(s_cmd_close, pmt_list1(PMT_NIL));
   d_state = CLOSING_USRP;
@@ -318,6 +317,8 @@
     return;
   }
 
+  std::cout << ".\n";
+
   // Check if the number samples we have received meets the test
   if(d_samples_recvd >= d_samples_to_recv) {
     d_rx->send(s_cmd_stop_recv_raw_samples, pmt_list2(PMT_NIL, d_rx_chan));
@@ -332,8 +333,6 @@
 {
   d_state = CLOSING_CHANNEL;
 
-  sleep(2);
-  
   d_rx->send(s_cmd_deallocate_channel, pmt_list2(PMT_NIL, d_rx_chan));
   
   if(verbose)
@@ -348,20 +347,6 @@
 int
 main (int argc, char **argv)
 {
-  // handle any command line args here
-  if(argc < 2) {
-    std::cout << "Usage: ./test_usrp_inband_rx <n_samples_to_recv>\n";
-    return -1;
-  }
-
-  samples_to_recv = atol(argv[1]);
-
-  if(samples_to_recv <= 0) {
-    std::cout << "Usage: ./test_usrp_inband_rx <n_samples_to_recv>\n";
-    std::cout << "\nPlease specify n_samples_to_recv > 0\n";
-    return -1;
-  }
-
   mb_runtime_sptr rt = mb_make_runtime();
   pmt_t result = PMT_NIL;
 





reply via email to

[Prev in Thread] Current Thread [Next in Thread]