discuss-gnuradio
[Top][All Lists]
Advanced

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

Re: [Discuss-gnuradio] Dynamic Variable


From: Marcus Müller
Subject: Re: [Discuss-gnuradio] Dynamic Variable
Date: Sun, 31 Jan 2016 18:49:32 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.1.0

Hi Nigel,

the problem is that these variables are very much a GRC construct, not really GNU Radio. So, if you want something that you can update dynamically, I'd rather recommend implementing message passing/handling (like the USRP source, for example, which has such an input port, grey in GRC), so you can send messages from any block (or really, any piece of code) to your block.

Indeed, if you'd really like to have something like a GUI slider that changes a parameter of your block, you just define a <callback> element in your block XML; see the gr::blocks::head block XML as an example[1], where you can define a callback for the number of items after which to stop.
Basically, it's just <callback>function($changed_parameter)</callback> at the right position.

Best regards,
Marcus

[1] https://github.com/gnuradio/gnuradio/blob/master/gr-blocks/grc/blocks_head.xml#L12

On 01/31/2016 03:21 PM, Nigel Steed wrote:

Hi,

 

Can anyone help point me in the right direction for implementing a dynamic variable as a parameter within my own OOT module. For example, the same way UHD Source RF Frequency parameter works which you can then adjust at runtime.

 

Thanks,

 

Nigel



_______________________________________________
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]