commit-gnuradio
[Top][All Lists]
Advanced

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

[Commit-gnuradio] [gnuradio] 04/06: grc: remove support for old msg queu


From: git
Subject: [Commit-gnuradio] [gnuradio] 04/06: grc: remove support for old msg queues
Date: Thu, 8 Sep 2016 19:45:30 +0000 (UTC)

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

jcorgan pushed a commit to branch next
in repository gnuradio.

commit 324e72db7e4d9564dbfea853d8244a080e7ffaf8
Author: Sebastian Koslowski <address@hidden>
Date:   Wed Jul 27 22:24:15 2016 +0200

    grc: remove support for old msg queues
    
    cherry-picked from gtk3 branch
---
 grc/core/Connection.py             |  3 ---
 grc/core/Constants.py              |  2 --
 grc/core/Port.py                   |  8 --------
 grc/core/generator/Generator.py    |  4 +---
 grc/core/generator/flow_graph.tmpl | 13 -------------
 5 files changed, 1 insertion(+), 29 deletions(-)

diff --git a/grc/core/Connection.py b/grc/core/Connection.py
index 3aa32ef..c028d89 100644
--- a/grc/core/Connection.py
+++ b/grc/core/Connection.py
@@ -82,9 +82,6 @@ class Connection(Element):
             self.get_sink(),
         )
 
-    def is_msg(self):
-        return self.get_source().get_type() == self.get_sink().get_type() == 
'msg'
-
     def is_bus(self):
         return self.get_source().get_type() == self.get_sink().get_type() == 
'bus'
 
diff --git a/grc/core/Constants.py b/grc/core/Constants.py
index 64487b5..edd3442 100644
--- a/grc/core/Constants.py
+++ b/grc/core/Constants.py
@@ -108,7 +108,6 @@ CORE_TYPES = (  # name, key, sizeof, color
     ('Integer 16', 's16', 2, GRC_COLOR_YELLOW),
     ('Integer 8', 's8', 1, GRC_COLOR_PURPLE_A400),
     ('Bits (unpacked byte)', 'bit', 1, GRC_COLOR_PURPLE_A100),
-    ('Message Queue', 'msg', 0, GRC_COLOR_DARK_GREY),
     ('Async Message', 'message', 0, GRC_COLOR_GREY),
     ('Bus Connection', 'bus', 0, GRC_COLOR_WHITE),
     ('Wildcard', '', 0, GRC_COLOR_WHITE),
@@ -147,4 +146,3 @@ SHORT_VECTOR_COLOR_SPEC = '#CCCC33'
 BYTE_VECTOR_COLOR_SPEC = '#CC66CC'
 ID_COLOR_SPEC = '#DDDDDD'
 WILDCARD_COLOR_SPEC = '#FFFFFF'
-MSG_COLOR_SPEC = '#777777'
diff --git a/grc/core/Port.py b/grc/core/Port.py
index 6a8f484..88601dc 100644
--- a/grc/core/Port.py
+++ b/grc/core/Port.py
@@ -119,8 +119,6 @@ class Port(Element):
         elif n['domain'] == GR_MESSAGE_DOMAIN:
             n['key'] = n['name']
             n['type'] = 'message'  # For port color
-        if n['type'] == 'msg':
-            n['key'] = 'msg'
         if not n.find('key'):
             n['key'] = str(next(block.port_counters[dir == 'source']))
 
@@ -161,12 +159,6 @@ class Port(Element):
             self.add_error_message('Domain key "{}" is not 
registered.'.format(self.get_domain()))
         if not self.get_enabled_connections() and not self.get_optional():
             self.add_error_message('Port is not connected.')
-        # Message port logic
-        if self.get_type() == 'msg':
-            if self.get_nports():
-                self.add_error_message('A port of type "msg" cannot have 
"nports" set.')
-            if self.get_vlen() != 1:
-                self.add_error_message('A port of type "msg" must have a 
"vlen" of 1.')
 
     def rewrite(self):
         """
diff --git a/grc/core/generator/Generator.py b/grc/core/generator/Generator.py
index be570ee..33d50d6 100644
--- a/grc/core/generator/Generator.py
+++ b/grc/core/generator/Generator.py
@@ -161,7 +161,7 @@ class TopBlockGenerator(object):
 
         # Filter out virtual sink connections
         def cf(c):
-            return not (c.is_bus() or c.is_msg() or 
c.get_sink().get_parent().is_virtual_sink())
+            return not (c.is_bus() or 
c.get_sink().get_parent().is_virtual_sink())
         connections = filter(cf, fg.get_enabled_connections())
 
         # Get the virtual blocks and resolve their connections
@@ -210,7 +210,6 @@ class TopBlockGenerator(object):
         ))
 
         connection_templates = fg.get_parent().connection_templates
-        msgs = filter(lambda c: c.is_msg(), fg.get_enabled_connections())
 
         # List of variable names
         var_ids = [var.get_id() for var in parameters + variables]
@@ -239,7 +238,6 @@ class TopBlockGenerator(object):
             'blocks': blocks,
             'connections': connections,
             'connection_templates': connection_templates,
-            'msgs': msgs,
             'generate_options': self._generate_options,
             'callbacks': callbacks,
         }
diff --git a/grc/core/generator/flow_graph.tmpl 
b/grc/core/generator/flow_graph.tmpl
index 2ae9f04..0597033 100644
--- a/grc/core/generator/flow_graph.tmpl
+++ b/grc/core/generator/flow_graph.tmpl
@@ -11,7 +11,6 @@
 address@hidden parameters the parameter blocks
 address@hidden blocks the signal blocks
 address@hidden connections the connections
address@hidden msgs the msg type connections
 address@hidden generate_options the type of flow graph
 address@hidden callbacks variable id map to callback strings
 ########################################################
@@ -193,18 +192,6 @@ gr.io_signaturev($(len($io_sigs)), $(len($io_sigs)), [$(', 
'.join($size_strs))])
         $indent($var.get_var_make())
 #end for
 ########################################################
-##Create Message Queues
-########################################################
-#if $msgs
-
-        $DIVIDER
-        # Message Queues
-        $DIVIDER
-#end if
-#for $msg in $msgs
-        $(msg.get_source().get_parent().get_id())_msgq_out = 
$(msg.get_sink().get_parent().get_id())_msgq_in = gr.msg_queue(2)
-#end for
-########################################################
 ##Create Blocks
 ########################################################
 #if $blocks



reply via email to

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