Cleanup, changed ifc_name() to interface_name()
authorjcorgan <jcorgan@221aa14e-8319-0410-a670-987f0aec2ac5>
Mon, 23 Feb 2009 02:08:43 +0000 (02:08 +0000)
committerjcorgan <jcorgan@221aa14e-8319-0410-a670-987f0aec2ac5>
Mon, 23 Feb 2009 02:08:43 +0000 (02:08 +0000)
git-svn-id: http://gnuradio.org/svn/gnuradio/trunk@10477 221aa14e-8319-0410-a670-987f0aec2ac5

gr-usrp2/src/usrp2.i
gr-usrp2/src/usrp2_base.cc
gr-usrp2/src/usrp2_base.h
gr-utils/src/python/usrp2_siggen.py
gr-utils/src/python/usrp2_siggen_gui.py
usrp2/host/include/usrp2/usrp2.h
usrp2/host/lib/usrp2.cc
usrp2/host/lib/usrp2_impl.cc
usrp2/host/lib/usrp2_impl.h

index 2a07103cc8812ce3209e3b4c407676ec47a73fc3..216aec9378c12a21380b163bbf4fdb3525403d93 100644 (file)
@@ -45,7 +45,7 @@ public:
   ~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();
index 6b70de6073c69961354f9f1b7f84f8f67e177228..34492dc478cada2aed19b6eec8a02a2d21d201f3 100644 (file)
@@ -56,9 +56,9 @@ usrp2_base::mac_addr() const
 }
 
 std::string
-usrp2_base::ifc_name() const
+usrp2_base::interface_name() const
 {
-  return d_u2->ifc_name();
+  return d_u2->interface_name();
 }
 
 bool
index 8857cc9e1ad668b66a714a9e435aaf34ac9ad960..bfd1dce0949e9bb57ee109666b02ca57da3dc13e 100644 (file)
@@ -56,7 +56,7 @@ public:
   /*!
    * \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
index 71f12cf4afa913c2d9e838581f1e9a4aa49596c6..9ade933c7c3c33a6ecf4811858a3cad1f393eba0 100755 (executable)
@@ -60,8 +60,7 @@ class top_block(gr.top_block):
         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 @@ class top_block(gr.top_block):
 
     # 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 @@ class top_block(gr.top_block):
         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
index 2d9f4f4df9af1ae5fff7b1ccad2002f726c893b4..89bc6e58945fb13d5a9b6fced079719cdb98e1b2 100755 (executable)
@@ -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 @@ class app_gui(object):
         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,))
index 3b806af876c54d6ad21fd97236b4ff6712cbf95c..70d800bf0f204c9f3d950477f34d524ae7e42675 100644 (file)
@@ -97,7 +97,7 @@ namespace usrp2 {
     /*!
      * Returns the GbE interface name associated with this USRP
      */
-    std::string ifc_name();
+    std::string interface_name();
 
     /*
      * ----------------------------------------------------------------
index ab64cb6cdbde5975dc19833105a280f1b7d2161b..2e8540e91cb13dd3cd7f36eb29116675bee45236 100644 (file)
@@ -161,9 +161,9 @@ namespace usrp2 {
   }
 
   std::string
-  usrp2::ifc_name()
+  usrp2::interface_name()
   {
-    return d_impl->ifc_name();
+    return d_impl->interface_name();
   }
 
   // Receive
index 3a0cd918e02327315d0b3754f12512afa018dabe..a0d340c91d4a831dfd9b203205a8cbefbc2aa6fa 100644 (file)
@@ -129,7 +129,7 @@ namespace usrp2 {
 
 
   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),
index 8928751b31f16610431dbdbd0059652478ef319f..c36a6d3c5bf737f4abb891791e05cae13d886605 100644 (file)
@@ -57,7 +57,7 @@ namespace usrp2 {
     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 @@ namespace usrp2 {
     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