discuss-gnuradio
[Top][All Lists]
Advanced

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

Re: [Discuss-gnuradio] Integration of python's time.time() and work() ca


From: Marcus Müller
Subject: Re: [Discuss-gnuradio] Integration of python's time.time() and work() calls
Date: Fri, 29 May 2015 10:06:53 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0

Hi Anil,

On 05/29/2015 04:29 AM, Anil Kumar Yerrapragada wrote:
>>Or is there a way to make sure that the in-buffer gets updated multiple times within the same work call?

Will placing the work function inside a while 1 do the trick?
Never do that. Your job as GR user is to write the work() function. GNU Radio will call it, whenever data is available. You can't make data appear faster than it appears, and you can rely on GR to call your work() as soon as possible. Just don't worry about doing this yourself.

Write your work() function in a manner that consumes as many items as it can whenever it's called, and return exactly that number. GNU Radio will take care of the rest :)
But I guess the issue with that is, as long as data is available, the scheduler calls work function again and again anyway. 
Indeed!


I'm still a little muddled up about this. I have read a lot of the posts on the forum and the tutorials on the website as well.
GNU Radio's primary job is to keep things simple for you: it allows developers to just write their algorithms inside a work function. All they have to do is take the input they get, generate the output they want, and tell GNU Radio how much has been done.

Best regards,
Marcus

reply via email to

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