diff options
author | Martin Braun | 2013-01-07 17:10:20 +0100 |
---|---|---|
committer | Martin Braun | 2013-01-15 14:50:03 +0100 |
commit | f676197e6dd2a638f294e350654e32d3ffc45af8 (patch) | |
tree | 276a0182743ea38db16df9741dc98e06ccd4dade /gnuradio-core/src/lib/runtime/gr_block.h | |
parent | f2bf6fbb5617f0d26654821fb1eb30bc2a1c16a2 (diff) | |
download | gnuradio-f676197e6dd2a638f294e350654e32d3ffc45af8.tar.gz gnuradio-f676197e6dd2a638f294e350654e32d3ffc45af8.tar.bz2 gnuradio-f676197e6dd2a638f294e350654e32d3ffc45af8.zip |
core: added remove_tag_item()
Diffstat (limited to 'gnuradio-core/src/lib/runtime/gr_block.h')
-rw-r--r-- | gnuradio-core/src/lib/runtime/gr_block.h | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/gnuradio-core/src/lib/runtime/gr_block.h b/gnuradio-core/src/lib/runtime/gr_block.h index 57e3fda90..7a70bdaf0 100644 --- a/gnuradio-core/src/lib/runtime/gr_block.h +++ b/gnuradio-core/src/lib/runtime/gr_block.h @@ -416,6 +416,42 @@ class GR_CORE_API gr_block : public gr_basic_block { void add_item_tag(unsigned int which_output, const gr_tag_t &tag); /*! + * \brief Removes a tag from the given input buffer. + * + * \param which_input an integer of which input stream to remove the tag from + * \param abs_offset a uint64 number of the absolute item number + * assicated with the tag. Can get from nitems_written. + * \param key the tag key as a PMT symbol + * \param value any PMT holding any value for the given key + * \param srcid optional source ID specifier; defaults to PMT_F + * + * If no such tag is found, does nothing. + */ + inline void remove_item_tag(unsigned int which_input, + uint64_t abs_offset, + const pmt::pmt_t &key, + const pmt::pmt_t &value, + const pmt::pmt_t &srcid=pmt::PMT_F) + { + gr_tag_t tag; + tag.offset = abs_offset; + tag.key = key; + tag.value = value; + tag.srcid = srcid; + this->remove_item_tag(which_input, tag); + } + + /*! + * \brief Removes a tag from the given input buffer. + * + * If no such tag is found, does nothing. + * + * \param which_input an integer of which input stream to remove the tag from + * \param tag the tag object to remove + */ + void remove_item_tag(unsigned int which_input, const gr_tag_t &tag); + + /*! * \brief Given a [start,end), returns a vector of all tags in the range. * * Range of counts is from start to end-1. |