|
From: | Marcus Müller |
Subject: | Re: [Discuss-gnuradio] [USRP-users] count number of times that a block runs in gnuradio |
Date: | Wed, 25 Mar 2015 17:16:47 +0100 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 |
Hi Luis, that is a very GNU Radio-centric question; hence, I've taken the freedom to include the discuss-gnuradio mailing list. I'd recommend signing up [1] for that, and discussing further things on there. Generally, you should easily be able to integrate that functionality into any block, by altering its work function. I recommend getting to know GNU Radio programming by following GNU Radio's guided tutorials [2]. In essence, every block is a class in C++ or python, and can hold state (such as count of times the work function was called with input) internally. Please be aware, though, that this is not how GNU Radio is supposed to be used: The scheduler will offer you how many items (samples) are ready for input, and will allow you to produce as many as there is space to do so. If you need constant workload size, I'd recommend using set_output_multiple [3] and a sync block[4]. Best regards, Marcus [1] https://lists.gnu.org/mailman/listinfo/discuss-gnuradio [2] https://gnuradio.org/redmine/projects/gnuradio/wiki/Guided_Tutorials [3] http://gnuradio.org/doc/doxygen/classgr_1_1block.html#a63d67fd758b70c6f2d7b7d4edcec53b3 [4] https://gnuradio.org/redmine/projects/gnuradio/wiki/Guided_Tutorial_GNU_Radio_in_Python#331-Choosing-a-Block-Type On 03/25/2015 10:00 AM, Luis urday via
USRP-users wrote:
|
[Prev in Thread] | Current Thread | [Next in Thread] |