diff options
author | Sean Nowlan <sean.nowlan@gtri.gatech.edu> | 2015-04-17 12:43:11 -0400 |
---|---|---|
committer | Sean Nowlan <sean.nowlan@gtri.gatech.edu> | 2015-04-17 12:43:11 -0400 |
commit | 2e2cc50976b4669a18e61e4c3f2ec3da36bae41f (patch) | |
tree | df78bd18f6e9f7b405458d3387d20380fee3c8fb /gr-digital/include/gnuradio/digital/burst_shaper_XX.h.t | |
parent | b092142302bcf8c771ec68e61da7781eb406c86f (diff) |
digital: wip: burst shaper compiles and installs
Diffstat (limited to 'gr-digital/include/gnuradio/digital/burst_shaper_XX.h.t')
-rw-r--r-- | gr-digital/include/gnuradio/digital/burst_shaper_XX.h.t | 115 |
1 files changed, 115 insertions, 0 deletions
diff --git a/gr-digital/include/gnuradio/digital/burst_shaper_XX.h.t b/gr-digital/include/gnuradio/digital/burst_shaper_XX.h.t new file mode 100644 index 0000000000..d527428911 --- /dev/null +++ b/gr-digital/include/gnuradio/digital/burst_shaper_XX.h.t @@ -0,0 +1,115 @@ +/* -*- c++ -*- */ +/* + * Copyright 2015 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. + */ + +/* @WARNING@ */ + +#ifndef @GUARD_NAME@ +#define @GUARD_NAME@ + +#include <gnuradio/digital/api.h> +#include <gnuradio/block.h> + +namespace gr { + namespace digital { + + /*! + * \brief Burst shaper block for applying burst padding and ramping. + * \ingroup packet_operators_blk + * + * \details + * + * This block applies a configurable amount of zero padding before + * and/or after a burst indicated by tagged stream length tags. + * + * If phasing symbols are used, an alternating pattern of +1/-1 + * symbols of length ceil(N/2) will be inserted before and after + * each burst, where N is the length of the taps vector. The ramp- + * up/ramp-down shape will be applied to these phasing symbols. + * + * If phasing symbols are not used, the taper will be applied + * directly to the head and tail of each burst. + * + * Length tags will be updated to include the length of any added + * zero padding or phasing symbols. + * + * \li input: stream of @I_TYPE@ + * \li output: stream of @O_TYPE@ + */ + class DIGITAL_API @NAME@ : virtual public gr::block + { + public: + // gr::digital::@BASE_NAME@::sptr + typedef boost::shared_ptr<@BASE_NAME@> sptr; + + /*! + * Make a burst shaper block. + * + * \param taps: vector of window taper taps; the first ceil(N/2) + * items are the up flank and the last ceil(N/2) + * items are the down flank. If taps.size() is odd, + * the middle tap will be used as the last item of + * the up flank and first item of the down flank. + * \param pre_padding: number of zero samples to insert before + * the burst. + * \param post_padding: number of zero samples to append after + * the burst. + * \param insert_phasing: if true, insert alternating +1/-1 + * pattern of length ceil(N/2) before and + * after the burst and apply ramp up and + * ramp down taps, respectively, to the + * inserted patterns instead of the head + * and tail items of the burst. + * \param length_tag_name: the name of the tagged stream length + * tag key. + */ + static sptr make(const std::vector<@I_TYPE@> &taps, + int pre_padding=0, int post_padding=0, + bool insert_phasing=false, + const std::string &length_tag_name="packet_len"); + + /*! + * Returns the amount of zero padding inserted before each burst. + */ + virtual unsigned int pre_padding() const = 0; + + /*! + * Returns the amount of zero padding inserted after each burst. + */ + virtual unsigned int post_padding() const = 0; + + /*! + * Returns the total amount of zero padding and phasing symbols + * inserted before each burst. + */ + virtual unsigned int prefix_length() const = 0; + + /*! + * Returns the total amount of zero padding and phasing symbols + * inserted after each burst. + */ + virtual unsigned int suffix_length() const = 0; + }; + + } // namespace digital +} // namespace gr + +#endif /* @GUARD_NAME@ */ |