diff options
author | Tom Rondeau | 2013-05-24 17:20:46 -0400 |
---|---|---|
committer | Johnathan Corgan | 2013-05-25 14:09:23 -0700 |
commit | 2ebafea749da3101f4fb43d77444cedbc719ee08 (patch) | |
tree | 8643c52d5145a312cc8f4b09c38a77cc83474467 /gr-utils/src/python/modtool/util_functions.py | |
parent | d1f48160a87388369c54c7c6eeef404c1a31fe3e (diff) | |
download | gnuradio-2ebafea749da3101f4fb43d77444cedbc719ee08.tar.gz gnuradio-2ebafea749da3101f4fb43d77444cedbc719ee08.tar.bz2 gnuradio-2ebafea749da3101f4fb43d77444cedbc719ee08.zip |
modtool: Fixes for intial templates of a block.
1. adds '$' to args in the GRC xml <make> tag.
2. sets <+ITYPE+> and <+OTYPE+> for all I/O data types in io_signature and in work functions to be more clear what needs modification.
Conflicts:
gr-utils/src/python/modtool/templates.py
Diffstat (limited to 'gr-utils/src/python/modtool/util_functions.py')
-rw-r--r-- | gr-utils/src/python/modtool/util_functions.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/gr-utils/src/python/modtool/util_functions.py b/gr-utils/src/python/modtool/util_functions.py index c40dbd73b..9551056f0 100644 --- a/gr-utils/src/python/modtool/util_functions.py +++ b/gr-utils/src/python/modtool/util_functions.py @@ -81,6 +81,12 @@ def strip_arg_types(string): string = strip_default_values(string) return ", ".join([part.strip().split(' ')[-1] for part in string.split(',')]) +def strip_arg_types_grc(string): + """" Strip the argument types from a list of arguments for GRC make tag. + Example: "int arg1, double arg2" -> "$arg1, $arg2" """ + string = strip_default_values(string) + return ", ".join(['$' + part.strip().split(' ')[-1] for part in string.split(',')]) + def get_modname(): """ Grep the current module's name from gnuradio.project or CMakeLists.txt """ modname_trans = {'howto-write-a-block': 'howto'} |