summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--grc/core/Connection.py3
-rw-r--r--grc/core/Constants.py1
-rw-r--r--grc/core/Port.py8
-rw-r--r--grc/core/generator/Generator.py9
-rw-r--r--grc/core/generator/flow_graph.tmpl13
-rw-r--r--grc/gui/Port.py2
6 files changed, 4 insertions, 32 deletions
diff --git a/grc/core/Connection.py b/grc/core/Connection.py
index 63c6a94571..066532149b 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 bc387a4837..13e29cb533 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 0d9298fb05..41388df409 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 a3b0c8af43..a9ce933aeb 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 4ce2a513c3..fd5546e459 100644
--- a/grc/core/generator/flow_graph.tmpl
+++ b/grc/core/generator/flow_graph.tmpl
@@ -11,7 +11,6 @@
##@param parameters the parameter blocks
##@param blocks the signal blocks
##@param connections the connections
-##@param msgs the msg type connections
##@param generate_options the type of flow graph
##@param 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 0880856b00..21271cc4d6 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)]