GNU Radio's GFDM Package
advanced_receiver_kernel_cc.h
Go to the documentation of this file.
1/* -*- c++ -*- */
2/*
3 * Copyright 2016 Johannes Demel.
4 *
5 * This is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 3, or (at your option)
8 * any later version.
9 *
10 * This software is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this software; see the file COPYING. If not, write to
17 * the Free Software Foundation, Inc., 51 Franklin Street,
18 * Boston, MA 02110-1301, USA.
19 */
20
21
22#ifndef INCLUDED_GFDM_ADVANCED_RECEIVER_KERNEL_CC_H
23#define INCLUDED_GFDM_ADVANCED_RECEIVER_KERNEL_CC_H
24
25#include <gfdm/api.h>
27#include <gnuradio/digital/constellation.h>
28
29namespace gr {
30 namespace gfdm {
31
32 /*!
33 * \brief Hold config and functions for advanced IC kernel.
34 *
35 */
37 {
38 public:
39 typedef boost::shared_ptr<advanced_receiver_kernel_cc> sptr;
40 advanced_receiver_kernel_cc(int timeslots, int subcarriers, int overlap,
41 std::vector<gr_complex> frequency_taps,
42 std::vector<int> subcarrier_map, int ic_iter,
43 gr::digital::constellation_sptr constellation,
44 int do_phase_compensation);
46
47 void generic_work(gr_complex *p_out, const gr_complex *p_in);
48 void generic_work_equalize(gr_complex *out, const gr_complex *in, const gr_complex* f_eq_in);
49 void set_ic(int ic_iter) { d_ic_iter = ic_iter; }
50 int get_ic(void) { return d_ic_iter; }
51 int block_size() { return d_kernel->block_size();}
52 void set_phase_compensation(int do_phase_compensation){d_do_phase_compensation = do_phase_compensation;}
53 int get_phase_compensation(){return d_do_phase_compensation;}
54
55 private:
57 std::vector<int> d_subcarrier_map;
58 int d_ic_iter;
59 gr::digital::constellation_sptr d_constellation;
60 int d_do_phase_compensation;
61
62 void map_symbols_to_constellation_points(gr_complex *p_out, const gr_complex *p_in);
63 void perform_ic_iterations(gr_complex *p_out, gr_complex *p_freq_block);
64 float calculate_phase_offset(const gr_complex *detected_symbols_buffer, const gr_complex *demod_symbols_buffer);
65
66 gr_complex *d_freq_block;
67 gr_complex *d_ic_time_buffer;
68 gr_complex *d_ic_freq_buffer;
69
70
71 };
72
73 } // namespace gfdm
74} // namespace gr
75
76#endif /* INCLUDED_GFDM_ADVANCED_RECEIVER_KERNEL_CC_H */
77
#define GFDM_API
Definition: api.h:30
Hold config and functions for advanced IC kernel.
Definition: advanced_receiver_kernel_cc.h:37
int block_size()
Definition: advanced_receiver_kernel_cc.h:51
void set_ic(int ic_iter)
Definition: advanced_receiver_kernel_cc.h:49
int get_phase_compensation()
Definition: advanced_receiver_kernel_cc.h:53
void generic_work_equalize(gr_complex *out, const gr_complex *in, const gr_complex *f_eq_in)
int get_ic(void)
Definition: advanced_receiver_kernel_cc.h:50
void set_phase_compensation(int do_phase_compensation)
Definition: advanced_receiver_kernel_cc.h:52
void generic_work(gr_complex *p_out, const gr_complex *p_in)
advanced_receiver_kernel_cc(int timeslots, int subcarriers, int overlap, std::vector< gr_complex > frequency_taps, std::vector< int > subcarrier_map, int ic_iter, gr::digital::constellation_sptr constellation, int do_phase_compensation)
boost::shared_ptr< advanced_receiver_kernel_cc > sptr
Definition: advanced_receiver_kernel_cc.h:39
boost::shared_ptr< receiver_kernel_cc > sptr
Definition: receiver_kernel_cc.h:56
Definition: add_cyclic_prefix_cc.h:30