GNU Radio's GFDM Package
resource_demapper_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_RESOURCE_DEMAPPER_KERNEL_CC_H
23#define INCLUDED_GFDM_RESOURCE_DEMAPPER_KERNEL_CC_H
24
25#include <complex>
26#include <vector>
27#include <boost/shared_ptr.hpp>
28
29namespace gr {
30 namespace gfdm {
31
32 /*!
33 * \brief Demap symbols from demodulated frame.
34 *
35 */
37 {
38 public:
39 typedef std::complex<float> gfdm_complex;
40 typedef boost::shared_ptr<resource_demapper_kernel_cc> sptr;
41
42 resource_demapper_kernel_cc(int timeslots, int subcarriers, int active_subcarriers, std::vector<int> subcarrier_map, bool per_timeslot);
44
45 int input_vector_size(){ return d_subcarriers * d_timeslots;};
46 int output_vector_size(){ return d_active_subcarriers * d_timeslots;};
47 void generic_work(gfdm_complex* p_out, const gfdm_complex* p_in, const int noutput_size);
48
49 private:
50 int d_timeslots;
51 int d_subcarriers;
52 int d_active_subcarriers;
53 std::vector<int> d_subcarrier_map;
54 bool d_per_timeslot;
55
56 void demap_per_timeslot(gfdm_complex* p_out, const gfdm_complex* p_in, const int noutput_size);
57 void demap_per_subcarrier(gfdm_complex* p_out, const gfdm_complex* p_in, const int noutput_size);
58
59 };
60
61 } // namespace gfdm
62} // namespace gr
63
64#endif /* INCLUDED_GFDM_RESOURCE_DEMAPPER_KERNEL_CC_H */
65
Demap symbols from demodulated frame.
Definition resource_demapper_kernel_cc.h:37
boost::shared_ptr< resource_demapper_kernel_cc > sptr
Definition resource_demapper_kernel_cc.h:40
resource_demapper_kernel_cc(int timeslots, int subcarriers, int active_subcarriers, std::vector< int > subcarrier_map, bool per_timeslot)
void generic_work(gfdm_complex *p_out, const gfdm_complex *p_in, const int noutput_size)
int output_vector_size()
Definition resource_demapper_kernel_cc.h:46
std::complex< float > gfdm_complex
Definition resource_demapper_kernel_cc.h:39
int input_vector_size()
Definition resource_demapper_kernel_cc.h:45
Definition add_cyclic_prefix_cc.h:30