1
0
mirror of https://github.com/gnss-sdr/gnss-sdr synced 2025-08-09 23:43:54 +00:00

Propagate tags in sample counter

This commit is contained in:
Victor Castillo 2024-08-14 01:14:40 +02:00
parent 40070d225f
commit 197f67a737
No known key found for this signature in database
GPG Key ID: 8EF1FC8B7182F608

View File

@ -154,7 +154,15 @@ int gnss_sdr_sample_counter::work(int noutput_items __attribute__((unused)),
// *************** time tags ****************
std::vector<gr::tag_t> tags_vec;
// notice that nitems_read is updated in decimation blocks after leaving work() with return 1, equivalent to call consume_each
this->get_tags_in_range(tags_vec, 0, this->nitems_read(0), this->nitems_read(0) + samples_per_output);
this->get_tags_in_range(tags_vec, 0, this->nitems_read(0), this->nitems_read(0) + samples_per_output, pmt::mp("extra_data"));
// std::cout << "SAMPLE COUNTER (" << std::to_string(tags_vec.size()) << ")" << std::endl;
for (const auto &tag : tags_vec)
{
add_item_tag(0, this->nitems_written(0) + 1, tag.key, tag.value);
}
tags_vec.clear();
this->get_tags_in_range(tags_vec, 0, this->nitems_read(0), this->nitems_read(0) + samples_per_output, pmt::mp("timetag"));
for (const auto &it : tags_vec)
{
try