discuss-gnuradio
[Top][All Lists]
Advanced

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

Re: [Discuss-gnuradio] gr_delay


From: Marcus D. Leech
Subject: Re: [Discuss-gnuradio] gr_delay
Date: Wed, 02 Nov 2011 20:19:39 -0400
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.23) Gecko/20110928 Fedora/3.1.15-1.fc14 Thunderbird/3.1.15

On 11/02/2011 08:03 PM, Johnathan Corgan wrote:
On Wed, Nov 2, 2011 at 16:43, Marcus D. Leech <address@hidden> wrote:

To be clear, the problem appears to be with the block itself.   GRC correctly adds the "set_delay" callback spooge.

But calling that callback in the C++ code doesn't appear to affect the delay.

Changing the delay via the callback changes the history requirements of the block, which will not take effect until the thread executing the work() function returns, and could be hundreds or thousands of items in the future.  But it does take effect eventually.

One way to change this behavior would be to implement the pattern used in the FIR blocks for when the number of taps changes.  Changing the delay would set a flag that the work function could check for and return immediately.  However, this wold come a high price, as the work() function currently uses memcpy to move data from the input to the output, and instead you'd have to have an iterative loop with a conditional equality check in the middle.

Johnathan
Your assertion that "it does take effect eventually" appears to not be true in reality (at least in this little test graph) (attached).

Looking at the code, there's an inline function, set_delay, that calls set_history().  And the SWIG goop appears to be correct.


-- 
Marcus Leech
Principal Investigator
Shirleys Bay Radio Astronomy Consortium
http://www.sbrac.org

Attachment: delay_test.grc
Description: application/gnuradio-grc

Attachment: delay_test.py
Description: Text Data


reply via email to

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