[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Discuss-gnuradio] recovering timing after overflow
From: |
Josh Blum |
Subject: |
Re: [Discuss-gnuradio] recovering timing after overflow |
Date: |
Wed, 26 Oct 2011 09:04:07 -0700 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:7.0.1) Gecko/20110929 Thunderbird/7.0.1 |
On 10/26/2011 08:23 AM, Juha Vierinen wrote:
> If I understand correctly, the sample count is:
>
> const uint64_t count = gr_tags::get_nitems(rx_time_tag);
Correct, that will work. Just so you know, the tags API changed in
master to be more object oriented, so if you are on master, its
my_tag.offset. But yes, this is the same call.
> This determines the index of the sample coming into work, which has a
> new time because of overflow.
>
The "uint64_t count" is the absolute index of the tag/timestamp. The
absolute index of a sample can be calculated as this->nitems_read(0) +
relative_offset
Where relative_offset is the offset of the sample in your input buffer
in the current call to work.
-josh