discuss-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Discuss-gnuradio] About how to write c++ based signal processing bl


From: Adeel Anwar
Subject: Re: [Discuss-gnuradio] About how to write c++ based signal processing block
Date: Fri, 17 Feb 2012 02:01:36 -0500

Hi Martin,

i have used gr_modtool.py to create custom blocks and all these new blocks are working fine. Thanks to u for this good utility.

I have python/gnuradio installed on two machines. Same version of gr_modtool.py (downloaded yesterday) works fine on one but on second machine, it creates new module but when we try to add some block,  it exits with following error.

address@hidden:~/Desktop/blocks$ gr_modtool.py newmod mydsp
Module directory is "./gr-mydsp".
Creating directory...
Copying howto example...
Unpacking...
Replacing occurences of 'howto' to 'mydsp'...
Done.
Use 'gr_modtool add' to add a new block to this currently empty module.
address@hidden:~/Desktop/blocks$ cd gr-mydsp/
address@hidden:~/Desktop/blocks/gr-mydsp$ gr_modtool.py add
Operating in directory .
GNU Radio module name identified: mydsp
Enter code type: sync        
Code is of type: sync
Enter name of block/code (without module name prefix): algorithm1_ff
Block/code identifier: algorithm1_ff
Full block/code identifier is: mydsp_algorithm1_ff
Enter valid argument list, including default arguments: int x
Add Python QA code? [Y/n] y
Add C++ QA code? [Y/n] n
Traversing lib...
Adding file 'mydsp_algorithm1_ff.h'...
Adding file 'mydsp_algorithm1_ff.cc'...
Traceback (most recent call last):
  File "/usr/local/bin/gr_modtool.py", line 2315, in <module>
    main()
  File "/usr/local/bin/gr_modtool.py", line 2312, in main
    modtool.run()
  File "/usr/local/bin/gr_modtool.py", line 748, in run
    self._run_lib()
  File "/usr/local/bin/gr_modtool.py", line 787, in _run_lib
    ed.append_value('add_library', fname_cc)
  File "/usr/local/bin/gr_modtool.py", line 503, in append_value
    count=1, flags=re.MULTILINE)
TypeError: sub() got an unexpected keyword argument 'flags'
address@hidden:~/Desktop/blocks/gr-mydsp$


Thanks,
  Adeel




On Wed, Feb 15, 2012 at 12:29 PM, Martin Braun <address@hidden> wrote:
On Wed, Feb 15, 2012 at 11:15:55AM -0600, Alex Zhang wrote:
> Hi Gurus,
>
> To learn how to write the signal processing block over C++, I downloaded the
> gr-how-to-write-a-block and successfully build the block and passed the test. 
>
> But my question is, for a block writer who is not familiar with the complex
> building tree, like the makefile writing, can the future block writing just be
> simply based on the building framework provided by the 
> gr-how-to-write-a-block example? I mean, I do not want to dig too much the
> makefile, but just reuse the current example with minor modification, to meet
> all the requirements from the new block generating.

Sure that's OK.
You can also use gr_modtool.py (available at https://cgran.org/wiki/devtools)
which does all the Makefile editing for you.

If you're using the autotools version of howto-write-a-block (which
apparently you are), you need the older version.

MB

--
Karlsruhe Institute of Technology (KIT)
Communications Engineering Lab (CEL)

Dipl.-Ing. Martin Braun
Research Associate

Kaiserstraße 12
Building 05.01
76131 Karlsruhe

Phone: +49 721 608-43790
Fax: +49 721 608-46071
www.cel.kit.edu

KIT -- University of the State of Baden-Württemberg and
National Laboratory of the Helmholtz Association


_______________________________________________
Discuss-gnuradio mailing list
address@hidden
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio



reply via email to

[Prev in Thread] Current Thread [Next in Thread]