[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Commit-gnuradio] [gnuradio] 67/101: grc: remove support for old msg que
From: |
git |
Subject: |
[Commit-gnuradio] [gnuradio] 67/101: grc: remove support for old msg queues |
Date: |
Thu, 16 Mar 2017 14:58:08 +0000 (UTC) |
This is an automated email from the git hooks/post-receive script.
jcorgan pushed a commit to branch python3
in repository gnuradio.
commit 5d4baf530af8ca843dcfe310af3bd34d4cf7c3ad
Author: Sebastian Koslowski <address@hidden>
Date: Wed Jul 27 22:24:15 2016 +0200
grc: remove support for old msg queues
---
grc/core/Connection.py | 3 ---
grc/core/Constants.py | 1 -
grc/core/Port.py | 8 --------
grc/core/generator/Generator.py | 9 +++------
grc/core/generator/flow_graph.tmpl | 13 -------------
grc/gui/Port.py | 2 +-
6 files changed, 4 insertions(+), 32 deletions(-)
diff --git a/grc/core/Connection.py b/grc/core/Connection.py
index 63c6a94..0665321 100644
--- a/grc/core/Connection.py
+++ b/grc/core/Connection.py
@@ -101,9 +101,6 @@ class Connection(Element):
self.source_block, self.source_port, self.sink_block,
self.sink_port,
)
- def is_msg(self):
- return self.source_port.get_type() == self.sink_port.get_type() ==
'msg'
-
def is_bus(self):
return self.source_port.get_type() == 'bus'
diff --git a/grc/core/Constants.py b/grc/core/Constants.py
index bc387a4..13e29cb 100644
--- a/grc/core/Constants.py
+++ b/grc/core/Constants.py
@@ -118,7 +118,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),
diff --git a/grc/core/Port.py b/grc/core/Port.py
index 0d9298f..41388df 100644
--- a/grc/core/Port.py
+++ b/grc/core/Port.py
@@ -124,8 +124,6 @@ class Port(Element):
elif n['domain'] == Constants.GR_MESSAGE_DOMAIN:
n['key'] = n['name']
n['type'] = 'message' # For port color
- if n['type'] == 'msg':
- n['key'] = 'msg'
# Build the port
Element.__init__(self, parent)
@@ -159,12 +157,6 @@ class Port(Element):
self.add_error_message('Domain key "{}" is not
registered.'.format(self.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 a3b0c8a..a9ce933 100644
--- a/grc/core/generator/Generator.py
+++ b/grc/core/generator/Generator.py
@@ -165,10 +165,9 @@ class TopBlockGenerator(object):
src = block.get_param('source_code').get_value()
output.append((file_path, src))
- # Filter out virtual sink connections
- def cf(c):
- return not (c.is_bus() or c.is_msg() or
c.sink_block.is_virtual_sink())
- connections = [con for con in fg.get_enabled_connections() if cf(con)]
+ # Filter out bus and virtual sink connections
+ connections = [con for con in fg.get_enabled_connections()
+ if not (con.is_bus() or
con.sink_block.is_virtual_sink())]
# Get the virtual blocks and resolve their connections
connection_factory = fg.parent_platform.Connection
@@ -216,7 +215,6 @@ class TopBlockGenerator(object):
))
connection_templates = fg.parent.connection_templates
- msgs = [c for c in fg.get_enabled_connections() if c.is_msg()]
# List of variable names
var_ids = [var.get_id() for var in parameters + variables]
@@ -245,7 +243,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 4ce2a51..fd5546e 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
########################################################
@@ -200,18 +199,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.source_block.get_id())_msgq_out =
$(msg.sink_block.get_id())_msgq_in = gr.msg_queue(2)
-#end for
-########################################################
##Create Blocks
########################################################
#if $blocks
diff --git a/grc/gui/Port.py b/grc/gui/Port.py
index 0880856..21271cc 100644
--- a/grc/gui/Port.py
+++ b/grc/gui/Port.py
@@ -71,7 +71,7 @@ class Port(_Port, Element):
Returns:
a hex color code.
"""
- color = Colors.PORT_TYPE_TO_COLOR[self.get_type()]
+ color = Colors.PORT_TYPE_TO_COLOR.get(self.get_type()) or
Colors.PORT_TYPE_TO_COLOR.get('')
vlen = self.get_vlen()
if vlen > 1:
dark = (0, 0, 30 / 255.0, 50 / 255.0, 70 / 255.0)[min(4, vlen)]
- [Commit-gnuradio] [gnuradio] 43/101: grc: refactor: minor clean-up and fixes, (continued)
- [Commit-gnuradio] [gnuradio] 43/101: grc: refactor: minor clean-up and fixes, git, 2017/03/16
- [Commit-gnuradio] [gnuradio] 44/101: grc: gtk3: fix connection arrows, git, 2017/03/16
- [Commit-gnuradio] [gnuradio] 56/101: grc: gtk3: fix generating virtual/bypassed connections, git, 2017/03/16
- [Commit-gnuradio] [gnuradio] 46/101: grc: dynamic super-classing proof-of-concept =), git, 2017/03/16
- [Commit-gnuradio] [gnuradio] 53/101: grc: make dummy blocks a block subclass, git, 2017/03/16
- [Commit-gnuradio] [gnuradio] 68/101: grc: add error messages iterator, git, 2017/03/16
- [Commit-gnuradio] [gnuradio] 64/101: grc: gtk3: better lables/shapes handling during flowgraph update, git, 2017/03/16
- [Commit-gnuradio] [gnuradio] 62/101: grc: refactor: handle flowgraph and connection super init same as in block, git, 2017/03/16
- [Commit-gnuradio] [gnuradio] 65/101: grc: gtk3: dashed lines for message connections, thicker ones for custom domains, git, 2017/03/16
- [Commit-gnuradio] [gnuradio] 54/101: grc: refactor: replace get_enabled by prop, git, 2017/03/16
- [Commit-gnuradio] [gnuradio] 67/101: grc: remove support for old msg queues,
git <=
- [Commit-gnuradio] [gnuradio] 60/101: grc: gtk3: update various deprecated gtk calls, git, 2017/03/16
- [Commit-gnuradio] [gnuradio] 52/101: grc: refactor: remove get for port and param name, git, 2017/03/16
- [Commit-gnuradio] [gnuradio] 40/101: grc: gtk3: remove coordinate getter/setter, git, 2017/03/16
- [Commit-gnuradio] [gnuradio] 69/101: grc: gtk3: use darkened bg color for port border, git, 2017/03/16
- [Commit-gnuradio] [gnuradio] 55/101: grc: various clean-ups and fixes, git, 2017/03/16
- [Commit-gnuradio] [gnuradio] 48/101: grc: refactor: class for nports port clones, git, 2017/03/16
- [Commit-gnuradio] [gnuradio] 49/101: grc: refactor: some more bus ports stuff, git, 2017/03/16
- [Commit-gnuradio] [gnuradio] 50/101: grc: refactor: move type and port controllers to gui, git, 2017/03/16
- [Commit-gnuradio] [gnuradio] 66/101: grc: gtk3: remove deprecated add_with_viewport(), git, 2017/03/16
- [Commit-gnuradio] [gnuradio] 73/101: grc: gtk3: Tweaked color styles for ports, git, 2017/03/16