summaryrefslogtreecommitdiff
path: root/gnuradio-runtime/lib
diff options
context:
space:
mode:
Diffstat (limited to 'gnuradio-runtime/lib')
-rw-r--r--gnuradio-runtime/lib/block_detail.cc20
-rw-r--r--gnuradio-runtime/lib/flat_flowgraph.cc6
2 files changed, 25 insertions, 1 deletions
diff --git a/gnuradio-runtime/lib/block_detail.cc b/gnuradio-runtime/lib/block_detail.cc
index 9463e8d13b..484d849652 100644
--- a/gnuradio-runtime/lib/block_detail.cc
+++ b/gnuradio-runtime/lib/block_detail.cc
@@ -162,6 +162,26 @@ namespace gr {
}
void
+ block_detail::reset_nitem_counters()
+ {
+ for(unsigned int i = 0; i < d_ninputs; i++) {
+ d_input[i]->reset_nitem_counter();
+ }
+ for(unsigned int o = 0; o < d_noutputs; o++) {
+ d_output[o]->reset_nitem_counter();
+ }
+ }
+
+ void
+ block_detail::clear_tags()
+ {
+ for(unsigned int i = 0; i < d_ninputs; i++) {
+ uint64_t max_time = 0xFFFFFFFFFFFFFFFF; // from now to the end of time
+ d_input[i]->buffer()->prune_tags(max_time);
+ }
+ }
+
+ void
block_detail::add_item_tag(unsigned int which_output, const tag_t &tag)
{
if(!pmt::is_symbol(tag.key)) {
diff --git a/gnuradio-runtime/lib/flat_flowgraph.cc b/gnuradio-runtime/lib/flat_flowgraph.cc
index 479943353b..1e9a682527 100644
--- a/gnuradio-runtime/lib/flat_flowgraph.cc
+++ b/gnuradio-runtime/lib/flat_flowgraph.cc
@@ -225,9 +225,10 @@ namespace gr {
std::cout << "merge: allocating new detail for block " << (*p) << std::endl;
block->set_detail(allocate_block_detail(block));
}
- else
+ else {
if(FLAT_FLOWGRAPH_DEBUG)
std::cout << "merge: reusing original detail for block " << (*p) << std::endl;
+ }
}
// Calculate the old edges that will be going away, and clear the
@@ -311,6 +312,9 @@ namespace gr {
// Now deal with the fact that the block details might have
// changed numbers of inputs and outputs vs. in the old
// flowgraph.
+
+ block->detail()->reset_nitem_counters();
+ block->detail()->clear_tags();
}
}