[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Commit-gnuradio] [gnuradio] 11/11: grc: fix variable vlen for grc gener
From: |
git |
Subject: |
[Commit-gnuradio] [gnuradio] 11/11: grc: fix variable vlen for grc generated hier blocks |
Date: |
Thu, 9 Jan 2014 21:52:40 +0000 (UTC) |
This is an automated email from the git hooks/post-receive script.
trondeau pushed a commit to branch maint
in repository gnuradio.
commit 7bb11823caaef273f9a0b2a033fedf11c3b88bc2
Author: Sebastian Koslowski <address@hidden>
Date: Thu Jan 9 09:53:47 2014 +0100
grc: fix variable vlen for grc generated hier blocks
---
grc/python/convert_hier.py | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/grc/python/convert_hier.py b/grc/python/convert_hier.py
index dc86daa..cf4c04a 100644
--- a/grc/python/convert_hier.py
+++ b/grc/python/convert_hier.py
@@ -71,7 +71,7 @@ def convert_hier(flow_graph, python_file):
sink_n = odict()
sink_n['name'] = input_sig['label']
sink_n['type'] = input_sig['type']
- sink_n['vlen'] = input_sig['vlen']
+ sink_n['vlen'] = var_or_value(input_sig['vlen'], parameters)
if input_sig['optional']: sink_n['optional'] = '1'
block_n['sink'].append(sink_n)
#sink data msg ports
@@ -91,7 +91,7 @@ def convert_hier(flow_graph, python_file):
source_n = odict()
source_n['name'] = output_sig['label']
source_n['type'] = output_sig['type']
- source_n['vlen'] = output_sig['vlen']
+ source_n['vlen'] = var_or_value(output_sig['vlen'], parameters)
if output_sig['optional']: source_n['optional'] = '1'
block_n['source'].append(source_n)
#source data msg ports
@@ -108,3 +108,9 @@ def convert_hier(flow_graph, python_file):
xml_file = python_file + '.xml'
ParseXML.to_file({'block': block_n}, xml_file)
ParseXML.validate_dtd(xml_file, BLOCK_DTD)
+
+
+def var_or_value(name, parameters):
+ if name in map(lambda p: p.get_id(), parameters):
+ return "$"+name
+ return name
\ No newline at end of file
- [Commit-gnuradio] [gnuradio] branch maint updated (ccfd5aa -> 7bb1182), git, 2014/01/09
- [Commit-gnuradio] [gnuradio] 01/11: runtime: Disable CPU_SET macros for FreeBSD., git, 2014/01/09
- [Commit-gnuradio] [gnuradio] 05/11: volk: some versions of clang have problems with cvtpi32_ps., git, 2014/01/09
- [Commit-gnuradio] [gnuradio] 03/11: qtgui: fixed naming of classes for long-term use., git, 2014/01/09
- [Commit-gnuradio] [gnuradio] 11/11: grc: fix variable vlen for grc generated hier blocks,
git <=
- [Commit-gnuradio] [gnuradio] 09/11: cmake: If Ice 3.4 found, check version of GCC and disable if >= 4.7., git, 2014/01/09
- [Commit-gnuradio] [gnuradio] 04/11: volk: clang sets GNUC_MINOR only to 2, so we need to check if we're building with clang. This patch enables xgetbv for clang >= 3.0., git, 2014/01/09
- [Commit-gnuradio] [gnuradio] 06/11: volk: test for clang version; if less than 3.2, disable SSE4a machine due to a bug in the compiler support., git, 2014/01/09
- [Commit-gnuradio] [gnuradio] 08/11: analog: additional docs for noise sources., git, 2014/01/09
- [Commit-gnuradio] [gnuradio] 10/11: volk: modifying tests for AVX and SSE4a support in compiler/CPU., git, 2014/01/09
- [Commit-gnuradio] [gnuradio] 07/11: filter: fixed an issue with filter delays for interp and rational_resampler filters., git, 2014/01/09
- [Commit-gnuradio] [gnuradio] 02/11: qtgui: fixed thread-safety in GRC variable-type blocks, git, 2014/01/09