diff options
Diffstat (limited to 'gr-utils/python')
-rw-r--r-- | gr-utils/python/modtool/code_generator.py | 16 | ||||
-rw-r--r-- | gr-utils/python/modtool/gr-newmod/include/howto/api.h | 2 | ||||
-rw-r--r-- | gr-utils/python/modtool/gr-newmod/lib/qa_howto.h | 2 | ||||
-rw-r--r-- | gr-utils/python/modtool/gr-newmod/lib/test_howto.cc | 2 | ||||
-rw-r--r-- | gr-utils/python/modtool/gr-newmod/swig/CMakeLists.txt | 2 | ||||
-rw-r--r-- | gr-utils/python/modtool/parser_cc_block.py | 6 | ||||
-rw-r--r-- | gr-utils/python/modtool/templates.py | 20 |
7 files changed, 25 insertions, 25 deletions
diff --git a/gr-utils/python/modtool/code_generator.py b/gr-utils/python/modtool/code_generator.py index fbe9aa92c2..33cebc68c4 100644 --- a/gr-utils/python/modtool/code_generator.py +++ b/gr-utils/python/modtool/code_generator.py @@ -31,14 +31,14 @@ class GRMTemplate(Cheetah.Template.Template): """ An extended template class """ def __init__(self, src, searchList): self.grtypelist = { - 'sync': 'gr_sync_block', - 'sink': 'gr_sync_block', - 'source': 'gr_sync_block', - 'decimator': 'gr_sync_decimator', - 'interpolator': 'gr_sync_interpolator', - 'general': 'gr_block', - 'tagged_stream': 'gr_tagged_stream_block', - 'hier': 'gr_hier_block2', + 'sync': 'sync_block', + 'sink': 'sync_block', + 'source': 'sync_block', + 'decimator': 'sync_decimator', + 'interpolator': 'sync_interpolator', + 'general': 'block', + 'tagged_stream': 'tagged_stream_block', + 'hier': 'hier_block2', 'noblock': ''} searchList['str_to_fancyc_comment'] = str_to_fancyc_comment searchList['str_to_python_comment'] = str_to_python_comment diff --git a/gr-utils/python/modtool/gr-newmod/include/howto/api.h b/gr-utils/python/modtool/gr-newmod/include/howto/api.h index 0c20712786..db5f81f394 100644 --- a/gr-utils/python/modtool/gr-newmod/include/howto/api.h +++ b/gr-utils/python/modtool/gr-newmod/include/howto/api.h @@ -22,7 +22,7 @@ #ifndef INCLUDED_HOWTO_API_H #define INCLUDED_HOWTO_API_H -#include <attributes.h> +#include <gnuradio/attributes.h> #ifdef gnuradio_howto_EXPORTS # define HOWTO_API __GR_ATTR_EXPORT diff --git a/gr-utils/python/modtool/gr-newmod/lib/qa_howto.h b/gr-utils/python/modtool/gr-newmod/lib/qa_howto.h index 069afd38ae..23f0f7f33e 100644 --- a/gr-utils/python/modtool/gr-newmod/lib/qa_howto.h +++ b/gr-utils/python/modtool/gr-newmod/lib/qa_howto.h @@ -23,7 +23,7 @@ #ifndef _QA_HOWTO_H_ #define _QA_HOWTO_H_ -#include <attributes.h> +#include <gnuradio/attributes.h> #include <cppunit/TestSuite.h> //! collect all the tests for the gr-filter directory diff --git a/gr-utils/python/modtool/gr-newmod/lib/test_howto.cc b/gr-utils/python/modtool/gr-newmod/lib/test_howto.cc index 9c5faa0eba..f01bd5a064 100644 --- a/gr-utils/python/modtool/gr-newmod/lib/test_howto.cc +++ b/gr-utils/python/modtool/gr-newmod/lib/test_howto.cc @@ -27,7 +27,7 @@ #include <cppunit/TextTestRunner.h> #include <cppunit/XmlOutputter.h> -#include <gr_unittests.h> +#include <gnuradio/unittests.h> #include "qa_howto.h" #include <iostream> diff --git a/gr-utils/python/modtool/gr-newmod/swig/CMakeLists.txt b/gr-utils/python/modtool/gr-newmod/swig/CMakeLists.txt index bfcf3d521f..b9925ea06f 100644 --- a/gr-utils/python/modtool/gr-newmod/swig/CMakeLists.txt +++ b/gr-utils/python/modtool/gr-newmod/swig/CMakeLists.txt @@ -32,7 +32,7 @@ include(GrPython) # Setup swig generation ######################################################################## foreach(incdir ${GNURADIO_RUNTIME_INCLUDE_DIRS}) - list(APPEND GR_SWIG_INCLUDE_DIRS ${incdir}/swig) + list(APPEND GR_SWIG_INCLUDE_DIRS ${incdir}/gnuradio/swig) endforeach(incdir) set(GR_SWIG_LIBRARIES gnuradio-howto) diff --git a/gr-utils/python/modtool/parser_cc_block.py b/gr-utils/python/modtool/parser_cc_block.py index 0d1d75f29a..703522c8fb 100644 --- a/gr-utils/python/modtool/parser_cc_block.py +++ b/gr-utils/python/modtool/parser_cc_block.py @@ -41,7 +41,7 @@ class ParserCCBlock(object): """ From a type identifier, returns the data type. E.g., for sizeof(int), it will return 'int'. Returns a list! """ - if 'gr_make_iosignaturev' in iosigcall: + if 'gr::io_signature::makev' in iosigcall: print 'tbi' raise ValueError return {'type': [_typestr_to_iotype(x) for x in typestr.split(',')], @@ -72,9 +72,9 @@ class ParserCCBlock(object): elif len(vlen_parts) > 1: return '*'.join(vlen_parts).strip() iosig = {} - iosig_regex = '(?P<incall>gr_make_io_signature[23v]?)\s*\(\s*(?P<inmin>[^,]+),\s*(?P<inmax>[^,]+),' + \ + iosig_regex = '(?P<incall>gr::io_signature::make[23v]?)\s*\(\s*(?P<inmin>[^,]+),\s*(?P<inmax>[^,]+),' + \ '\s*(?P<intype>(\([^\)]*\)|[^)])+)\),\s*' + \ - '(?P<outcall>gr_make_io_signature[23v]?)\s*\(\s*(?P<outmin>[^,]+),\s*(?P<outmax>[^,]+),' + \ + '(?P<outcall>gr::io_signature::make[23v]?)\s*\(\s*(?P<outmin>[^,]+),\s*(?P<outmax>[^,]+),' + \ '\s*(?P<outtype>(\([^\)]*\)|[^)])+)\)' iosig_match = re.compile(iosig_regex, re.MULTILINE).search(self.code_cc) try: diff --git a/gr-utils/python/modtool/templates.py b/gr-utils/python/modtool/templates.py index a4a0223e89..7fef3f5b4e 100644 --- a/gr-utils/python/modtool/templates.py +++ b/gr-utils/python/modtool/templates.py @@ -105,7 +105,7 @@ ${str_to_fancyc_comment($license)} \#include "config.h" \#endif -\#include <gr_io_signature.h> +\#include <gnuradio/io_signature.h> #if $blocktype == 'noblock' \#include <${modname}/${blockname}.h> #else @@ -153,9 +153,9 @@ namespace gr { * The private constructor */ ${blockname}_impl::${blockname}_impl(${strip_default_values($arglist)}) - : ${grblocktype}("${blockname}", - gr_make_io_signature($inputsig), - gr_make_io_signature($outputsig)$decimation) + : gr::${grblocktype}("${blockname}", + gr::io_signature::make($inputsig), + gr::io_signature::make($outputsig)$decimation) #if $blocktype == 'hier' { connect(self(), 0, d_firstblock, 0); @@ -251,7 +251,7 @@ ${str_to_fancyc_comment($license)} \#define INCLUDED_${modname.upper()}_${blockname.upper()}_H \#include <${modname}/api.h> -\#include <${grblocktype}.h> +\#include <gnuradio/${grblocktype}.h> namespace gr { namespace ${modname} { @@ -273,7 +273,7 @@ namespace gr { * \ingroup ${modname} * */ - class ${modname.upper()}_API ${blockname} : virtual public $grblocktype + class ${modname.upper()}_API ${blockname} : virtual public gr::$grblocktype { public: typedef boost::shared_ptr<${blockname}> sptr; @@ -297,7 +297,7 @@ namespace gr { ''' -# Python block (from grextras!) +# Python block Templates['block_python'] = '''\#!/usr/bin/env python ${str_to_python_comment($license)} # @@ -587,7 +587,7 @@ ${modname}_make_${blockname} (${strip_default_values($arglist)}) * The private constructor */ ${modname}_${blockname}::${modname}_${blockname} (${strip_default_values($arglist)}) - : ${grblocktype} ("${blockname}", + : gr_${grblocktype} ("${blockname}", gr_make_io_signature($inputsig), gr_make_io_signature($outputsig)$decimation) { @@ -672,7 +672,7 @@ class ${modname.upper()}_API $blockname }; #else -\#include <${grblocktype}.h> +\#include <gr_${grblocktype}.h> class ${modname}_${blockname}; @@ -685,7 +685,7 @@ ${modname.upper()}_API ${modname}_${blockname}_sptr ${modname}_make_${blockname} * \ingroup ${modname} * */ -class ${modname.upper()}_API ${modname}_${blockname} : public $grblocktype +class ${modname.upper()}_API ${modname}_${blockname} : public gr_$grblocktype { private: friend ${modname.upper()}_API ${modname}_${blockname}_sptr ${modname}_make_${blockname} (${strip_default_values($arglist)}); |