GNU Radio's IEEE802_11 Package
frame_equalizer_impl.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2016 Bastian Bloessl <bloessl@ccs-labs.org>
3 *
4 * This program is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation, either version 3 of the License, or
7 * (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program. If not, see <http://www.gnu.org/licenses/>.
16 */
17
18#ifndef INCLUDED_IEEE802_11_FRAME_EQUALIZER_IMPL_H
19#define INCLUDED_IEEE802_11_FRAME_EQUALIZER_IMPL_H
20
21#include "equalizer/base.h"
25
26namespace gr {
27namespace ieee802_11 {
28
30{
31
32public:
33 frame_equalizer_impl(Equalizer algo, double freq, double bw, bool log, bool debug);
35
37 void set_bandwidth(double bw);
38 void set_frequency(double freq);
39
40 void forecast(int noutput_items, gr_vector_int& ninput_items_required);
41 int general_work(int noutput_items,
42 gr_vector_int& ninput_items,
43 gr_vector_const_void_star& input_items,
44 gr_vector_void_star& output_items);
45
46private:
47 bool parse_signal(uint8_t* signal);
48 bool decode_signal_field(uint8_t* rx_bits);
49 void deinterleave(uint8_t* rx_bits);
50
51 equalizer::base* d_equalizer;
52 gr::thread::mutex d_mutex;
53 std::vector<gr::tag_t> tags;
54 bool d_debug;
55 bool d_log;
56 int d_current_symbol;
57 viterbi_decoder d_decoder;
58
59 // freq offset
60 double d_freq; // Hz
61 double d_freq_offset_from_synclong; // Hz, estimation from "sync_long" block
62 double d_bw; // Hz
63 double d_er;
64 double d_epsilon0;
65 gr_complex d_prev_pilots[4];
66
67 int d_frame_bytes;
68 int d_frame_symbols;
69 int d_frame_encoding;
70
71 uint8_t d_deinterleaved[48];
72 gr_complex symbols[48];
73
74 std::shared_ptr<gr::digital::constellation> d_frame_mod;
79
80 static const int interleaver_pattern[48];
81};
82
83} // namespace ieee802_11
84} // namespace gr
85
86#endif /* INCLUDED_IEEE802_11_FRAME_EQUALIZER_IMPL_H */
std::shared_ptr< gr::ieee802_11::constellation_16qam > sptr
Definition constellations.h:52
std::shared_ptr< gr::ieee802_11::constellation_64qam > sptr
Definition constellations.h:63
std::shared_ptr< gr::ieee802_11::constellation_bpsk > sptr
Definition constellations.h:30
std::shared_ptr< gr::ieee802_11::constellation_qpsk > sptr
Definition constellations.h:41
Definition equalizer/base.h:29
int general_work(int noutput_items, gr_vector_int &ninput_items, gr_vector_const_void_star &input_items, gr_vector_void_star &output_items)
void forecast(int noutput_items, gr_vector_int &ninput_items_required)
void set_algorithm(Equalizer algo)
frame_equalizer_impl(Equalizer algo, double freq, double bw, bool log, bool debug)
Definition frame_equalizer.h:38
Definition viterbi_decoder_generic.h:31
Definition chunks_to_symbols.h:24
Equalizer
Definition frame_equalizer.h:29
Definition chunks_to_symbols.h:23