discuss-gnuradio
[Top][All Lists]
Advanced

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

Re: [Discuss-gnuradio] Additional code to GRC flowgraph


From: Marcus Müller
Subject: Re: [Discuss-gnuradio] Additional code to GRC flowgraph
Date: Fri, 03 Jul 2015 18:46:12 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0

Hi Daniel,

if your code really just looks like

from awesometoolkit import skynet
skynet.kill_sarah()

you can put that into an "import" block.

But: what you describe doesn't sound like you want to modify the top
block -- it sounds more like you'd want a block to calculate SNR, and
every f_sample*3 samples change some other block.

Now, this completely depends on the block where the freq. offset is
used, but you can just write a block (in python or C++, only matters for
performance), and give that block an message output port, and send
messages containing the changed parameter to the block that needs
adjustment.

If you take a look at the frequency xlating fir filter block, it has a
message port named "freq", which takes in PMT messages in form of
tuples; these tuples must be of the form
pmt.pair(pmt.intern("freq"), pmt.from_double(123.131) )


Best regards,
Marcus
On 07/03/2015 04:27 PM, Daniel Brogren wrote:
> Hi
>
> I'm working with a receiver application in GNU Radio Companion. I would like 
> to add some additional code to the top block but I still want to be able to 
> work with the GRC. Is there a way to add this extra code without the code 
> will be removed when I re-generate the flowgraph from GRC
>     or
>     Could I create a new block that can access the variables in the top block 
> or can execute the set/get functions for the variables in the top block.
>
>     What I'm trying to accomplish is that every 3rd second I will check the 
> SNR and then do som trimming of a freq-offset. I'm a newbie with GNU Radio 
> and Python but have read through the guided tutorials.
>
>     BR
>     Daniel Brogren
> _______________________________________________
> 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]