discuss-gnuradio
[Top][All Lists]
Advanced

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

Re: [Discuss-gnuradio] questions about get_tags_in_range


From: Marcus Müller
Subject: Re: [Discuss-gnuradio] questions about get_tags_in_range
Date: Thu, 07 Aug 2014 09:47:53 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.5.0

Hi Xianda,

On 07.08.2014 08:10, xianda wrote:
> Hi all:
>         I'm reading the source code ofdm_chanest_vcvc_impl.cc.And I don't 
> know this command:
>         // Propagate tags
>         std::vector<gr::tag_t> tags;
>         get_tags_in_range(tags, 0,nitems_read(0), nitems_read(0)+framesize);
>
>        I will try my best to explain my question more clearly.
>   1. I read:
>       void ofdm_chanest_vcvc_impl::forecast (int noutput_items, gr_vector_int 
> &ninput_items_required)
>      {
>        ninput_items_required[0] = (noutput_items/d_n_data_syms) * 
> (d_n_data_syms + d_n_sync_syms);
>      }
>      And I think ninput_items_required[0] = (1/1) * (1 + 2)=3.
If you say so?! I don't know the value of any of these variables at the
time GNU Radio calls this. Usually, the scheduler doesn't ask for a
single output item, but for more, so noutput_items >> 1.
>      Then nitems_read(0)=3.Is it right?(nitems_read:Return the number of 
> items read on input stream which_input. )
Wrong, nitems_read(0) is the number of items that have been consumed by
a block up to now. "read" is past tense, here.
>   2. const int framesize = d_n_sync_syms + d_n_data_syms; 
>      Then framesize=2+1=3.
this obviously depends on what your instance uses as number of sync
symbols and data symbols.
>   3.Then get_tags_in_range(tags, 0,nitems_read(0), 
> nitems_read(0)+framesize);---->>>get_tags_in_range(tags, 0,3, 6);
>      But:
>      {0 1 2}--->>>blk--->>>{0}
>      It don't have 3 4 5 item.Can someone explain it to me?Thank you.
> Best regards,
> xd
get_tags_in_range stores the tags in the tag vector you supply as first
argument:

get_tags_in_range(tags, 0,nitems_read(0), nitems_read(0)+framesize);


The second argument is the input stream number (0), the third is the
start of the range, in this case the number of items that have already
been consumed in previous calls to work, which is the number of the
first item in the current call to work. The third argument is the end of
the range.

Hope that cleared things up a little!

Greetings,
Marcus




reply via email to

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