discuss-gnuradio
[Top][All Lists]
Advanced

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

Re: [Discuss-gnuradio] adding python block to gnuradio


From: Nathan West
Subject: Re: [Discuss-gnuradio] adding python block to gnuradio
Date: Wed, 13 Mar 2013 06:18:02 -0500

On Wed, Mar 13, 2013 at 5:57 AM, Mohammed Ramadan <address@hidden> wrote:
i made python block and want to add it to module in gnuradio, i open the directory of the module and use gr_motool add -t source filename.py. the tool created the .cc file and .h but as templates no processing done in the files.
so can anyone advise me to add python block?


There's a great tutorial here: http://gnuradio.org/redmine/projects/gnuradio/wiki/OutOfTreeModules

The gr_modtool work flow is that gr_modtool generates a lot of the required boilerplate code used by GR and then you edit those files with your signal processing code. Notice there's section on python blocks in the tutorial (Tutorial #3).

It sounds like you've already got your signal processing code done. I would suggest copying what you have in to the boiler plate code generated by gr_modtool. An alternative is importing what you already have and edit the work: function to call what you already have.

Make sure you tell gr_modtool that you want to generate a python block with the -l switch. Going through that tutorial will be the single most useful thing in learning how to make a new block.

reply via email to

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