GNU Radio Manual and C++ API Reference  3.7.4
The Free & Open Software Radio Ecosystem
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
ofdm_equalizer_base.h
Go to the documentation of this file.
1 /* -*- c++ -*- */
2 /* Copyright 2012 Free Software Foundation, Inc.
3  *
4  * This file is part of GNU Radio
5  *
6  * GNU Radio is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; either version 3, or (at your option)
9  * any later version.
10  *
11  * GNU Radio is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with GNU Radio; see the file COPYING. If not, write to
18  * the Free Software Foundation, Inc., 51 Franklin Street,
19  * Boston, MA 02110-1301, USA.
20  */
21 
22 #ifndef INCLUDED_DIGITAL_OFDM_EQUALIZER_BASE_H
23 #define INCLUDED_DIGITAL_OFDM_EQUALIZER_BASE_H
24 
25 #include <gnuradio/digital/api.h>
26 #include <gnuradio/tags.h>
27 #include <gnuradio/gr_complex.h>
28 #include <boost/enable_shared_from_this.hpp>
29 
30 namespace gr {
31  namespace digital {
32 
33  /* \brief Base class for implementation details of frequency-domain OFDM equalizers.
34  * \ingroup ofdm_blk
35  * \ingroup equalizers_blk
36  */
38  : public boost::enable_shared_from_this<ofdm_equalizer_base>
39  {
40  protected:
41  int d_fft_len;
42 
43  public:
45 
46  ofdm_equalizer_base(int fft_len);
47  virtual ~ofdm_equalizer_base();
48 
49  //! Reset the channel information state knowledge
50  virtual void reset() = 0;
51  //! Run the actual equalization
52  virtual void equalize(
53  gr_complex *frame,
54  int n_sym,
55  const std::vector<gr_complex> &initial_taps = std::vector<gr_complex>(),
56  const std::vector<tag_t> &tags = std::vector<tag_t>()) = 0;
57  //! Return the current channel state
58  virtual void get_channel_state(std::vector<gr_complex> &taps) = 0;
59  int fft_len() { return d_fft_len; };
60  sptr base() { return shared_from_this(); };
61  };
62 
63 
64  /* \brief Base class for implementation details of 1-dimensional OFDM FDEs which use pilot tones.
65  * \ingroup digital
66  *
67  */
69  {
70  protected:
71  //! If \p d_occupied_carriers[k][l] is true, symbol k, carrier l is carrying data.
72  // (this is a different format than occupied_carriers!)
73  std::vector<bool> d_occupied_carriers;
74  //! If \p d_pilot_carriers[k][l] is true, symbol k, carrier l is carrying data.
75  // (this is a different format than pilot_carriers!)
76  std::vector<std::vector<bool> > d_pilot_carriers;
77  //! If \p d_pilot_carriers[k][l] is true, d_pilot_symbols[k][l] is its tx'd value.
78  // (this is a different format than pilot_symbols!)
79  std::vector<std::vector<gr_complex> > d_pilot_symbols;
80  //! In case the frame doesn't begin with OFDM symbol 0, this is the index of the first symbol
82  //! The current position in the set of pilot symbols
84  //! Vector of length d_fft_len saving the current channel state (on the occupied carriers)
85  std::vector<gr_complex> d_channel_state;
86 
87  public:
89 
91  int fft_len,
92  const std::vector<std::vector<int> > &occupied_carriers,
93  const std::vector<std::vector<int> > &pilot_carriers,
94  const std::vector<std::vector<gr_complex> > &pilot_symbols,
95  int symbols_skipped,
96  bool input_is_shifted);
98 
99  void reset();
100  void get_channel_state(std::vector<gr_complex> &taps);
101  };
102 
103  } /* namespace digital */
104 } /* namespace gr */
105 
106 #endif /* INCLUDED_DIGITAL_OFDM_EQUALIZER_BASE_H */
107 
std::vector< gr_complex > d_channel_state
Vector of length d_fft_len saving the current channel state (on the occupied carriers) ...
Definition: ofdm_equalizer_base.h:85
std::vector< std::vector< bool > > d_pilot_carriers
If d_pilot_carriers[k][l] is true, symbol k, carrier l is carrying data.
Definition: ofdm_equalizer_base.h:76
#define DIGITAL_API
Definition: gr-digital/include/gnuradio/digital/api.h:30
std::vector< bool > d_occupied_carriers
If d_occupied_carriers[k][l] is true, symbol k, carrier l is carrying data.
Definition: ofdm_equalizer_base.h:73
shared_ptr documentation stub
Definition: shared_ptr_docstub.h:15
std::vector< std::vector< gr_complex > > d_pilot_symbols
If d_pilot_carriers[k][l] is true, d_pilot_symbols[k][l] is its tx'd value.
Definition: ofdm_equalizer_base.h:79
int d_pilot_carr_set
The current position in the set of pilot symbols.
Definition: ofdm_equalizer_base.h:83
std::complex< float > gr_complex
Definition: gr_complex.h:27
boost::shared_ptr< ofdm_equalizer_base > sptr
Definition: ofdm_equalizer_base.h:44
boost::shared_ptr< ofdm_equalizer_1d_pilots > sptr
Definition: ofdm_equalizer_base.h:88
sptr base()
Definition: ofdm_equalizer_base.h:60
static const float taps[NSTEPS+1][NTAPS]
Definition: interpolator_taps.h:9
Definition: ofdm_equalizer_base.h:37
Definition: ofdm_equalizer_base.h:68
int fft_len()
Definition: ofdm_equalizer_base.h:59
int d_symbols_skipped
In case the frame doesn't begin with OFDM symbol 0, this is the index of the first symbol...
Definition: ofdm_equalizer_base.h:81
int d_fft_len
Definition: ofdm_equalizer_base.h:41