commit-gnuradio
[Top][All Lists]
Advanced

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

[Commit-gnuradio] r9966 - in gnuradio/branches/developers/eb/cppdb-wip:


From: eb
Subject: [Commit-gnuradio] r9966 - in gnuradio/branches/developers/eb/cppdb-wip: gnuradio-examples/c++/usrp_test gr-usrp/src
Date: Sun, 9 Nov 2008 19:58:11 -0700 (MST)

Author: eb
Date: 2008-11-09 19:58:10 -0700 (Sun, 09 Nov 2008)
New Revision: 9966

Modified:
   
gnuradio/branches/developers/eb/cppdb-wip/gnuradio-examples/c++/usrp_test/main.cc
   gnuradio/branches/developers/eb/cppdb-wip/gr-usrp/src/usrp_base.cc
   gnuradio/branches/developers/eb/cppdb-wip/gr-usrp/src/usrp_base.h
   gnuradio/branches/developers/eb/cppdb-wip/gr-usrp/src/usrp_sink_base.cc
   gnuradio/branches/developers/eb/cppdb-wip/gr-usrp/src/usrp_sink_base.h
   gnuradio/branches/developers/eb/cppdb-wip/gr-usrp/src/usrp_source_base.cc
   gnuradio/branches/developers/eb/cppdb-wip/gr-usrp/src/usrp_source_base.h
Log:
Improved fix for the "usrp not starting" problem.


Modified: 
gnuradio/branches/developers/eb/cppdb-wip/gnuradio-examples/c++/usrp_test/main.cc
===================================================================
--- 
gnuradio/branches/developers/eb/cppdb-wip/gnuradio-examples/c++/usrp_test/main.cc
   2008-11-10 02:43:56 UTC (rev 9965)
+++ 
gnuradio/branches/developers/eb/cppdb-wip/gnuradio-examples/c++/usrp_test/main.cc
   2008-11-10 02:58:10 UTC (rev 9966)
@@ -30,7 +30,7 @@
   
   printf("data size: %zu\n", data.size());
   for(size_t i=0; i < data.size(); i++) {
-    printf("%f + j%f, ", data[i].real(), data[i].imag());
+    printf("%f + %fj\n", data[i].real(), data[i].imag());
   }
   printf("\n");
   

Modified: gnuradio/branches/developers/eb/cppdb-wip/gr-usrp/src/usrp_base.cc
===================================================================
--- gnuradio/branches/developers/eb/cppdb-wip/gr-usrp/src/usrp_base.cc  
2008-11-10 02:43:56 UTC (rev 9965)
+++ gnuradio/branches/developers/eb/cppdb-wip/gr-usrp/src/usrp_base.cc  
2008-11-10 02:58:10 UTC (rev 9966)
@@ -281,15 +281,3 @@
 {
   return d_usrp_basic->_read_spi (optional_header, enables, format, len);
 }
-
-bool
-usrp_base::start()
-{
-  return d_usrp_basic->start();
-}
-
-bool
-usrp_base::stop()
-{
-  return d_usrp_basic->stop();
-}

Modified: gnuradio/branches/developers/eb/cppdb-wip/gr-usrp/src/usrp_base.h
===================================================================
--- gnuradio/branches/developers/eb/cppdb-wip/gr-usrp/src/usrp_base.h   
2008-11-10 02:43:56 UTC (rev 9965)
+++ gnuradio/branches/developers/eb/cppdb-wip/gr-usrp/src/usrp_base.h   
2008-11-10 02:58:10 UTC (rev 9966)
@@ -404,18 +404,6 @@
    * the peripheral and returned.
    */
   std::string _read_spi (int optional_header, int enables, int format, int 
len);
-
-  /*!
-   * \brief Start data transfers.
-   * Called in base class to derived class order.
-   */
-  bool start ();
-
-  /*!
-   * \brief Stop data transfers.
-   * Called in base class to derived class order.
-   */
-  bool stop ();
 };
 
 #endif /* INCLUDED_USRP_BASE_H */

Modified: 
gnuradio/branches/developers/eb/cppdb-wip/gr-usrp/src/usrp_sink_base.cc
===================================================================
--- gnuradio/branches/developers/eb/cppdb-wip/gr-usrp/src/usrp_sink_base.cc     
2008-11-10 02:43:56 UTC (rev 9965)
+++ gnuradio/branches/developers/eb/cppdb-wip/gr-usrp/src/usrp_sink_base.cc     
2008-11-10 02:58:10 UTC (rev 9966)
@@ -63,13 +63,10 @@
   // All calls to d_usrp->write must be multiples of 512 bytes.
 
   set_output_multiple (OUTPUT_MULTIPLE_SAMPLES);
-  
-  d_usrp->start();
 }
 
 usrp_sink_base::~usrp_sink_base ()
 {
-  d_usrp->stop();
 }
 
 int
@@ -210,6 +207,19 @@
 }
 
 bool
+usrp_sink_base::start()
+{
+  return d_usrp->start();
+}
+
+bool
+usrp_sink_base::stop()
+{
+  return d_usrp->stop();
+}
+
+
+bool
 usrp_sink_base::tune(int chan, db_base_sptr db, double target_freq, 
usrp_tune_result *result)
 {
   return d_usrp->tune(chan, db, target_freq, result);

Modified: gnuradio/branches/developers/eb/cppdb-wip/gr-usrp/src/usrp_sink_base.h
===================================================================
--- gnuradio/branches/developers/eb/cppdb-wip/gr-usrp/src/usrp_sink_base.h      
2008-11-10 02:43:56 UTC (rev 9965)
+++ gnuradio/branches/developers/eb/cppdb-wip/gr-usrp/src/usrp_sink_base.h      
2008-11-10 02:58:10 UTC (rev 9966)
@@ -111,6 +111,21 @@
   int nducs();
 
   /*!
+   * \brief Called to enable drivers, etc for i/o devices.
+   *
+   * This allows a block to enable an associated driver to begin
+   * transfering data just before we start to execute the scheduler.
+   * The end result is that this reduces latency in the pipeline when
+   * dealing with audio devices, usrps, etc.
+   */
+  bool start();
+
+  /*!
+   * \brief Called to disable drivers, etc for i/o devices.
+   */
+  bool stop();
+
+  /*!
    * \brief High-level "tune" method.  Works for the single channel case.
    *
    * This method adjusts both the daughterboard LO and the DUC so that

Modified: 
gnuradio/branches/developers/eb/cppdb-wip/gr-usrp/src/usrp_source_base.cc
===================================================================
--- gnuradio/branches/developers/eb/cppdb-wip/gr-usrp/src/usrp_source_base.cc   
2008-11-10 02:43:56 UTC (rev 9965)
+++ gnuradio/branches/developers/eb/cppdb-wip/gr-usrp/src/usrp_source_base.cc   
2008-11-10 02:58:10 UTC (rev 9966)
@@ -63,13 +63,10 @@
   // We jack this up to 4k to reduce overhead.
 
   set_output_multiple (OUTPUT_MULTIPLE_BYTES / 
output_signature->sizeof_stream_item (0));
-
-  d_usrp->start();
 }
 
 usrp_source_base::~usrp_source_base ()
 {
-  d_usrp->stop();
 }
 
 unsigned int
@@ -261,6 +258,18 @@
 }
 
 bool
+usrp_source_base::start()
+{
+  return d_usrp->start();
+}
+
+bool
+usrp_source_base::stop()
+{
+  return d_usrp->stop();
+}
+
+bool
 usrp_source_base::tune(int chan, db_base_sptr db, double target_freq, 
usrp_tune_result *result)
 {
   return d_usrp->tune(chan, db, target_freq, result);

Modified: 
gnuradio/branches/developers/eb/cppdb-wip/gr-usrp/src/usrp_source_base.h
===================================================================
--- gnuradio/branches/developers/eb/cppdb-wip/gr-usrp/src/usrp_source_base.h    
2008-11-10 02:43:56 UTC (rev 9965)
+++ gnuradio/branches/developers/eb/cppdb-wip/gr-usrp/src/usrp_source_base.h    
2008-11-10 02:58:10 UTC (rev 9966)
@@ -137,6 +137,21 @@
   int nducs();
 
   /*!
+   * \brief Called to enable drivers, etc for i/o devices.
+   *
+   * This allows a block to enable an associated driver to begin
+   * transfering data just before we start to execute the scheduler.
+   * The end result is that this reduces latency in the pipeline when
+   * dealing with audio devices, usrps, etc.
+   */
+  bool start();
+
+  /*!
+   * \brief Called to disable drivers, etc for i/o devices.
+   */
+  bool stop();
+
+  /*!
    * \brief Specify Rx data format.
    *
    * \param format     format specifier





reply via email to

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