summaryrefslogtreecommitdiff
path: root/grc
diff options
context:
space:
mode:
authorTim O'Shea <tim.oshea753@gmail.com>2013-07-19 11:13:42 -0400
committerTim O'Shea <tim.oshea753@gmail.com>2013-07-19 11:13:42 -0400
commit436fec40cbc165b401d85c4626f97510f0c97cd0 (patch)
tree3d2f1b9581c8b5d40f0ca5942bf1e1d0cea9719f /grc
parentfc80f3696d33643a2915e3e4bbbb073ce72912f2 (diff)
grc: allow set_min_output_buffer on any blocks that have output ports
Diffstat (limited to 'grc')
-rw-r--r--grc/base/Block.py10
-rw-r--r--grc/python/flow_graph.tmpl3
2 files changed, 13 insertions, 0 deletions
diff --git a/grc/base/Block.py b/grc/base/Block.py
index 453023e456..a5f600ce6e 100644
--- a/grc/base/Block.py
+++ b/grc/base/Block.py
@@ -135,6 +135,16 @@ class Block(Element):
'hide': 'part',
})
))
+ if len(sources):
+ self.get_params().append(self.get_parent().get_parent().Param(
+ block=self,
+ n=odict({'name': 'Min Output Buffer',
+ 'key': 'minoutbuf',
+ 'type': 'int',
+ 'hide': 'part',
+ 'value': '0'
+ })
+ ))
def back_ofthe_bus(self, portlist):
portlist.sort(key=lambda a: a.get_type() == 'bus');
diff --git a/grc/python/flow_graph.tmpl b/grc/python/flow_graph.tmpl
index 2220e28ff7..bed979eacb 100644
--- a/grc/python/flow_graph.tmpl
+++ b/grc/python/flow_graph.tmpl
@@ -164,6 +164,9 @@ gr.io_signaturev($(len($io_sigs)), $(len($io_sigs)), [$(', '.join($size_strs))])
#if $blk.get_param('affinity').get_value()
(self.$blk.get_id()).set_processor_affinity($blk.get_param('affinity').get_value())
#end if
+ #if (len($blk.get_sources())>0) and (int($blk.get_param('minoutbuf').get_value()) > 0)
+ (self.$blk.get_id()).set_min_output_buffer($blk.get_param('minoutbuf').get_value())
+ #end if
#end if
#end for
########################################################