diff options
author | Volker Schroer <3470424+dl1ksv@users.noreply.github.com> | 2021-07-31 17:14:12 +0200 |
---|---|---|
committer | mormj <34754695+mormj@users.noreply.github.com> | 2021-09-02 08:29:16 -0400 |
commit | b417716a0a6e686d189596ffdaab1e4b8e9679b7 (patch) | |
tree | d83dce3bbfe94b42de62f0620a895092666ee5a2 /grc/core/generator/FlowGraphProxy.py | |
parent | 6c06dc9a8fb835cebd40f0aacacf268388748ecc (diff) |
grc cpp generation: Establish the possibility to add find packages
Flowgraphs may use oot modules. When generating cpp code an oot module
may require a package that is not provided by gnuradio.
So I propose to add an additional entry parameters in the cpp template
to provide a list of package names.
Signed-off-by: Volker Schroer <3470424+dl1ksv@users.noreply.github.com>
Diffstat (limited to 'grc/core/generator/FlowGraphProxy.py')
-rw-r--r-- | grc/core/generator/FlowGraphProxy.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/grc/core/generator/FlowGraphProxy.py b/grc/core/generator/FlowGraphProxy.py index f39f25d8fe..38d44e5b13 100644 --- a/grc/core/generator/FlowGraphProxy.py +++ b/grc/core/generator/FlowGraphProxy.py @@ -148,6 +148,15 @@ class FlowGraphProxy(object): # TODO: move this in a refactored Generator """ return [block.cpp_templates.render('link') for block in self.iter_enabled_blocks() if not (block.is_virtual_sink() or block.is_virtual_source())] + def packages(self): + """ + Get a set of all packages to find (C++) ( especially for oot modules ) in this flow graph namespace. + + Returns: + a list of required packages + """ + return [block.cpp_templates.render('packages') for block in self.iter_enabled_blocks() if not (block.is_virtual_sink() or block.is_virtual_source())] + def get_hier_block_io(flow_graph, direction, domain=None): """ Get a list of io ports for this flow graph. |