GNU Radio Manual and C++ API Reference 3.7.14.0
The Free & Open Software Radio Ecosystem
burst_shaper_ff.h
Go to the documentation of this file.
1/* -*- c++ -*- */
2/*
3 * Copyright 2015 Free Software Foundation, Inc.
4 *
5 * This file is part of GNU Radio
6 *
7 * GNU Radio is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 3, or (at your option)
10 * any later version.
11 *
12 * GNU Radio is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with GNU Radio; see the file COPYING. If not, write to
19 * the Free Software Foundation, Inc., 51 Franklin Street,
20 * Boston, MA 02110-1301, USA.
21 */
22
23/* WARNING: this file is machine generated. Edits will be overwritten */
24
25#ifndef INCLUDED_DIGITAL_BURST_SHAPER_FF_H
26#define INCLUDED_DIGITAL_BURST_SHAPER_FF_H
27
29#include <gnuradio/block.h>
30
31namespace gr {
32 namespace digital {
33
34 /*!
35 * \brief Burst shaper block for applying burst padding and ramping.
36 * \ingroup packet_operators_blk
37 *
38 * \details
39 *
40 * This block applies a configurable amount of zero padding before
41 * and/or after a burst indicated by tagged stream length tags.
42 *
43 * If phasing symbols are used, an alternating pattern of +1/-1
44 * symbols of length ceil(N/2) will be inserted before and after
45 * each burst, where N is the length of the taps vector. The ramp-
46 * up/ramp-down shape will be applied to these phasing symbols.
47 *
48 * If phasing symbols are not used, the taper will be applied
49 * directly to the head and tail of each burst.
50 *
51 * Length tags will be updated to include the length of any added
52 * zero padding or phasing symbols and will be placed at the
53 * beginning of the modified tagged stream. Any other tags found at
54 * the same offset as a length tag will also be placed at the
55 * beginning of the modified tagged stream, since these tags are
56 * assumed to be associated with the burst rather than a specific
57 * sample. For example, if "tx_time" tags are used to control
58 * bursts, their offsets should be consistent with their associated
59 * burst's length tags. Tags at other offsets will be placed with
60 * the samples on which they were found.
61 *
62 * \li input: stream of float
63 * \li output: stream of float
64 */
65 class DIGITAL_API burst_shaper_ff : virtual public block
66 {
67 public:
68 // gr::digital::burst_shaper_ff::sptr
69 typedef boost::shared_ptr<burst_shaper_ff> sptr;
70
71 /*!
72 * Make a burst shaper block.
73 *
74 * \param taps: vector of window taper taps; the first ceil(N/2)
75 * items are the up flank and the last ceil(N/2)
76 * items are the down flank. If taps.size() is odd,
77 * the middle tap will be used as the last item of
78 * the up flank and first item of the down flank.
79 * \param pre_padding: number of zero samples to insert before
80 * the burst.
81 * \param post_padding: number of zero samples to append after
82 * the burst.
83 * \param insert_phasing: if true, insert alternating +1/-1
84 * pattern of length ceil(N/2) before and
85 * after the burst and apply ramp up and
86 * ramp down taps, respectively, to the
87 * inserted patterns instead of the head
88 * and tail items of the burst.
89 * \param length_tag_name: the name of the tagged stream length
90 * tag key.
91 */
92 static sptr make(const std::vector<float> &taps,
93 int pre_padding=0, int post_padding=0,
94 bool insert_phasing=false,
95 const std::string &length_tag_name="packet_len");
96
97 /*!
98 * Returns the amount of zero padding inserted before each burst.
99 */
100 virtual int pre_padding() const = 0;
101
102 /*!
103 * Returns the amount of zero padding inserted after each burst.
104 */
105 virtual int post_padding() const = 0;
106
107 /*!
108 * Returns the total amount of zero padding and phasing symbols
109 * inserted before each burst.
110 */
111 virtual int prefix_length() const = 0;
112
113 /*!
114 * Returns the total amount of zero padding and phasing symbols
115 * inserted after each burst.
116 */
117 virtual int suffix_length() const = 0;
118 };
119
120 } // namespace digital
121} // namespace gr
122
123#endif /* INCLUDED_DIGITAL_BURST_SHAPER_FF_H */
The abstract base class for all 'terminal' processing blocks.
Definition: block.h:66
Burst shaper block for applying burst padding and ramping.
Definition: burst_shaper_ff.h:66
virtual int post_padding() const =0
virtual int prefix_length() const =0
static sptr make(const std::vector< float > &taps, int pre_padding=0, int post_padding=0, bool insert_phasing=false, const std::string &length_tag_name="packet_len")
virtual int suffix_length() const =0
virtual int pre_padding() const =0
boost::shared_ptr< burst_shaper_ff > sptr
Definition: burst_shaper_ff.h:69
#define DIGITAL_API
Definition: gr-digital/include/gnuradio/digital/api.h:30
static const float taps[NSTEPS+1][NTAPS]
Definition: interpolator_taps.h:9
Include this header to use the message passing features.
Definition: basic_block.h:45