diff options
author | Tom Rondeau <trondeau@vt.edu> | 2013-03-06 22:01:23 -0500 |
---|---|---|
committer | Tom Rondeau <trondeau@vt.edu> | 2013-03-06 22:01:23 -0500 |
commit | 65700040d6b11da91e681e33f3b5368e2a294eb5 (patch) | |
tree | 1f7edf7862c6d9153745501f9702a2f046052b8c /gr-blocks/include | |
parent | 6817cb4e27511562923fb670a66c7c691cfdd0ac (diff) | |
parent | 6e5dfe1a3e2613df24fd1b47f5eb764eaf3dbd9f (diff) |
Merge branch 'master' into next
Diffstat (limited to 'gr-blocks/include')
-rw-r--r-- | gr-blocks/include/blocks/CMakeLists.txt | 1 | ||||
-rw-r--r-- | gr-blocks/include/blocks/burst_tagger.h | 74 |
2 files changed, 75 insertions, 0 deletions
diff --git a/gr-blocks/include/blocks/CMakeLists.txt b/gr-blocks/include/blocks/CMakeLists.txt index 48beaad6e9..f93c4eceb9 100644 --- a/gr-blocks/include/blocks/CMakeLists.txt +++ b/gr-blocks/include/blocks/CMakeLists.txt @@ -102,6 +102,7 @@ install(FILES count_bits.h log2_const.h add_ff.h + burst_tagger.h char_to_float.h char_to_short.h complex_to_interleaved_short.h diff --git a/gr-blocks/include/blocks/burst_tagger.h b/gr-blocks/include/blocks/burst_tagger.h new file mode 100644 index 0000000000..408405f97b --- /dev/null +++ b/gr-blocks/include/blocks/burst_tagger.h @@ -0,0 +1,74 @@ +/* -*- c++ -*- */ +/* + * Copyright 2010,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_BURST_TAGGER_H +#define INCLUDED_GR_BURST_TAGGER_H + +#include <blocks/api.h> +#include <gr_sync_block.h> + +namespace gr { + namespace blocks { + + /*! + * \brief Sets a burst on/off tag based on the value of the trigger input. + * \ingroup misc_blk + * + * This block takes two inputs, a signal stream on the input + * stream 0 and a trigger stream of shorts on input stream 1. If + * the trigger stream goes above 0, a tag with the key "burst" + * will be transmitted as a pmt::PMT_T. When the trigger signal + * falls below 0, the "burst" tag will be transmitted as + * pmt::PMT_F. + * + * The signal on stream 0 is retransmitted to output stream 0. + */ + class BLOCKS_API burst_tagger : virtual public gr_sync_block + { + public: + // gr::blocks::burst_tagger::sptr + typedef boost::shared_ptr<burst_tagger> sptr; + + /*! + * Build a burst tagger blocks. + * + * \param itemsize itemsize of the signal stream on input 0. + */ + static sptr make(size_t itemsize); + + /*! + * For the true burst tag, change the key name to \p key and a + * new value of \p value. + */ + virtual void set_true_tag(const std::string &key, bool value) = 0; + + /*! + * For the false burst tag, change the key name to \p key and a + * new value of \p value. + */ + virtual void set_false_tag(const std::string &key, bool value) = 0; + }; + + } /* namespace blocks */ +} /* namespace gr */ + +#endif /* INCLUDED_GR_BURST_TAGGER_H */ |