summaryrefslogtreecommitdiff
path: root/grc/python/flow_graph.tmpl
diff options
context:
space:
mode:
authorJosh Blum2009-08-20 01:30:23 -0700
committerJosh Blum2009-08-20 01:30:23 -0700
commitbf232a6e6e73d156c9a46c26842480352c6794c0 (patch)
tree35138c746073c4f31aad4a4f9aa826fdd4d2281c /grc/python/flow_graph.tmpl
parent63c928575c10741ac6a6c3c3c8be9c238e7b8432 (diff)
downloadgnuradio-bf232a6e6e73d156c9a46c26842480352c6794c0.tar.gz
gnuradio-bf232a6e6e73d156c9a46c26842480352c6794c0.tar.bz2
gnuradio-bf232a6e6e73d156c9a46c26842480352c6794c0.zip
added continuation mode for pad source and sinks
Diffstat (limited to 'grc/python/flow_graph.tmpl')
-rw-r--r--grc/python/flow_graph.tmpl17
1 files changed, 17 insertions, 0 deletions
diff --git a/grc/python/flow_graph.tmpl b/grc/python/flow_graph.tmpl
index df346dd16..32139636a 100644
--- a/grc/python/flow_graph.tmpl
+++ b/grc/python/flow_graph.tmpl
@@ -161,8 +161,20 @@ class $(class_name)(gr.hier_block2):
$DIVIDER
#end if
#for $con in $connections
+ ####################################################################
+ ## Logic to extract source and sink
+ ## Special resolution logic for pad source in continuation mode
+ ####################################################################
#set $source = $con.get_source()
#set $sink = $con.get_sink()
+ #if $source.get_parent().get_key() == 'pad_source' and $source.get_parent().get_param('mode').get_value() == 'cont'
+ #set $pad_sink_id = $source.get_parent().get_param('pad_sink_id').get_evaluated()
+ #set $pad_sink = filter(lambda b: b.get_id() == pad_sink_id, $blocks)[0]
+ #set $source = $pad_sink.get_sink($source.get_key()).get_connections()[0].get_source()
+ #end if
+ ####################################################################
+ ## Logic to extract source and sink names
+ ####################################################################
#if $source.get_parent().get_key() == 'pad_source'
#set $source_name = 'self'
#else
@@ -173,7 +185,12 @@ class $(class_name)(gr.hier_block2):
#else
#set $sink_name = 'self.' + $sink.get_parent().get_id()
#end if
+ ####################################################################
+ ## Dont make a connection for continuation pad sinks!!!
+ ####################################################################
+ #if not ($sink.get_parent().get_key() == 'pad_sink' and $sink.get_parent().get_param('mode').get_value() == 'cont')
self.connect(($source_name, $source.get_key()), ($sink_name, $sink.get_key()))
+ #end if
#end for
########################################################