commit-gnuradio
[Top][All Lists]
Advanced

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

[Commit-gnuradio] r9756 - gnuradio/branches/developers/eb/cppdb-wip/usrp


From: eb
Subject: [Commit-gnuradio] r9756 - gnuradio/branches/developers/eb/cppdb-wip/usrp/host/lib/legacy
Date: Wed, 8 Oct 2008 17:22:48 -0600 (MDT)

Author: eb
Date: 2008-10-08 17:22:47 -0600 (Wed, 08 Oct 2008)
New Revision: 9756

Modified:
   gnuradio/branches/developers/eb/cppdb-wip/usrp/host/lib/legacy/db_flexrf.cc
   gnuradio/branches/developers/eb/cppdb-wip/usrp/host/lib/legacy/db_flexrf.h
Log:
removed protected d_usrp instance variable

Modified: 
gnuradio/branches/developers/eb/cppdb-wip/usrp/host/lib/legacy/db_flexrf.cc
===================================================================
--- gnuradio/branches/developers/eb/cppdb-wip/usrp/host/lib/legacy/db_flexrf.cc 
2008-10-08 22:21:08 UTC (rev 9755)
+++ gnuradio/branches/developers/eb/cppdb-wip/usrp/host/lib/legacy/db_flexrf.cc 
2008-10-08 23:22:47 UTC (rev 9756)
@@ -36,8 +36,8 @@
 #define AUX_SDO   (1 << 1)
 #define CLOCK_OUT (1 << 0)
 
-flexrf_base::flexrf_base(usrp_basic *usrp, int which, int _power_on)
-  : db_base(usrp, which), d_power_on(_power_on)
+flexrf_base::flexrf_base(usrp_basic *usrp, int which, bool tx, int _power_on)
+  : db_base(usrp, which, tx), d_power_on(_power_on)
 {
   /*
     @param usrp: instance of usrp.source_c
@@ -54,18 +54,6 @@
   set_gain(float(gain_min() + gain_max()) / 2.0);  // initialize gain
   
   set_auto_tr(false);
-
-  /*
-  std::string title;
-  if(debug_using_gui) {
-    title = "FlexRF Debug Rx";
-    if(d_tx) {
-      title = "FlexRF Debug Tx";
-    }
-    d_gui = flexrf_debug_gui.flexrf_debug_gui(title);
-    d_gui.Show(true);
-  }
-  */
 }
 
 flexrf_base::~flexrf_base()
@@ -301,16 +289,13 @@
 // ----------------------------------------------------------------
 
 flexrf_base_tx::flexrf_base_tx(usrp_basic *usrp, int which, int _power_on)
-  : flexrf_base(usrp, which, _power_on)
+  : flexrf_base(usrp, which, true, _power_on)
 {
   /*
     @param usrp: instance of usrp.sink_c
     @param which: 0 or 1 corresponding to side TX_A or TX_B respectively.
   */
   
-  d_usrp = (usrp_basic_tx*)usrp;
-  d_tx = true;
-
   if(which == 0) {
     d_spi_enable = SPI_ENABLE_TX_A;
   }
@@ -407,16 +392,13 @@
 
 
 flexrf_base_rx::flexrf_base_rx(usrp_basic *usrp, int which, int _power_on)
-  : flexrf_base(usrp, which, _power_on)
+  : flexrf_base(usrp, which, false, _power_on)
 {
   /*
     @param usrp: instance of usrp.source_c
     @param which: 0 or 1 corresponding to side RX_A or RX_B respectively.
   */
 
-  d_usrp = (usrp_basic_rx*)usrp;
-  d_tx = false;
-
   if(which == 0) {
     d_spi_enable = SPI_ENABLE_RX_A;
   }
@@ -656,18 +638,6 @@
   }
 }
 
-double
-_AD4360_common::freq_min()
-{
-  throw 0;
-}
-
-double
-_AD4360_common::freq_max()
-{
-  throw 0;
-}
-
 //----------------------------------------------------------------------
 
 _2400_common::_2400_common()

Modified: 
gnuradio/branches/developers/eb/cppdb-wip/usrp/host/lib/legacy/db_flexrf.h
===================================================================
--- gnuradio/branches/developers/eb/cppdb-wip/usrp/host/lib/legacy/db_flexrf.h  
2008-10-08 22:21:08 UTC (rev 9755)
+++ gnuradio/branches/developers/eb/cppdb-wip/usrp/host/lib/legacy/db_flexrf.h  
2008-10-08 23:22:47 UTC (rev 9756)
@@ -33,7 +33,7 @@
 class flexrf_base : public db_base
 {
 public:
-  flexrf_base(usrp_basic *usrp, int which, int _power_on=0);
+  flexrf_base(usrp_basic *usrp, int which, bool tx, int _power_on=0);
   ~flexrf_base();
 
   struct freq_result_t set_freq(double freq);
@@ -88,9 +88,6 @@
   bool set_auto_tr(bool on);
   bool set_enable(bool on);
   bool set_gain(float gain);
-
-protected:
-  usrp_basic_tx *d_usrp;
 };
 
 class flexrf_base_rx : public flexrf_base
@@ -103,9 +100,6 @@
   bool select_rx_antenna(int which_antenna);
   bool select_rx_antenna(const std::string &which_antenna);
   bool set_gain(float gain);
-
-protected:
-  usrp_basic_rx *d_usrp;
 };
 
 // ----------------------------------------------------------------
@@ -117,8 +111,8 @@
   _AD4360_common();
   virtual ~_AD4360_common();
 
-  virtual double freq_min();
-  virtual double freq_max();
+  virtual double freq_min() = 0;
+  virtual double freq_max() = 0;
 
   bool _compute_regs(double refclk_freq, double freq, int &retR, 
                     int &retcontrol, int &retN, double &retfreq);





reply via email to

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