GNU Radio Manual and C++ API Reference 3.10.5.1
The Free & Open Software Radio Ecosystem
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 * SPDX-License-Identifier: GPL-3.0-or-later
7 *
8 */
9
10#ifndef INCLUDED_DIGITAL_OFDM_EQUALIZER_BASE_H
11#define INCLUDED_DIGITAL_OFDM_EQUALIZER_BASE_H
12
14#include <gnuradio/gr_complex.h>
15#include <gnuradio/tags.h>
16
17namespace gr {
18namespace digital {
19
20/*!
21 * \brief Base class for implementation details of frequency-domain OFDM equalizers.
22 * \ingroup ofdm_blk
23 * \ingroup equalizers_blk
24 */
26 : public std::enable_shared_from_this<ofdm_equalizer_base>
27{
28protected:
30
31public:
32 typedef std::shared_ptr<ofdm_equalizer_base> sptr;
33
34 ofdm_equalizer_base(int fft_len);
36
37 //! Reset the channel information state knowledge
38 virtual void reset() = 0;
39 //! Run the actual equalization
40 virtual void
42 int n_sym,
43 const std::vector<gr_complex>& initial_taps = std::vector<gr_complex>(),
44 const std::vector<tag_t>& tags = std::vector<tag_t>()) = 0;
45 //! Return the current channel state
46 virtual void get_channel_state(std::vector<gr_complex>& taps) = 0;
47 int fft_len() { return d_fft_len; };
48 sptr base() { return shared_from_this(); };
49};
50
51
52/* \brief Base class for implementation details of 1-dimensional OFDM FDEs which use pilot
53 * tones. \ingroup digital
54 *
55 */
57{
58protected:
59 //! If \p d_occupied_carriers[k][l] is true, symbol k, carrier l is carrying data.
60 // (this is a different format than occupied_carriers!)
61 std::vector<bool> d_occupied_carriers;
62 //! If \p d_pilot_carriers[k][l] is true, symbol k, carrier l is carrying data.
63 // (this is a different format than pilot_carriers!)
64 std::vector<std::vector<bool>> d_pilot_carriers;
65 //! If \p d_pilot_carriers[k][l] is true, d_pilot_symbols[k][l] is its tx'd value.
66 // (this is a different format than pilot_symbols!)
67 std::vector<std::vector<gr_complex>> d_pilot_symbols;
68 //! In case the frame doesn't begin with OFDM symbol 0, this is the index of the first
69 //! symbol
71 //! The current position in the set of pilot symbols
73 //! Vector of length d_fft_len saving the current channel state (on the occupied
74 //! carriers)
75 std::vector<gr_complex> d_channel_state;
76
77public:
78 typedef std::shared_ptr<ofdm_equalizer_1d_pilots> sptr;
79
81 const std::vector<std::vector<int>>& occupied_carriers,
82 const std::vector<std::vector<int>>& pilot_carriers,
83 const std::vector<std::vector<gr_complex>>& pilot_symbols,
84 int symbols_skipped,
85 bool input_is_shifted);
87
88 void reset() override;
89 void get_channel_state(std::vector<gr_complex>& taps) override;
90};
91
92} /* namespace digital */
93} /* namespace gr */
94
95#endif /* INCLUDED_DIGITAL_OFDM_EQUALIZER_BASE_H */
Definition: ofdm_equalizer_base.h:57
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:70
void reset() override
Reset the channel information state knowledge.
ofdm_equalizer_1d_pilots(int fft_len, const std::vector< std::vector< int > > &occupied_carriers, const std::vector< std::vector< int > > &pilot_carriers, const std::vector< std::vector< gr_complex > > &pilot_symbols, int symbols_skipped, bool input_is_shifted)
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:64
void get_channel_state(std::vector< gr_complex > &taps) override
Return the current channel state.
int d_pilot_carr_set
The current position in the set of pilot symbols.
Definition: ofdm_equalizer_base.h:72
std::shared_ptr< ofdm_equalizer_1d_pilots > sptr
Definition: ofdm_equalizer_base.h:78
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:75
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:61
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:67
Base class for implementation details of frequency-domain OFDM equalizers.
Definition: ofdm_equalizer_base.h:27
virtual void equalize(gr_complex *frame, int n_sym, const std::vector< gr_complex > &initial_taps=std::vector< gr_complex >(), const std::vector< tag_t > &tags=std::vector< tag_t >())=0
Run the actual equalization.
virtual void get_channel_state(std::vector< gr_complex > &taps)=0
Return the current channel state.
int fft_len()
Definition: ofdm_equalizer_base.h:47
sptr base()
Definition: ofdm_equalizer_base.h:48
int d_fft_len
Definition: ofdm_equalizer_base.h:29
std::shared_ptr< ofdm_equalizer_base > sptr
Definition: ofdm_equalizer_base.h:32
virtual void reset()=0
Reset the channel information state knowledge.
#define DIGITAL_API
Definition: gr-digital/include/gnuradio/digital/api.h:18
std::complex< float > gr_complex
Definition: gr_complex.h:15
static constexpr float taps[NSTEPS+1][NTAPS]
Definition: interpolator_taps.h:9
GNU Radio logging wrapper.
Definition: basic_block.h:29