advanced_receiver_kernel_cc.h
Go to the documentation of this file.
/* -*- c++ -*- */
/*
* Copyright 2016 Johannes Demel.
*
* This is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3, or (at your option)
* any later version.
*
* This software is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this software; see the file COPYING. If not, write to
* the Free Software Foundation, Inc., 51 Franklin Street,
* Boston, MA 02110-1301, USA.
*/
#ifndef INCLUDED_GFDM_ADVANCED_RECEIVER_KERNEL_CC_H
#define INCLUDED_GFDM_ADVANCED_RECEIVER_KERNEL_CC_H
#include <gfdm/api.h>
#include <gfdm/receiver_kernel_cc.h>
#include <gnuradio/digital/constellation.h>
namespace gr {
namespace gfdm {
/*!
* \brief Hold config and functions for advanced IC kernel.
*
*/
class GFDM_API advanced_receiver_kernel_cc
{
public:
typedef boost::shared_ptr<advanced_receiver_kernel_cc> sptr;
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);
~advanced_receiver_kernel_cc();
void generic_work(gr_complex *p_out, const gr_complex *p_in);
void generic_work_equalize(gr_complex *out, const gr_complex *in, const gr_complex* f_eq_in);
void set_ic(int ic_iter) { d_ic_iter = ic_iter; }
int get_ic(void) { return d_ic_iter; }
int block_size() { return d_kernel->block_size();}
void set_phase_compensation(int do_phase_compensation){d_do_phase_compensation = do_phase_compensation;}
int get_phase_compensation(){return d_do_phase_compensation;}
private:
receiver_kernel_cc::sptr d_kernel;
std::vector<int> d_subcarrier_map;
int d_ic_iter;
gr::digital::constellation_sptr d_constellation;
int d_do_phase_compensation;
void map_symbols_to_constellation_points(gr_complex *p_out, const gr_complex *p_in);
void perform_ic_iterations(gr_complex *p_out, gr_complex *p_freq_block);
float calculate_phase_offset(const gr_complex *detected_symbols_buffer, const gr_complex *demod_symbols_buffer);
gr_complex *d_freq_block;
gr_complex *d_ic_time_buffer;
gr_complex *d_ic_freq_buffer;
};
} // namespace gfdm
} // namespace gr
#endif /* INCLUDED_GFDM_ADVANCED_RECEIVER_KERNEL_CC_H */
api.h
GFDM_API
#define GFDM_API
Definition api.h:30
gr::gfdm::advanced_receiver_kernel_cc
Hold config and functions for advanced IC kernel.
Definition advanced_receiver_kernel_cc.h:37
gr::gfdm::advanced_receiver_kernel_cc::block_size
int block_size()
Definition advanced_receiver_kernel_cc.h:51
gr::gfdm::advanced_receiver_kernel_cc::~advanced_receiver_kernel_cc
~advanced_receiver_kernel_cc()
gr::gfdm::advanced_receiver_kernel_cc::set_ic
void set_ic(int ic_iter)
Definition advanced_receiver_kernel_cc.h:49
gr::gfdm::advanced_receiver_kernel_cc::get_phase_compensation
int get_phase_compensation()
Definition advanced_receiver_kernel_cc.h:53
gr::gfdm::advanced_receiver_kernel_cc::generic_work_equalize
void generic_work_equalize(gr_complex *out, const gr_complex *in, const gr_complex *f_eq_in)
gr::gfdm::advanced_receiver_kernel_cc::get_ic
int get_ic(void)
Definition advanced_receiver_kernel_cc.h:50
gr::gfdm::advanced_receiver_kernel_cc::set_phase_compensation
void set_phase_compensation(int do_phase_compensation)
Definition advanced_receiver_kernel_cc.h:52
gr::gfdm::advanced_receiver_kernel_cc::generic_work
void generic_work(gr_complex *p_out, const gr_complex *p_in)
gr::gfdm::advanced_receiver_kernel_cc::advanced_receiver_kernel_cc
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)
gr::gfdm::advanced_receiver_kernel_cc::sptr
boost::shared_ptr< advanced_receiver_kernel_cc > sptr
Definition advanced_receiver_kernel_cc.h:39
gr::gfdm::receiver_kernel_cc::sptr
boost::shared_ptr< receiver_kernel_cc > sptr
Definition receiver_kernel_cc.h:56
gr
Definition add_cyclic_prefix_cc.h:30
receiver_kernel_cc.h