|
From: | Marcus Müller |
Subject: | Re: [Discuss-gnuradio] Resampler with changing rate during runtime |
Date: | Wed, 3 Aug 2016 19:44:09 +0200 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.1.0 |
Ok, so the point is that you want to make run-time changes to an
existing block. The classical solution I'd go for is to put the block (here: resampler) into a hier block, and add something that receives, translates messages, or tags. On the other hand, really, the fractional_resampler_ff *should* have a message handler that changes the resampling ratio. The fact that there's a method that can just change the ratio while general_work() might be doing its job in a different thread is a multithreading disaster happening right before our eyes. So, if I might be as brazen: please make sure no-one already did this on next, and then just add a message port handler that sets the resampling ration (and one for the $\mu$, if possible), using the "canonical" pmt_dict format (i.e. {"resampling_ratio": pmt_double} or so). Since you're writing an OOT that you probably want people to use even if they're not using bleeding-edge GR, I'd personally say: copy&paste the resampler block you need from gr-filter to gr-inspector, modify it to your needs and upstream your changes, and also add a remark to your Readme that starting with GR version 3.X.Y, you don't need that block anymore; more responsible upstream developers than I am might have a different view, however. Cheers, Marcus On 08/03/2016 05:29 PM, Sebastian
Müller wrote:
|
[Prev in Thread] | Current Thread | [Next in Thread] |