Re: [Discuss-gnuradio] ninput_items from demodulator

2008-02-11 Thread Johnathan Corgan
On 2/11/08, Fasika Alemayehu <[EMAIL PROTECTED]> wrote:

> I have a module to demodulate packets received from a
> file source, and it works fine. I want to have a fixed
> number of inputs (1024) coming from the demodulator.

> But the problem is that evenif i dont get less than
> 1024 items, the input varies with the differenc calls
> to the method.

As your numbers show, using forecast will ensure that the GNU Radio
scheduler calls your work function with at least that many pending
input items to process.  You may get more than than, but you don't
have to process them.   Be sure to return from the work function with
the proper exit value indicating how many samples you actually did
process.  If you are using general_work(), also be sure you are
calling the consume function properly.

-- 
Johnathan Corgan
Corgan Enterprises LLC
http://corganenterprises.com/


___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
http://lists.gnu.org/mailman/listinfo/discuss-gnuradio


[Discuss-gnuradio] ninput_items from demodulator

2008-02-11 Thread Fasika Alemayehu
Hi all,

I have a module to demodulate packets received from a
file source, and it works fine. I want to have a fixed
number of inputs (1024) coming from the demodulator.
What i did is i override the forcast method of
gr_block.
void
  usbm::forecast (int noutput_items,
  gr_vector_int
ninput_items_required)
  {
unsigned ninputs = ninput_items_required.size ();
for (unsigned i = 0; i < ninputs; i++)
  ninput_items_required[i] =1024 ;
  }

But the problem is that evenif i dont get less than
1024 items, the input varies with the differenc calls
to the method. 
Here is a sample of the input items from a demod
block.

number of items: 1027
--


number of items: 2047 
--


number of items: 1025 
--


number of items: 1024 
--


number of items: 2047 
--


number of items: 1024
--


number of items: 1026 
--


number of items: 2047 
--


number of items: 1025 
--


number of items: 2053 
--


Does this mean that the size of the output from the
demodulator block varies ? 

Fasika


  

Be a better friend, newshound, and 
know-it-all with Yahoo! Mobile.  Try it now.  
http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ 



___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
http://lists.gnu.org/mailman/listinfo/discuss-gnuradio