summaryrefslogtreecommitdiff
path: root/gr-utils/python/modtool/util_functions.py
diff options
context:
space:
mode:
authorTom Rondeau <trondeau@vt.edu>2013-05-24 17:20:46 -0400
committerTom Rondeau <trondeau@vt.edu>2013-05-24 17:20:46 -0400
commit6b1e513f71dc70b435d2bff920e06d20c569f189 (patch)
tree6b261a7242e0fcc87db822a4aab2db69892c34c0 /gr-utils/python/modtool/util_functions.py
parent74c3da35ff660145c993f74c5a1e519660d125d4 (diff)
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.
Diffstat (limited to 'gr-utils/python/modtool/util_functions.py')
-rw-r--r--gr-utils/python/modtool/util_functions.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/gr-utils/python/modtool/util_functions.py b/gr-utils/python/modtool/util_functions.py
index c40dbd73bb..9551056f0d 100644
--- a/gr-utils/python/modtool/util_functions.py
+++ b/gr-utils/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'}