GNU Radio's GFDM Package
resource_mapper_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_MAPPER_KERNEL_CC_H
23#define INCLUDED_GFDM_RESOURCE_MAPPER_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 map complex information symbols to GFDM resource grid.
34 * Input is a vector with all complex information symbols for one GFDM frame.
35 * Result is a vector which is fed to gfdm_modulator.
36 *
37 */
39 {
40 public:
41 typedef std::complex<float> gfdm_complex;
42 typedef boost::shared_ptr<resource_mapper_kernel_cc> sptr;
43
44 resource_mapper_kernel_cc(int timeslots, int subcarriers, int active_subcarriers, std::vector<int> subcarrier_map, bool per_timeslot = true);
46 int input_vector_size(){ return d_active_subcarriers * d_timeslots;};
47 int output_vector_size(){ return d_subcarriers * d_timeslots;};
48 void generic_work(gfdm_complex* p_out, const gfdm_complex* p_in, const int ninput_size);
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 map_per_timeslot(gfdm_complex* p_out, const gfdm_complex* p_in, const int ninput_size);
57 void map_per_subcarrier(gfdm_complex* p_out, const gfdm_complex* p_in, const int ninput_size);
58 };
59
60 } // namespace gfdm
61} // namespace gr
62
63#endif /* INCLUDED_GFDM_RESOURCE_MAPPER_KERNEL_CC_H */
64
map complex information symbols to GFDM resource grid. Input is a vector with all complex information...
Definition: resource_mapper_kernel_cc.h:39
void generic_work(gfdm_complex *p_out, const gfdm_complex *p_in, const int ninput_size)
std::complex< float > gfdm_complex
Definition: resource_mapper_kernel_cc.h:41
int input_vector_size()
Definition: resource_mapper_kernel_cc.h:46
int output_vector_size()
Definition: resource_mapper_kernel_cc.h:47
resource_mapper_kernel_cc(int timeslots, int subcarriers, int active_subcarriers, std::vector< int > subcarrier_map, bool per_timeslot=true)
boost::shared_ptr< resource_mapper_kernel_cc > sptr
Definition: resource_mapper_kernel_cc.h:42
Definition: add_cyclic_prefix_cc.h:30