diff options
author | Josh Blum <josh@joshknows.com> | 2011-10-19 13:35:46 -0700 |
---|---|---|
committer | Josh Blum <josh@joshknows.com> | 2011-10-19 17:01:35 -0700 |
commit | c1721c76bd67962a1d29e520dfea0789a14d0aa9 (patch) | |
tree | 91c77601cc6bd32d508e7f85c122395cb469d64a /gr-uhd/examples | |
parent | 97be31ab2bc2ce5cca1dd48568c5387f9af423f0 (diff) |
tags: made tags object oriented
Diffstat (limited to 'gr-uhd/examples')
-rw-r--r-- | gr-uhd/examples/tag_sink_demo.h | 9 | ||||
-rw-r--r-- | gr-uhd/examples/tag_source_demo.h | 1 |
2 files changed, 4 insertions, 6 deletions
diff --git a/gr-uhd/examples/tag_sink_demo.h b/gr-uhd/examples/tag_sink_demo.h index 84baf0a9ce..524f0ae0f9 100644 --- a/gr-uhd/examples/tag_sink_demo.h +++ b/gr-uhd/examples/tag_sink_demo.h @@ -21,7 +21,6 @@ #include <gr_sync_block.h> #include <gr_io_signature.h> -#include <gr_tag_info.h> #include <boost/foreach.hpp> #include <boost/format.hpp> #include <iostream> @@ -47,13 +46,13 @@ public: ){ //grab all "rx time" tags in this work call const uint64_t samp0_count = this->nitems_read(0); - std::vector<pmt::pmt_t> rx_time_tags; + std::vector<gr_tag_t> rx_time_tags; get_tags_in_range(rx_time_tags, 0, samp0_count, samp0_count + ninput_items, pmt::pmt_string_to_symbol("rx_time")); //print all tags - BOOST_FOREACH(const pmt::pmt_t &rx_time_tag, rx_time_tags){ - const uint64_t count = gr_tags::get_nitems(rx_time_tag); - const pmt::pmt_t &value = gr_tags::get_value(rx_time_tag); + BOOST_FOREACH(const gr_tag_t &rx_time_tag, rx_time_tags){ + const uint64_t count = rx_time_tag.offset; + const pmt::pmt_t &value = rx_time_tag.value; std::cout << boost::format("Full seconds %u, Frac seconds %f") % pmt::pmt_to_uint64(pmt_tuple_ref(value, 0)) diff --git a/gr-uhd/examples/tag_source_demo.h b/gr-uhd/examples/tag_source_demo.h index c7c0884d36..a995762f79 100644 --- a/gr-uhd/examples/tag_source_demo.h +++ b/gr-uhd/examples/tag_source_demo.h @@ -21,7 +21,6 @@ #include <gr_sync_block.h> #include <gr_io_signature.h> -#include <gr_tag_info.h> #include <boost/foreach.hpp> #include <boost/format.hpp> #include <iostream> |