[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Commit-gnuradio] r10865 - in gnuradio/trunk/gnuradio-core/src: lib/runt
From: |
jcorgan |
Subject: |
[Commit-gnuradio] r10865 - in gnuradio/trunk/gnuradio-core/src: lib/runtime python/gnuradio/gr |
Date: |
Fri, 17 Apr 2009 11:24:18 -0600 (MDT) |
Author: jcorgan
Date: 2009-04-17 11:24:17 -0600 (Fri, 17 Apr 2009)
New Revision: 10865
Modified:
gnuradio/trunk/gnuradio-core/src/lib/runtime/gr_hier_block2_detail.cc
gnuradio/trunk/gnuradio-core/src/python/gnuradio/gr/qa_hier_block2.py
Log:
Fixes ticket:374
Modified: gnuradio/trunk/gnuradio-core/src/lib/runtime/gr_hier_block2_detail.cc
===================================================================
--- gnuradio/trunk/gnuradio-core/src/lib/runtime/gr_hier_block2_detail.cc
2009-04-17 16:54:59 UTC (rev 10864)
+++ gnuradio/trunk/gnuradio-core/src/lib/runtime/gr_hier_block2_detail.cc
2009-04-17 17:24:17 UTC (rev 10865)
@@ -76,6 +76,14 @@
throw std::invalid_argument(msg.str());
}
+ gr_hier_block2_sptr hblock(cast_to_hier_block2_sptr(block));
+
+ if (hblock && hblock.get() != d_owner) {
+ if (GR_HIER_BLOCK2_DETAIL_DEBUG)
+ std::cout << "connect: block is hierarchical, setting parent to " <<
this << std::endl;
+ hblock->d_detail->d_parent_detail = this;
+ }
+
d_blocks.push_back(block);
}
Modified: gnuradio/trunk/gnuradio-core/src/python/gnuradio/gr/qa_hier_block2.py
===================================================================
--- gnuradio/trunk/gnuradio-core/src/python/gnuradio/gr/qa_hier_block2.py
2009-04-17 16:54:59 UTC (rev 10864)
+++ gnuradio/trunk/gnuradio-core/src/python/gnuradio/gr/qa_hier_block2.py
2009-04-17 17:24:17 UTC (rev 10865)
@@ -251,6 +251,18 @@
self.assertRaises(RuntimeError,
lambda: tb.run())
+ def test_028_singleton_reconfigure(self):
+ tb = gr.top_block()
+ hb = gr.hier_block2("block",
+ gr.io_signature(0, 0, 0), gr.io_signature(0, 0, 0))
+ src = gr.vector_source_b([1, ])
+ dst = gr.vector_sink_b()
+ hb.connect(src, dst)
+ tb.connect(hb) # Singleton connect
+ tb.lock()
+ tb.disconnect_all()
+ tb.connect(src, dst)
+ tb.unlock()
if __name__ == "__main__":
gr_unittest.main()
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Commit-gnuradio] r10865 - in gnuradio/trunk/gnuradio-core/src: lib/runtime python/gnuradio/gr,
jcorgan <=