From f9d72e0a0c966322ae14be0f06658ffacefd15fd Mon Sep 17 00:00:00 2001 From: Tom Rondeau <trondeau@vt.edu> Date: Tue, 5 Feb 2013 21:03:38 -0500 Subject: GRC: can get list of ControlPort monitors to start them after top_block starts. For any GUI type (wx, qt, none), the ControlPort monitors will be started after the flowgraph is started to make sure the endpoints and blocks are created and available. --- grc/python/FlowGraph.py | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'grc/python/FlowGraph.py') diff --git a/grc/python/FlowGraph.py b/grc/python/FlowGraph.py index 055488b314..95cf9950a9 100644 --- a/grc/python/FlowGraph.py +++ b/grc/python/FlowGraph.py @@ -24,6 +24,7 @@ import re _variable_matcher = re.compile('^(variable\w*)$') _parameter_matcher = re.compile('^(parameter)$') +_monitors_searcher = re.compile('(monitor)') class FlowGraph(_FlowGraph, _GUIFlowGraph): @@ -137,6 +138,13 @@ class FlowGraph(_FlowGraph, _GUIFlowGraph): parameters = filter(lambda b: _parameter_matcher.match(b.get_key()), self.get_enabled_blocks()) return parameters + def get_monitors(self): + """ + Get a list of all ControlPort monitors + """ + monitors = filter(lambda b: _monitors_searcher.search(b.get_key()), self.get_enabled_blocks()) + return monitors + def rewrite(self): """ Flag the namespace to be renewed. -- cgit v1.2.3