discuss-gnuradio
[Top][All Lists]
Advanced

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

Re: [Discuss-gnuradio] on the fly set_output_multiple()


From: Martin Braun
Subject: Re: [Discuss-gnuradio] on the fly set_output_multiple()
Date: Thu, 20 Feb 2014 20:31:57 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.3.0

On 02/20/2014 01:46 PM, Activecat wrote:
> I need to create a interpolator block which has a callback function to
> change its interpolation factor on the fly.
> 
> If this block is inherited from gr::sync_interpolator, its interpolation
> factor cannot be changed on the fly because the interpolation factor is
> an argument of its constructor.
> 
> The alternative is to inherit from gr::block instead.  If the
> set_output_multiple() could be called on the fly, then the problem is
> solved.
> 
> The problem is, the set_output_multiple() could not be changed on the fly !
> http://lists.gnu.org/archive/html/discuss-gnuradio/2010-11/msg00504.html
> 
> Any solution to this?
> The objective is to create an interpolator block that its interpolation
> factor could be changed on the fly.

Well, in a ::block you can do whatever you like with your in- and output
buffers. Also, forecast() is called all the time, and its behaviour can
by dynamic. So, between those you should be able to figure something out.

1) Edit forecast()
2) in general_work(), check if buffer sizes work
3) produce() and consume() as required

MB



reply via email to

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