diff options
author | Tom Rondeau <trondeau@vt.edu> | 2013-03-06 17:18:37 -0500 |
---|---|---|
committer | Tom Rondeau <trondeau@vt.edu> | 2013-03-06 17:18:37 -0500 |
commit | 5c18bac20fcbdee03c332e29a676ea8f1481b5ea (patch) | |
tree | 7988441a1b098d336314bdc8e74979553c7d2d53 /gr-blocks/include | |
parent | 9ac143a654bc581d9a74363fc02e1ad30be93138 (diff) | |
parent | 64d8f82c531a477262304bf93b98c2de4eb83d35 (diff) |
Merge branch 'master' into next
Conflicts:
gr-digital/include/digital_constellation.h
gr-digital/lib/digital_constellation.cc
gr-digital/python/qa_constellation.py
gr-digital/python/qa_constellation_receiver.py
gr-digital/python/qam.py
gr-digital/swig/digital_constellation.i
Diffstat (limited to 'gr-blocks/include')
-rw-r--r-- | gr-blocks/include/blocks/CMakeLists.txt | 1 | ||||
-rw-r--r-- | gr-blocks/include/blocks/tag_debug.h | 80 |
2 files changed, 81 insertions, 0 deletions
diff --git a/gr-blocks/include/blocks/CMakeLists.txt b/gr-blocks/include/blocks/CMakeLists.txt index 0da7a0e569..48beaad6e9 100644 --- a/gr-blocks/include/blocks/CMakeLists.txt +++ b/gr-blocks/include/blocks/CMakeLists.txt @@ -157,6 +157,7 @@ install(FILES streams_to_stream.h streams_to_vector.h stretch_ff.h + tag_debug.h tagged_stream_to_pdu.h threshold_ff.h throttle.h diff --git a/gr-blocks/include/blocks/tag_debug.h b/gr-blocks/include/blocks/tag_debug.h new file mode 100644 index 0000000000..9d27a26ecd --- /dev/null +++ b/gr-blocks/include/blocks/tag_debug.h @@ -0,0 +1,80 @@ +/* -*- c++ -*- */ +/* + * Copyright 2012-2013 Free Software Foundation, Inc. + * + * This file is part of GNU Radio + * + * GNU Radio is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3, or (at your option) + * any later version. + * + * GNU Radio is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with GNU Radio; see the file COPYING. If not, write to + * the Free Software Foundation, Inc., 51 Franklin Street, + * Boston, MA 02110-1301, USA. + */ + +#ifndef INCLUDED_GR_TAG_DEBUG_H +#define INCLUDED_GR_TAG_DEBUG_H + +#include <blocks/api.h> +#include <gr_sync_block.h> + +namespace gr { + namespace blocks { + + /*! + * \brief Bit bucket that prints out any tag received. + * \ingroup sink_blk + * + * This block collects all tags sent to it on all input ports and + * displays them to stdout in a formatted way. The \p name + * parameter is used to identify which debug sink generated the + * tag, so when connecting a block to this debug sink, an + * appropriate name is something that identifies the input block. + * + * This block otherwise acts as a NULL sink in that items from the + * input stream are ignored. It is designed to be able to attach + * to any block and watch all tags streaming out of that block for + * debugging purposes. + * + * The tags from the last call to this work function are stored + * and can be retrieved using the function 'current_tags'. + */ + class BLOCKS_API tag_debug : virtual public gr_sync_block + { + public: + // gr::blocks::tag_debug::sptr + typedef boost::shared_ptr<tag_debug> sptr; + + /*! + * Build a tag debug block + * + * \param sizeof_stream_item size of the items in the incoming stream. + * \param name name to identify which debug sink generated the info. + */ + static sptr make(size_t sizeof_stream_item, + const std::string &name); + + /*! + * \brief Returns a vector of gr_tag_t items as of the last call to + * work. + */ + virtual std::vector<gr_tag_t> current_tags() = 0; + + /*! + * \brief Set the display of tags to stdout on/off. + */ + virtual void set_display(bool d) = 0; + }; + + } /* namespace blocks */ +} /* namespace gr */ + +#endif /* INCLUDED_GR_TAG_DEBUG_H */ |