commit-gnuradio
[Top][All Lists]
Advanced

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

[Commit-gnuradio] r10477 - in gnuradio/trunk: gr-usrp2/src gr-utils/src/


From: jcorgan
Subject: [Commit-gnuradio] r10477 - in gnuradio/trunk: gr-usrp2/src gr-utils/src/python usrp2/host/include/usrp2 usrp2/host/lib
Date: Sun, 22 Feb 2009 19:08:44 -0700 (MST)

Author: jcorgan
Date: 2009-02-22 19:08:43 -0700 (Sun, 22 Feb 2009)
New Revision: 10477

Modified:
   gnuradio/trunk/gr-usrp2/src/usrp2.i
   gnuradio/trunk/gr-usrp2/src/usrp2_base.cc
   gnuradio/trunk/gr-usrp2/src/usrp2_base.h
   gnuradio/trunk/gr-utils/src/python/usrp2_siggen.py
   gnuradio/trunk/gr-utils/src/python/usrp2_siggen_gui.py
   gnuradio/trunk/usrp2/host/include/usrp2/usrp2.h
   gnuradio/trunk/usrp2/host/lib/usrp2.cc
   gnuradio/trunk/usrp2/host/lib/usrp2_impl.cc
   gnuradio/trunk/usrp2/host/lib/usrp2_impl.h
Log:
Cleanup, changed ifc_name() to interface_name()

Modified: gnuradio/trunk/gr-usrp2/src/usrp2.i
===================================================================
--- gnuradio/trunk/gr-usrp2/src/usrp2.i 2009-02-22 20:55:28 UTC (rev 10476)
+++ gnuradio/trunk/gr-usrp2/src/usrp2.i 2009-02-23 02:08:43 UTC (rev 10477)
@@ -45,7 +45,7 @@
   ~usrp2_base();
 
   std::string mac_addr() const;
-  std::string ifc_name() const;
+  std::string interface_name() const;
   %rename(_real_fpga_master_clock_freq) fpga_master_clock_freq;
   bool fpga_master_clock_freq(long *freq);
   bool sync_to_pps();

Modified: gnuradio/trunk/gr-usrp2/src/usrp2_base.cc
===================================================================
--- gnuradio/trunk/gr-usrp2/src/usrp2_base.cc   2009-02-22 20:55:28 UTC (rev 
10476)
+++ gnuradio/trunk/gr-usrp2/src/usrp2_base.cc   2009-02-23 02:08:43 UTC (rev 
10477)
@@ -56,9 +56,9 @@
 }
 
 std::string
-usrp2_base::ifc_name() const
+usrp2_base::interface_name() const
 {
-  return d_u2->ifc_name();
+  return d_u2->interface_name();
 }
 
 bool

Modified: gnuradio/trunk/gr-usrp2/src/usrp2_base.h
===================================================================
--- gnuradio/trunk/gr-usrp2/src/usrp2_base.h    2009-02-22 20:55:28 UTC (rev 
10476)
+++ gnuradio/trunk/gr-usrp2/src/usrp2_base.h    2009-02-23 02:08:43 UTC (rev 
10477)
@@ -56,7 +56,7 @@
   /*!
    * \brief Get interface name used to communicat with USRP2
    */
-  std::string ifc_name() const;
+  std::string interface_name() const;
 
   /*!
    * \brief Get USRP2 master clock rate

Modified: gnuradio/trunk/gr-utils/src/python/usrp2_siggen.py
===================================================================
--- gnuradio/trunk/gr-utils/src/python/usrp2_siggen.py  2009-02-22 20:55:28 UTC 
(rev 10476)
+++ gnuradio/trunk/gr-utils/src/python/usrp2_siggen.py  2009-02-23 02:08:43 UTC 
(rev 10477)
@@ -60,8 +60,7 @@
         self.set_amplitude(options.amplitude)
 
         self.set_waveform_freq(options.waveform_freq)
-        #self.set_waveform2_freq(options.waveform2_freq)
-        self._waveform2_freq = options.waveform2_freq
+        self.set_waveform2_freq(options.waveform2_freq)
         self.set_waveform(options.type)
 
     def set_usrp2(self, interface, mac_addr):
@@ -282,14 +281,11 @@
 
     # Property getters
 
-    #def interface(self):
-    #    return self._u.ifc_name()
-
     def mac_addr(self):
         return self._u.mac_addr()
 
-    def ifc_name(self):
-        return self._u.ifc_name()
+    def interface_name(self):
+        return self._u.interface_name()
 
     def daughterboard_id(self):
         return self._u.daughterboard_id()
@@ -304,10 +300,7 @@
         return self._freq
 
     def freq_range(self):
-        fr = self._u.freq_range()
-        if self._u.daughterboard_id() == 0x0000:
-            fr = (-50e6, 50e6) # DEBUG
-        return fr
+        return self._u.freq_range()
 
     def ddc_freq(self):
         return self._ddc_freq

Modified: gnuradio/trunk/gr-utils/src/python/usrp2_siggen_gui.py
===================================================================
--- gnuradio/trunk/gr-utils/src/python/usrp2_siggen_gui.py      2009-02-22 
20:55:28 UTC (rev 10476)
+++ gnuradio/trunk/gr-utils/src/python/usrp2_siggen_gui.py      2009-02-23 
02:08:43 UTC (rev 10477)
@@ -23,7 +23,7 @@
 import wx
 from gnuradio.wxgui import form, slider, gui
 import usrp2_siggen
-import math
+import sys, math
 
 class app_gui(object):
     def __init__(self, frame, panel, vbox, top_block, options, args):
@@ -43,7 +43,7 @@
         self.build_gui()
 
         # TODO: turn these into listeners
-        self.myform['ifc'].set_value(self.tb.ifc_name())
+        self.myform['ifc'].set_value(self.tb.interface_name())
         self.myform['mac'].set_value(self.tb.mac_addr())
         dbid = self.tb.daughterboard_id()
         self.myform['dbid'].set_value("%04x" % (dbid,))

Modified: gnuradio/trunk/usrp2/host/include/usrp2/usrp2.h
===================================================================
--- gnuradio/trunk/usrp2/host/include/usrp2/usrp2.h     2009-02-22 20:55:28 UTC 
(rev 10476)
+++ gnuradio/trunk/usrp2/host/include/usrp2/usrp2.h     2009-02-23 02:08:43 UTC 
(rev 10477)
@@ -97,7 +97,7 @@
     /*!
      * Returns the GbE interface name associated with this USRP
      */
-    std::string ifc_name();
+    std::string interface_name();
 
     /*
      * ----------------------------------------------------------------

Modified: gnuradio/trunk/usrp2/host/lib/usrp2.cc
===================================================================
--- gnuradio/trunk/usrp2/host/lib/usrp2.cc      2009-02-22 20:55:28 UTC (rev 
10476)
+++ gnuradio/trunk/usrp2/host/lib/usrp2.cc      2009-02-23 02:08:43 UTC (rev 
10477)
@@ -161,9 +161,9 @@
   }
 
   std::string
-  usrp2::ifc_name()
+  usrp2::interface_name()
   {
-    return d_impl->ifc_name();
+    return d_impl->interface_name();
   }
 
   // Receive

Modified: gnuradio/trunk/usrp2/host/lib/usrp2_impl.cc
===================================================================
--- gnuradio/trunk/usrp2/host/lib/usrp2_impl.cc 2009-02-22 20:55:28 UTC (rev 
10476)
+++ gnuradio/trunk/usrp2/host/lib/usrp2_impl.cc 2009-02-23 02:08:43 UTC (rev 
10477)
@@ -129,7 +129,7 @@
 
 
   usrp2::impl::impl(const std::string &ifc, props *p)
-    : d_eth_buf(new eth_buffer()), d_ifc_name(ifc), d_pf(0), d_bg_thread(0),
+    : d_eth_buf(new eth_buffer()), d_interface_name(ifc), d_pf(0), 
d_bg_thread(0),
       d_bg_running(false), d_rx_seqno(-1), d_tx_seqno(0), d_next_rid(0),
       d_num_rx_frames(0), d_num_rx_missing(0), d_num_rx_overruns(0), 
d_num_rx_bytes(0), 
       d_num_enqueued(0), d_enqueued_mutex(), 
d_bg_pending_cond(&d_enqueued_mutex),

Modified: gnuradio/trunk/usrp2/host/lib/usrp2_impl.h
===================================================================
--- gnuradio/trunk/usrp2/host/lib/usrp2_impl.h  2009-02-22 20:55:28 UTC (rev 
10476)
+++ gnuradio/trunk/usrp2/host/lib/usrp2_impl.h  2009-02-23 02:08:43 UTC (rev 
10477)
@@ -57,7 +57,7 @@
     static const size_t NCHANS = 32;
 
     eth_buffer    *d_eth_buf;
-    std::string    d_ifc_name;
+    std::string    d_interface_name;
     pktfilter     *d_pf;
     std::string    d_addr;       // FIXME: use u2_mac_addr_t instead
     usrp2_thread  *d_bg_thread;
@@ -118,7 +118,7 @@
     void bg_loop();
 
     std::string mac_addr() const { return d_addr; } // FIXME: convert from 
u2_mac_addr_t
-    std::string ifc_name() const { return d_ifc_name; }
+    std::string interface_name() const { return d_interface_name; }
 
     // Rx
 





reply via email to

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