diff --git a/plugins/gr-limesdr/lib/sink_impl.cc b/plugins/gr-limesdr/lib/sink_impl.cc index d5019dcd..91f23345 100644 --- a/plugins/gr-limesdr/lib/sink_impl.cc +++ b/plugins/gr-limesdr/lib/sink_impl.cc @@ -32,6 +32,9 @@ using namespace std::literals::string_literals; namespace gr { namespace limesdr { + +static const pmt::pmt_t TX_TIME_TAG = pmt::string_to_symbol(std::string("tx_time")); + sink::sptr sink::make(std::string serial, int channel_mode, const std::string& filename, @@ -220,7 +223,7 @@ void sink_impl::work_tags(int noutput_items) // Go through the tags for (tag_t cTag : tags) { // Found tx_time tag - if (pmt::eq(cTag.key, TIME_TAG)) { + if (pmt::eq(cTag.key, TX_TIME_TAG)) { // Convert time to sample timestamp uint64_t secs = pmt::to_uint64(pmt::tuple_ref(cTag.value, 0)); double fracs = pmt::to_double(pmt::tuple_ref(cTag.value, 1)); diff --git a/plugins/gr-limesdr/lib/sink_impl.h b/plugins/gr-limesdr/lib/sink_impl.h index 1cea01ce..de0f6ab3 100644 --- a/plugins/gr-limesdr/lib/sink_impl.h +++ b/plugins/gr-limesdr/lib/sink_impl.h @@ -26,8 +26,6 @@ #include #include -static const pmt::pmt_t TIME_TAG = pmt::string_to_symbol(std::string("tx_time")); - namespace gr { namespace limesdr { class sink_impl : public sink diff --git a/plugins/gr-limesdr/lib/source_impl.cc b/plugins/gr-limesdr/lib/source_impl.cc index fc05722c..f956f73e 100644 --- a/plugins/gr-limesdr/lib/source_impl.cc +++ b/plugins/gr-limesdr/lib/source_impl.cc @@ -32,6 +32,8 @@ using namespace std::literals::string_literals; namespace gr { namespace limesdr { +static const pmt::pmt_t RX_TIME_TAG = pmt::string_to_symbol(std::string("rx_time")); + source::sptr source::make(std::string serial, int channel_mode, const std::string& filename, @@ -273,7 +275,7 @@ void source_impl::add_time_tag(int channel, lime::StreamMeta meta) const pmt::pmt_t ID = pmt::string_to_symbol(stored.serial); const pmt::pmt_t t_val = pmt::make_tuple(pmt::from_uint64(intpart), pmt::from_double(fracpart)); - add_item_tag(channel, nitems_written(channel), TIME_TAG, t_val, ID); + add_item_tag(channel, nitems_written(channel), RX_TIME_TAG, t_val, ID); } // Return io_signature to manage module output count