diff options
Diffstat (limited to 'gnuradio-runtime/include')
-rw-r--r-- | gnuradio-runtime/include/gnuradio/block_detail.h | 15 | ||||
-rw-r--r-- | gnuradio-runtime/include/gnuradio/buffer.h | 11 | ||||
-rw-r--r-- | gnuradio-runtime/include/gnuradio/constants.h | 10 | ||||
-rw-r--r-- | gnuradio-runtime/include/gnuradio/tags.h | 3 |
4 files changed, 27 insertions, 12 deletions
diff --git a/gnuradio-runtime/include/gnuradio/block_detail.h b/gnuradio-runtime/include/gnuradio/block_detail.h index 0a8615a2b6..a76874a9be 100644 --- a/gnuradio-runtime/include/gnuradio/block_detail.h +++ b/gnuradio-runtime/include/gnuradio/block_detail.h @@ -114,13 +114,14 @@ namespace gr { /*! * \brief Removes a tag from the given input stream. * - * Calls gr::buffer::remove_item_tag(), which removes the tag from - * its deque. + * Calls gr::buffer::remove_item_tag(). + * The tag in question will then no longer appear on subsequent calls of get_tags_in_range(). * * \param which_input an integer of which input stream to remove the tag from * \param tag the tag object to add + * \param id The unique block ID (use gr::block::unique_id()) */ - void remove_item_tag(unsigned int which_input, const tag_t &tag); + void remove_item_tag(unsigned int which_input, const tag_t &tag, long id); /*! * \brief Given a [start,end), returns a vector of all tags in the range. @@ -135,11 +136,13 @@ namespace gr { * \param which_input an integer of which input stream to pull from * \param abs_start a uint64 count of the start of the range of interest * \param abs_end a uint64 count of the end of the range of interest + * \param id Block ID */ void get_tags_in_range(std::vector<tag_t> &v, unsigned int which_input, uint64_t abs_start, - uint64_t abs_end); + uint64_t abs_end, + long id); /*! * \brief Given a [start,end), returns a vector of all tags in the @@ -158,12 +161,14 @@ namespace gr { * \param abs_start a uint64 count of the start of the range of interest * \param abs_end a uint64 count of the end of the range of interest * \param key a PMT symbol to select only tags of this key + * \param id Block ID */ void get_tags_in_range(std::vector<tag_t> &v, unsigned int which_input, uint64_t abs_start, uint64_t abs_end, - const pmt::pmt_t &key); + const pmt::pmt_t &key, + long id); /*! * \brief Set core affinity of block to the cores in the vector diff --git a/gnuradio-runtime/include/gnuradio/buffer.h b/gnuradio-runtime/include/gnuradio/buffer.h index 490c8e0e9f..adf00d14ac 100644 --- a/gnuradio-runtime/include/gnuradio/buffer.h +++ b/gnuradio-runtime/include/gnuradio/buffer.h @@ -108,10 +108,15 @@ namespace gr { * \brief Removes an existing tag from the buffer. * * If no such tag is found, does nothing. + * Note: Doesn't actually physically delete the tag, but + * marks it as deleted. For the user, this has the same effect: + * Any subsequent calls to get_tags_in_range() will not return + * the tag. * * \param tag the tag that needs to be removed + * \param id the unique ID of the block calling this function */ - void remove_item_tag(const tag_t &tag); + void remove_item_tag(const tag_t &tag, long id); /*! * \brief Removes all tags before \p max_time from buffer @@ -273,10 +278,12 @@ namespace gr { * \param v a vector reference to return tags into * \param abs_start a uint64 count of the start of the range of interest * \param abs_end a uint64 count of the end of the range of interest + * \param id the unique ID of the block to make sure already deleted tags are not returned */ void get_tags_in_range(std::vector<tag_t> &v, uint64_t abs_start, - uint64_t abs_end); + uint64_t abs_end, + long id); // ------------------------------------------------------------------------- diff --git a/gnuradio-runtime/include/gnuradio/constants.h b/gnuradio-runtime/include/gnuradio/constants.h index 5ae924ca0d..beba6f2745 100644 --- a/gnuradio-runtime/include/gnuradio/constants.h +++ b/gnuradio-runtime/include/gnuradio/constants.h @@ -29,27 +29,27 @@ namespace gr { /*! - * \brief return ./configure --prefix argument. Typically /usr/local + * \brief return SYSCONFDIR. Typically ${CMAKE_INSTALL_PREFIX}/etc or /etc */ GR_RUNTIME_API const std::string prefix(); /*! - * \brief return ./configure --sysconfdir argument. Typically $prefix/etc or /etc + * \brief return SYSCONFDIR. Typically ${CMAKE_INSTALL_PREFIX}/etc or /etc */ GR_RUNTIME_API const std::string sysconfdir(); /*! - * \brief return preferences file directory. Typically $sysconfdir/etc/conf.d + * \brief return preferences file directory. Typically ${SYSCONFDIR}/etc/conf.d */ GR_RUNTIME_API const std::string prefsdir(); /*! - * \brief return date/time of build, as set when 'bootstrap' is run + * \brief return date/time of build, as set when 'cmake' is run */ GR_RUNTIME_API const std::string build_date(); /*! - * \brief return version string defined in configure.ac + * \brief return version string defined by cmake (GrVersion.cmake) */ GR_RUNTIME_API const std::string version(); diff --git a/gnuradio-runtime/include/gnuradio/tags.h b/gnuradio-runtime/include/gnuradio/tags.h index 5600601741..0bd7b8537f 100644 --- a/gnuradio-runtime/include/gnuradio/tags.h +++ b/gnuradio-runtime/include/gnuradio/tags.h @@ -42,6 +42,9 @@ namespace gr { //! the source ID of \p tag (as a PMT) pmt::pmt_t srcid; + //! Used by gr_buffer to mark a tagged as deleted by a specific block. You can usually ignore this. + std::vector<long> marked_deleted; + /*! * Comparison function to test which tag, \p x or \p y, came * first in time |