commit-gnuradio
[Top][All Lists]
Advanced

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

[Commit-gnuradio] [gnuradio] 12/22: grc: port connections by domain, blo


From: git
Subject: [Commit-gnuradio] [gnuradio] 12/22: grc: port connections by domain, block name in generated code
Date: Tue, 23 Dec 2014 09:38:58 +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 a4e0154373510695741f840298f4ea7c2cbb217a
Author: Sebastian Koslowski <address@hidden>
Date:   Mon Dec 8 22:36:47 2014 +0100

    grc: port connections by domain, block name in generated code
---
 grc/python/Generator.py | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/grc/python/Generator.py b/grc/python/Generator.py
index a1f8457..7512cfb 100644
--- a/grc/python/Generator.py
+++ b/grc/python/Generator.py
@@ -164,8 +164,12 @@ class TopBlockGenerator(object):
         )
         # list of regular blocks (all blocks minus the special ones)
         blocks = filter(lambda b: b not in (imports + parameters), blocks)
-        # list of connections where each endpoint is enabled
+        # list of connections where each endpoint is enabled (sorted by 
domains, block names)
         connections = filter(lambda c: not (c.is_bus() or c.is_msg()), 
self._flow_graph.get_enabled_connections())
+        connections.sort(key=lambda c: (
+            c.get_source().get_domain(), c.get_sink().get_domain(),
+            c.get_source().get_parent().get_id(), 
c.get_sink().get_parent().get_id()
+        ))
         connection_templates = 
self._flow_graph.get_parent().get_connection_templates()
         msgs = filter(lambda c: c.is_msg(), 
self._flow_graph.get_enabled_connections())
         # list of variable names



reply via email to

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