summaryrefslogtreecommitdiff
path: root/gnuradio-runtime/lib/hier_block2_detail.cc
diff options
context:
space:
mode:
authorBill Clark <saikou@vt.edu>2015-03-31 21:28:30 -0400
committerBill Clark <saikou@vt.edu>2015-03-31 21:28:30 -0400
commit34275a2c3e18c5738ccf02f4c3119efdacd00ae8 (patch)
tree934bddea2fdc7820f67a8a030dd1bda701d20636 /gnuradio-runtime/lib/hier_block2_detail.cc
parent266557129cefa2d9144ae0db554ca4ac76ae974f (diff)
gnuradio-runtime: added the individual port assignments to the hier_block2 max/min_output_buffer size; if output ports have different size assignments only the block directly connected to the output port is changed otherwise every block within the hier is set to that output buffer size; therefore single output hier blocks will always set every block within to the output buffer size
Diffstat (limited to 'gnuradio-runtime/lib/hier_block2_detail.cc')
-rw-r--r--gnuradio-runtime/lib/hier_block2_detail.cc35
1 files changed, 35 insertions, 0 deletions
diff --git a/gnuradio-runtime/lib/hier_block2_detail.cc b/gnuradio-runtime/lib/hier_block2_detail.cc
index 7210dca7cf..249fccf304 100644
--- a/gnuradio-runtime/lib/hier_block2_detail.cc
+++ b/gnuradio-runtime/lib/hier_block2_detail.cc
@@ -685,6 +685,41 @@ namespace gr {
<< " is not connected internally";
throw std::runtime_error(msg.str());
}
+ // TODO: Update buffers of just these output blocks
+ if(!set_all_min_buff){
+ min_buff = d_owner->min_output_buffer(i);
+ if(min_buff != -1){
+ block_sptr bb = boost::dynamic_pointer_cast<block>(blk);
+ if(bb != 0){
+ int bb_src_port = d_outputs[i].port();
+ bb->set_min_output_buffer(bb_src_port, min_buff);
+ }
+ else{
+ hier_block2_sptr hh = boost::dynamic_pointer_cast<hier_block2>(blk);
+ if(hh != 0){
+ int hh_src_port = d_outputs[i].port();
+ hh->set_min_output_buffer(hh_src_port, min_buff);
+ }
+ }
+ }
+ }
+ if(!set_all_max_buff){
+ max_buff = d_owner->max_output_buffer(i);
+ if(max_buff != -1){
+ block_sptr bb = boost::dynamic_pointer_cast<block>(blk);
+ if(bb != 0){
+ int bb_src_port = d_outputs[i].port();
+ bb->set_max_output_buffer(bb_src_port, max_buff);
+ }
+ else{
+ hier_block2_sptr hh = boost::dynamic_pointer_cast<hier_block2>(blk);
+ if(hh != 0){
+ int hh_src_port = d_outputs[i].port();
+ hh->set_max_output_buffer(hh_src_port, max_buff);
+ }
+ }
+ }
+ }
tmp.push_back(blk);
}
sort(tmp.begin(), tmp.end());