GNU Radio's GFDM Package
preamble_generator.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
22#ifndef INCLUDED_GFDM_PREAMBLE_GENERATOR_H
23#define INCLUDED_GFDM_PREAMBLE_GENERATOR_H
24
25#include <gfdm/api.h>
26#include <gfdm/gfdm_utils.h>
27#include <gnuradio/fft/fft.h>
28#include <gnuradio/gr_complex.h>
29#include <boost/enable_shared_from_this.hpp>
30#include <volk/volk.h>
31
32namespace gr {
33 namespace gfdm {
34
35 /*!
36 * \brief <+description+>
37 *
38 */
39
40 class preamble_generator;
41 typedef boost::shared_ptr<preamble_generator> preamble_generator_sptr;
42
44 : public boost::enable_shared_from_this<preamble_generator>
45 {
46 public:
47 typedef boost::shared_ptr<preamble_generator> sptr;
48 preamble_generator(int nsubcarrier, double filter_alpha, int sync_fft_len);
50 std::vector<gr_complex> get_preamble()
51 {
52 return d_samp_preamble;
53 }
54 std::vector<gr_complex> get_symbol_seq()
55 {
56 return d_symbols;
57 }
58 preamble_generator_sptr base()
59 {
60 return shared_from_this();
61 }
63 {
64 return d_sync_fft_len;
65 }
66 static sptr make(int nsubcarrier, double filter_alpha, int sync_fft_len);
67 private:
68 std::vector<gr_complex> d_samp_preamble;
69 std::vector<gr_complex> d_symbols;
70 int d_sync_fft_len;
71
72 };
73
74 } // namespace gfdm
75} // namespace gr
76
77#endif /* INCLUDED_GFDM_PREAMBLE_GENERATOR_H */
78
#define GFDM_API
Definition: api.h:30
Definition: preamble_generator.h:45
std::vector< gr_complex > get_symbol_seq()
Definition: preamble_generator.h:54
int get_preamble_len()
Definition: preamble_generator.h:62
preamble_generator_sptr base()
Definition: preamble_generator.h:58
preamble_generator(int nsubcarrier, double filter_alpha, int sync_fft_len)
boost::shared_ptr< preamble_generator > sptr
Definition: preamble_generator.h:47
std::vector< gr_complex > get_preamble()
Definition: preamble_generator.h:50
static sptr make(int nsubcarrier, double filter_alpha, int sync_fft_len)
Definition: add_cyclic_prefix_cc.h:30