discuss-gnuradio
[Top][All Lists]
Advanced

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

[Discuss-gnuradio] How many samples per call to work function?


From: Daniel Labarowski
Subject: [Discuss-gnuradio] How many samples per call to work function?
Date: Fri, 29 Jun 2012 16:21:01 -0400

Hello,
I am going to be making a C++ block which will either change the value of a variable (which would be passed to it by a pointer) or call the tune function of a USRP sink (passed by a pointer) after a certain number of samples have been passed to the block. This is related to my question here. In order to do this, I need to establish how often the work function is called. From my past experience writing GNURadio signal processing blocks, it looks like around 8190 samples are passed to the blocks work function each time it is called, but this tends to vary wildly. Also, I haven't tested whether this is dependent on data format of the input/output. My current plan to build the block is to increment a (local, not the on being passed) variable by noutput items each time the work function is called. Once a certain number of samples have been handled by the block, I will change the frequency. I was wondering if it is even possible to construct a block with no output or input, and if it is possible whether the work function would ever get called and whether its noutputitems (or ninputitems) would correspond to the number of samples flowing through the rest of the flowgraph? If it cant be done this way, I suppose it would be no real issue to give the block an input so that it can count ninputitems then just not do anything with the input items. Just trying to get a feel for the best way to do this and to find out, in general, how frequently the work function of the block is called and how many samples are passed with each call? Thanks!

-Dan

reply via email to

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