commit-gnuradio
[Top][All Lists]
Advanced

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

[Commit-gnuradio] [gnuradio] 02/43: gnuradio-runtime: updated hier_block


From: git
Subject: [Commit-gnuradio] [gnuradio] 02/43: gnuradio-runtime: updated hier_block2 and hier_block_detail to allow for propagation of min/max output buffer to all blocks within the hier
Date: Thu, 2 Apr 2015 19:15:49 +0000 (UTC)

This is an automated email from the git hooks/post-receive script.

jcorgan pushed a commit to branch master
in repository gnuradio.

commit 29e86c4401343d875ea21a2913221d04cc9a7f6f
Author: Bill Clark <address@hidden>
Date:   Mon Mar 30 21:15:01 2015 -0400

    gnuradio-runtime: updated hier_block2 and hier_block_detail to allow for 
propagation of min/max output buffer to all blocks within the hier
---
 gnuradio-runtime/lib/hier_block2_detail.cc | 22 ++++++++++++++++++----
 1 file changed, 18 insertions(+), 4 deletions(-)

diff --git a/gnuradio-runtime/lib/hier_block2_detail.cc 
b/gnuradio-runtime/lib/hier_block2_detail.cc
index f58c24a..8f7f6db 100644
--- a/gnuradio-runtime/lib/hier_block2_detail.cc
+++ b/gnuradio-runtime/lib/hier_block2_detail.cc
@@ -530,13 +530,27 @@ namespace gr {
         }
       }
       if(min_buff != -1){
-        if((boost::static_pointer_cast<block>(b) != nullptr) || 
(boost::static_pointer_cast<hier_block2>(b) != nullptr)){
-          b->set_min_output_buffer(min_buff);
+        block_sptr bb = boost::dynamic_pointer_cast<block>(b);
+        if(bb != 0){
+          bb->set_min_output_buffer(min_buff);
+        }
+        else{
+          hier_block2_sptr hh = boost::dynamic_pointer_cast<hier_block2>(b);
+          if(hh != 0){
+            hh->set_min_output_buffer(min_buff);
+          }
         }
       }
       if(max_buff != -1){
-        if((boost::static_pointer_cast<block>(b) != nullptr) || 
(boost::static_pointer_cast<hier_block2>(b) != nullptr)){
-          b->set_max_output_buffer(max_buff);
+        block_sptr bb = boost::dynamic_pointer_cast<block>(b);
+        if(bb != 0){
+          bb->set_max_output_buffer(max_buff);
+        }
+        else{
+          hier_block2_sptr hh = boost::dynamic_pointer_cast<hier_block2>(b);
+          if(hh != 0){
+            hh->set_max_output_buffer(max_buff);
+          }
         }
       }
 



reply via email to

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