GNU Radio's GFDM Package
modulator_cc_impl.h
Go to the documentation of this file.
1/* -*- c++ -*- */
2/*
3 * Copyright 2016 Andrej Rode.
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#ifndef INCLUDED_GFDM_MODULATOR_CC_IMPL_H
22#define INCLUDED_GFDM_MODULATOR_CC_IMPL_H
23
24#include <gnuradio/fft/fft.h>
25#include <gfdm/modulator_cc.h>
26#include <gnuradio/filter/firdes.h>
27#include <pmt/pmt.h>
28#include <volk/volk.h>
29#include <gfdm/gfdm_utils.h>
30
31namespace gr {
32 namespace gfdm {
33
35 {
36 private:
37 int d_ntimeslots;
38 int d_nsubcarrier;
39 int d_filter_width;
40 int d_N;
41 int d_fft_len;
42 int d_sync_fft_len;
43 std::string d_len_tag_key;
44 gr_complex* d_filter_taps;
45 fft::fft_complex *d_sc_fft;
46 gr_complex * d_sc_fft_in;
47 gr_complex * d_sc_fft_out;
48 fft::fft_complex *d_sync_ifft;
49 gr_complex * d_sync_ifft_in;
50 gr_complex * d_sync_ifft_out;
51 fft::fft_complex *d_out_ifft;
52 gr_complex * d_out_ifft_in;
53 gr_complex * d_out_ifft_out;
54
55 gr_complex* d_sc_tmp;
56 // Nothing to declare in this block.
57 void modulate_gfdm_frame(gr_complex *out, const gr_complex *in);
58
59 protected:
60 int calculate_output_stream_length(const gr_vector_int &ninput_items);
61 virtual void update_length_tags (int n_produced, int n_ports);
62
63 public:
65 int nsubcarrier,
66 int ntimeslots,
67 double filter_alpha,
68 int fft_len,
69 int sync_fft_len,
70 const std::string& len_tag_key);
72
73 // Where all the action really happens
74 int work(int noutput_items,
75 gr_vector_int &ninput_items,
76 gr_vector_const_void_star &input_items,
77 gr_vector_void_star &output_items);
78 };
79
80 } // namespace gfdm
81} // namespace gr
82
83#endif /* INCLUDED_GFDM_MODULATOR_CC_IMPL_H */
84
Definition: modulator_cc_impl.h:35
int calculate_output_stream_length(const gr_vector_int &ninput_items)
int work(int noutput_items, gr_vector_int &ninput_items, gr_vector_const_void_star &input_items, gr_vector_void_star &output_items)
modulator_cc_impl(int nsubcarrier, int ntimeslots, double filter_alpha, int fft_len, int sync_fft_len, const std::string &len_tag_key)
virtual void update_length_tags(int n_produced, int n_ports)
modulator_cc modulates an input tagged input stream with subcarrier-wise sorting according to "Genera...
Definition: modulator_cc.h:40
Definition: add_cyclic_prefix_cc.h:30