commit-gnuradio
[Top][All Lists]
Advanced

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

[Commit-gnuradio] r10834 - in gnuradio/branches/releases/3.2: . gnuradio


From: jcorgan
Subject: [Commit-gnuradio] r10834 - in gnuradio/branches/releases/3.2: . gnuradio-core/src/lib/general gnuradio-core/src/lib/runtime gnuradio-core/src/python/gnuradio/gr gr-wxgui/src/python/plotter grc/data/platforms/python/blocks usrp2/host/lib
Date: Tue, 14 Apr 2009 14:01:13 -0600 (MDT)

Author: jcorgan
Date: 2009-04-14 14:01:13 -0600 (Tue, 14 Apr 2009)
New Revision: 10834

Modified:
   gnuradio/branches/releases/3.2/
   gnuradio/branches/releases/3.2/gnuradio-core/src/lib/general/gr_dpll_bb.cc
   gnuradio/branches/releases/3.2/gnuradio-core/src/lib/runtime/gr_block.cc
   gnuradio/branches/releases/3.2/gnuradio-core/src/python/gnuradio/gr/pubsub.py
   
gnuradio/branches/releases/3.2/gr-wxgui/src/python/plotter/grid_plotter_base.py
   gnuradio/branches/releases/3.2/grc/data/platforms/python/blocks/gr_add_xx.xml
   
gnuradio/branches/releases/3.2/grc/data/platforms/python/blocks/gr_multiply_xx.xml
   gnuradio/branches/releases/3.2/usrp2/host/lib/usrp2_impl.cc
   gnuradio/branches/releases/3.2/usrp2/host/lib/usrp2_impl.h
Log:
Applied changesets r10787:10789, r10793 to release 3.2 branch.


Property changes on: gnuradio/branches/releases/3.2
___________________________________________________________________
Modified: svn:mergeinfo
   - /gnuradio/branches/developers/eb/t348:10638-10648
/gnuradio/branches/developers/eb/t378:10683-10688
/gnuradio/branches/developers/jblum/gui_guts:10464-10658
/gnuradio/branches/developers/jblum/vlen:10667-10677
/gnuradio/branches/developers/jcorgan/fw-optimize:10428-10429
/gnuradio/branches/developers/jcorgan/gpio2:10713-10765
/gnuradio/branches/developers/michaelld/am_swig_4:10555-10595
/gnuradio/branches/developers/michaelld/two_mods:10540-10546
/gnuradio/trunk:10356-10359,10481-10482,10497-10499,10506-10507,10511,10514,10521,10523-10524,10529,10531,10535,10537-10538,10550-10551,10556,10558-10560,10562-10563,10565,10574-10576,10578-10579,10581-10582,10585,10587,10596-10600,10623-10624,10629,10632-10634,10645-10646,10649-10650,10653-10655,10660-10661,10671,10673,10678,10681,10686,10689,10691,10701-10702,10707-10710,10714-10721,10725,10728-10736,10739-10751,10759-10762,10766,10768-10769,10778-10779,10787
   + /gnuradio/branches/developers/eb/t348:10638-10648
/gnuradio/branches/developers/eb/t378:10683-10688
/gnuradio/branches/developers/jblum/gui_guts:10464-10658
/gnuradio/branches/developers/jblum/vlen:10667-10677
/gnuradio/branches/developers/jcorgan/fw-optimize:10428-10429
/gnuradio/branches/developers/jcorgan/gpio2:10713-10765
/gnuradio/branches/developers/michaelld/am_swig_4:10555-10595
/gnuradio/branches/developers/michaelld/two_mods:10540-10546
/gnuradio/trunk:10356-10359,10481-10482,10497-10499,10506-10507,10511,10514,10521,10523-10524,10529,10531,10535,10537-10538,10550-10551,10556,10558-10560,10562-10563,10565,10574-10576,10578-10579,10581-10582,10585,10587,10596-10600,10623-10624,10629,10632-10634,10645-10646,10649-10650,10653-10655,10660-10661,10671,10673,10678,10681,10686,10689,10691,10701-10702,10707-10710,10714-10721,10725,10728-10736,10739-10751,10759-10762,10766,10768-10769,10778-10779,10787-10789,10793

Modified: 
gnuradio/branches/releases/3.2/gnuradio-core/src/lib/general/gr_dpll_bb.cc
===================================================================
--- gnuradio/branches/releases/3.2/gnuradio-core/src/lib/general/gr_dpll_bb.cc  
2009-04-14 19:57:38 UTC (rev 10833)
+++ gnuradio/branches/releases/3.2/gnuradio-core/src/lib/general/gr_dpll_bb.cc  
2009-04-14 20:01:13 UTC (rev 10834)
@@ -1,6 +1,6 @@
 /* -*- c++ -*- */
 /*
- * Copyright 2007 Free Software Foundation, Inc.
+ * Copyright 2007,2009 Free Software Foundation, Inc.
  * 
  * This file is part of GNU Radio
  * 
@@ -49,7 +49,6 @@
          d_gain,
          d_decision_threshold);
 #endif
-  set_history(1); // so we can look behind us
 }
 
 int

Modified: 
gnuradio/branches/releases/3.2/gnuradio-core/src/lib/runtime/gr_block.cc
===================================================================
--- gnuradio/branches/releases/3.2/gnuradio-core/src/lib/runtime/gr_block.cc    
2009-04-14 19:57:38 UTC (rev 10833)
+++ gnuradio/branches/releases/3.2/gnuradio-core/src/lib/runtime/gr_block.cc    
2009-04-14 20:01:13 UTC (rev 10834)
@@ -51,7 +51,7 @@
 {
   unsigned ninputs = ninput_items_required.size ();
   for (unsigned i = 0; i < ninputs; i++)
-    ninput_items_required[i] = noutput_items;
+    ninput_items_required[i] = noutput_items + history() - 1;
 }
 
 // default implementation


Property changes on: 
gnuradio/branches/releases/3.2/gnuradio-core/src/python/gnuradio/gr/pubsub.py
___________________________________________________________________
Modified: svn:mergeinfo
   - 
/gnuradio/branches/developers/eb/t348/gnuradio-core/src/python/gnuradio/gr/pubsub.py:10638-10648
/gnuradio/branches/developers/eb/t378/gnuradio-core/src/python/gnuradio/gr/pubsub.py:10683-10688
/gnuradio/branches/developers/jblum/vlen/gnuradio-core/src/python/gnuradio/gr/pubsub.py:10667-10677
/gnuradio/branches/developers/jcorgan/gpio2/gnuradio-core/src/python/gnuradio/gr/pubsub.py:10713-10765
/gnuradio/trunk/gnuradio-core/src/python/gnuradio/gr/pubsub.py:10653-10655,10660-10661,10671,10673,10678,10681,10686,10689,10691,10701-10702,10707-10710,10714-10721,10725,10728-10736,10739-10751,10759-10762,10766,10768-10769,10778-10779,10787
   + 
/gnuradio/branches/developers/eb/t348/gnuradio-core/src/python/gnuradio/gr/pubsub.py:10638-10648
/gnuradio/branches/developers/eb/t378/gnuradio-core/src/python/gnuradio/gr/pubsub.py:10683-10688
/gnuradio/branches/developers/jblum/vlen/gnuradio-core/src/python/gnuradio/gr/pubsub.py:10667-10677
/gnuradio/branches/developers/jcorgan/gpio2/gnuradio-core/src/python/gnuradio/gr/pubsub.py:10713-10765
/gnuradio/trunk/gnuradio-core/src/python/gnuradio/gr/pubsub.py:10653-10655,10660-10661,10671,10673,10678,10681,10686,10689,10691,10701-10702,10707-10710,10714-10721,10725,10728-10736,10739-10751,10759-10762,10766,10768-10769,10778-10779,10787-10789,10793


Property changes on: 
gnuradio/branches/releases/3.2/gr-wxgui/src/python/plotter/grid_plotter_base.py
___________________________________________________________________
Modified: svn:mergeinfo
   - 
/gnuradio/branches/developers/eb/t378/gr-wxgui/src/python/plotter/grid_plotter_base.py:10683-10688
/gnuradio/branches/developers/jblum/vlen/gr-wxgui/src/python/plotter/grid_plotter_base.py:10667-10677
/gnuradio/branches/developers/jcorgan/gpio2/gr-wxgui/src/python/plotter/grid_plotter_base.py:10713-10765
/gnuradio/trunk/gr-wxgui/src/python/plotter/grid_plotter_base.py:10673,10678,10681,10686,10689,10691,10701-10702,10707-10710,10714-10721,10725,10728-10736,10739-10751,10759-10762,10766,10768-10769,10778-10779,10787
   + 
/gnuradio/branches/developers/eb/t378/gr-wxgui/src/python/plotter/grid_plotter_base.py:10683-10688
/gnuradio/branches/developers/jblum/vlen/gr-wxgui/src/python/plotter/grid_plotter_base.py:10667-10677
/gnuradio/branches/developers/jcorgan/gpio2/gr-wxgui/src/python/plotter/grid_plotter_base.py:10713-10765
/gnuradio/trunk/gr-wxgui/src/python/plotter/grid_plotter_base.py:10673,10678,10681,10686,10689,10691,10701-10702,10707-10710,10714-10721,10725,10728-10736,10739-10751,10759-10762,10766,10768-10769,10778-10779,10787-10789,10793


Property changes on: 
gnuradio/branches/releases/3.2/grc/data/platforms/python/blocks/gr_add_xx.xml
___________________________________________________________________
Modified: svn:mergeinfo
   - 
/gnuradio/branches/developers/eb/t348/grc/data/platforms/python/blocks/gr_add_vxx.xml:10638-10648
/gnuradio/branches/developers/eb/t378/grc/data/platforms/python/blocks/gr_add_xx.xml:10683-10688
/gnuradio/branches/developers/jblum/gui_guts/grc/data/platforms/python/blocks/gr_add_vxx.xml:10464-10658
/gnuradio/branches/developers/jcorgan/gpio2/grc/data/platforms/python/blocks/gr_add_xx.xml:10713-10765
/gnuradio/branches/developers/michaelld/am_swig_4/grc/data/platforms/python/blocks/gr_add_vxx.xml:10555-10595
/gnuradio/branches/developers/michaelld/two_mods/grc/data/platforms/python/blocks/gr_add_vxx.xml:10540-10546
/gnuradio/trunk/grc/data/platforms/python/blocks/gr_add_xx.xml:10681,10686,10689,10691,10701-10702,10707-10710,10714-10721,10725,10728-10736,10739-10751,10759-10762,10766,10768-10769,10778-10779,10787
   + 
/gnuradio/branches/developers/eb/t348/grc/data/platforms/python/blocks/gr_add_vxx.xml:10638-10648
/gnuradio/branches/developers/eb/t378/grc/data/platforms/python/blocks/gr_add_xx.xml:10683-10688
/gnuradio/branches/developers/jblum/gui_guts/grc/data/platforms/python/blocks/gr_add_vxx.xml:10464-10658
/gnuradio/branches/developers/jcorgan/gpio2/grc/data/platforms/python/blocks/gr_add_xx.xml:10713-10765
/gnuradio/branches/developers/michaelld/am_swig_4/grc/data/platforms/python/blocks/gr_add_vxx.xml:10555-10595
/gnuradio/branches/developers/michaelld/two_mods/grc/data/platforms/python/blocks/gr_add_vxx.xml:10540-10546
/gnuradio/trunk/grc/data/platforms/python/blocks/gr_add_xx.xml:10681,10686,10689,10691,10701-10702,10707-10710,10714-10721,10725,10728-10736,10739-10751,10759-10762,10766,10768-10769,10778-10779,10787-10789,10793


Property changes on: 
gnuradio/branches/releases/3.2/grc/data/platforms/python/blocks/gr_multiply_xx.xml
___________________________________________________________________
Modified: svn:mergeinfo
   - 
/gnuradio/branches/developers/eb/t348/grc/data/platforms/python/blocks/gr_multiply_vxx.xml:10638-10648
/gnuradio/branches/developers/eb/t378/grc/data/platforms/python/blocks/gr_multiply_xx.xml:10683-10688
/gnuradio/branches/developers/jblum/gui_guts/grc/data/platforms/python/blocks/gr_multiply_vxx.xml:10464-10658
/gnuradio/branches/developers/jcorgan/gpio2/grc/data/platforms/python/blocks/gr_multiply_xx.xml:10713-10765
/gnuradio/branches/developers/michaelld/am_swig_4/grc/data/platforms/python/blocks/gr_multiply_vxx.xml:10555-10595
/gnuradio/branches/developers/michaelld/two_mods/grc/data/platforms/python/blocks/gr_multiply_vxx.xml:10540-10546
/gnuradio/trunk/grc/data/platforms/python/blocks/gr_multiply_xx.xml:10681,10686,10689,10691,10701-10702,10707-10710,10714-10721,10725,10728-10736,10739-10751,10759-10762,10766,10768-10769,10778-10779,10787
   + 
/gnuradio/branches/developers/eb/t348/grc/data/platforms/python/blocks/gr_multiply_vxx.xml:10638-10648
/gnuradio/branches/developers/eb/t378/grc/data/platforms/python/blocks/gr_multiply_xx.xml:10683-10688
/gnuradio/branches/developers/jblum/gui_guts/grc/data/platforms/python/blocks/gr_multiply_vxx.xml:10464-10658
/gnuradio/branches/developers/jcorgan/gpio2/grc/data/platforms/python/blocks/gr_multiply_xx.xml:10713-10765
/gnuradio/branches/developers/michaelld/am_swig_4/grc/data/platforms/python/blocks/gr_multiply_vxx.xml:10555-10595
/gnuradio/branches/developers/michaelld/two_mods/grc/data/platforms/python/blocks/gr_multiply_vxx.xml:10540-10546
/gnuradio/trunk/grc/data/platforms/python/blocks/gr_multiply_xx.xml:10681,10686,10689,10691,10701-10702,10707-10710,10714-10721,10725,10728-10736,10739-10751,10759-10762,10766,10768-10769,10778-10779,10787-10789,10793

Modified: gnuradio/branches/releases/3.2/usrp2/host/lib/usrp2_impl.cc
===================================================================
--- gnuradio/branches/releases/3.2/usrp2/host/lib/usrp2_impl.cc 2009-04-14 
19:57:38 UTC (rev 10833)
+++ gnuradio/branches/releases/3.2/usrp2/host/lib/usrp2_impl.cc 2009-04-14 
20:01:13 UTC (rev 10834)
@@ -445,24 +445,28 @@
     // FIXME unaligned load!
     unsigned int chan = u2p_chan(&pkt->hdrs.fixed);
 
-    if (!d_channel_rings[chan]) {
-      DEBUG_LOG("!");
-      return data_handler::RELEASE;    // discard packet, no channel handler
-    }
+    {
+      omni_mutex_lock l(d_channel_rings_mutex);
 
-    // Strip off ethernet header and transport header and enqueue the rest
-
-    size_t offset = offsetof(u2_eth_samples_t, hdrs.fixed);
-    if (d_channel_rings[chan]->enqueue(&pkt->hdrs.fixed, len-offset)) {
-      inc_enqueued();
-      DEBUG_LOG("+");
-      return data_handler::KEEP;       // channel ring runner will mark frame 
done
+      if (!d_channel_rings[chan]) {
+       DEBUG_LOG("!");
+       return data_handler::RELEASE;   // discard packet, no channel handler
+      }
+      
+      // Strip off ethernet header and transport header and enqueue the rest
+      
+      size_t offset = offsetof(u2_eth_samples_t, hdrs.fixed);
+      if (d_channel_rings[chan]->enqueue(&pkt->hdrs.fixed, len-offset)) {
+       inc_enqueued();
+       DEBUG_LOG("+");
+       return data_handler::KEEP;      // channel ring runner will mark frame 
done
+      }
+      else {
+       DEBUG_LOG("!");
+       return data_handler::RELEASE;   // discard, no room in channel ring
+      }        
+      return data_handler::RELEASE;
     }
-    else {
-      DEBUG_LOG("!");
-      return data_handler::RELEASE;    // discard, no room in channel ring
-    }          
-    return data_handler::RELEASE;
   }
 
 
@@ -607,35 +611,39 @@
       return false;
     }
 
-    if (d_channel_rings[channel]) {
-      std::cerr << "usrp2: channel " << channel
-               << " already streaming" << std::endl;
-      return false;
-    }
+    {
+      omni_mutex_lock l(d_channel_rings_mutex);
+      if (d_channel_rings[channel]) {
+       std::cerr << "usrp2: channel " << channel
+                 << " already streaming" << std::endl;
+       return false;
+      }
+      
+      if (items_per_frame == 0)
+       items_per_frame = U2_MAX_SAMPLES;               // minimize overhead
+      
+      op_start_rx_streaming_cmd cmd;
+      op_generic_t reply;
 
-    d_channel_rings[channel] = ring_sptr(new ring(d_eth_buf->max_frames()));
-
-    if (items_per_frame == 0)
-      items_per_frame = U2_MAX_SAMPLES;                // minimize overhead
+      memset(&cmd, 0, sizeof(cmd));
+      init_etf_hdrs(&cmd.h, d_addr, 0, CONTROL_CHAN, -1);
+      cmd.op.opcode = OP_START_RX_STREAMING;
+      cmd.op.len = sizeof(cmd.op);
+      cmd.op.rid = d_next_rid++;
+      cmd.op.items_per_frame = htonl(items_per_frame);
+      cmd.eop.opcode = OP_EOP;
+      cmd.eop.len = sizeof(cmd.eop);
     
-    op_start_rx_streaming_cmd cmd;
-    op_generic_t reply;
+      bool success = false;
+      pending_reply p(cmd.op.rid, &reply, sizeof(reply));
+      success = transmit_cmd(&cmd, sizeof(cmd), &p, DEF_CMD_TIMEOUT);
+      success = success && (ntohx(reply.ok) == 1);
+      
+      if (success)
+       d_channel_rings[channel] = ring_sptr(new ring(d_eth_buf->max_frames()));
 
-    memset(&cmd, 0, sizeof(cmd));
-    init_etf_hdrs(&cmd.h, d_addr, 0, CONTROL_CHAN, -1);
-    cmd.op.opcode = OP_START_RX_STREAMING;
-    cmd.op.len = sizeof(cmd.op);
-    cmd.op.rid = d_next_rid++;
-    cmd.op.items_per_frame = htonl(items_per_frame);
-    cmd.eop.opcode = OP_EOP;
-    cmd.eop.len = sizeof(cmd.eop);
-    
-    pending_reply p(cmd.op.rid, &reply, sizeof(reply));
-    if (!transmit_cmd(&cmd, sizeof(cmd), &p, DEF_CMD_TIMEOUT))
-      return false;
-
-    bool success = (ntohx(reply.ok) == 1);
-    return success;
+      return success;
+    }
   }
   
   bool
@@ -653,36 +661,28 @@
       return false;
     }
 
-#if 0 // don't be overzealous.    
-    if (!d_channel_rings[channel]) {
-      std::cerr << "usrp2: channel " << channel
-               << " not streaming" << std::endl;
-      return false;
-    }
-#endif
-
     op_stop_rx_cmd cmd;
     op_generic_t reply;
 
-    memset(&cmd, 0, sizeof(cmd));
-    init_etf_hdrs(&cmd.h, d_addr, 0, CONTROL_CHAN, -1);
-    cmd.op.opcode = OP_STOP_RX;
-    cmd.op.len = sizeof(cmd.op);
-    cmd.op.rid = d_next_rid++;
-    cmd.eop.opcode = OP_EOP;
-    cmd.eop.len = sizeof(cmd.eop);
+    {
+      omni_mutex_lock l(d_channel_rings_mutex);
+
+      memset(&cmd, 0, sizeof(cmd));
+      init_etf_hdrs(&cmd.h, d_addr, 0, CONTROL_CHAN, -1);
+      cmd.op.opcode = OP_STOP_RX;
+      cmd.op.len = sizeof(cmd.op);
+      cmd.op.rid = d_next_rid++;
+      cmd.eop.opcode = OP_EOP;
+      cmd.eop.len = sizeof(cmd.eop);
     
-    pending_reply p(cmd.op.rid, &reply, sizeof(reply));
-    if (!transmit_cmd(&cmd, sizeof(cmd), &p, DEF_CMD_TIMEOUT))
-      return false;
-
-    bool success = (ntohx(reply.ok) == 1);
-    if (success)
+      bool success = false;
+      pending_reply p(cmd.op.rid, &reply, sizeof(reply));
+      success = transmit_cmd(&cmd, sizeof(cmd), &p, DEF_CMD_TIMEOUT);
+      success = success && (ntohx(reply.ok) == 1);
       d_channel_rings[channel].reset();
-
-    return success;
+      return success;
+    }
   }
-  
 
   bool
   usrp2::impl::rx_samples(unsigned int channel, rx_sample_handler *handler)

Modified: gnuradio/branches/releases/3.2/usrp2/host/lib/usrp2_impl.h
===================================================================
--- gnuradio/branches/releases/3.2/usrp2/host/lib/usrp2_impl.h  2009-04-14 
19:57:38 UTC (rev 10833)
+++ gnuradio/branches/releases/3.2/usrp2/host/lib/usrp2_impl.h  2009-04-14 
20:01:13 UTC (rev 10834)
@@ -79,6 +79,7 @@
     pending_reply *d_pending_replies[NRIDS]; // indexed by 8-bit reply id
 
     std::vector<ring_sptr>   d_channel_rings; // indexed by 5-bit channel 
number
+    omni_mutex     d_channel_rings_mutex;
 
     db_info       d_tx_db_info;
     db_info       d_rx_db_info;





reply via email to

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