GNU Radio's GFDM Package
simple_preamble_sync_cc_impl.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#ifndef INCLUDED_GFDM_SIMPLE_PREAMBLE_SYNC_CC_IMPL_H
22#define INCLUDED_GFDM_SIMPLE_PREAMBLE_SYNC_CC_IMPL_H
23
26
27namespace gr {
28 namespace gfdm {
29
31 {
32 private:
33 int d_frame_len;
34 pmt::pmt_t d_tag_in_key;
35 pmt::pmt_t d_tag_out_key;
36 pmt::pmt_t d_tag_srcid;
37 pmt::pmt_t d_tag_value;
39
40 pmt::pmt_t d_cfo_port_id;
41
42 bool d_correct_cfo;
43
44 int d_remaining_items;
45
46 int get_offset_from_tag(const gr::tag_t& t);
47 int get_window_size_from_tag(const gr::tag_t& t);
48 void remove_cfo(gr_complex* p_out, const gr_complex* p_in, const float cfo, const float init_phase, const int ninput_size);
49
50 void publish_cfo(const float cfo);
51
52 public:
53 simple_preamble_sync_cc_impl(int frame_len, int subcarriers, int cp_len, std::vector<gr_complex> preamble, const std::string& in_key, const std::string& out_key);
55
56 // Where all the action really happens
57 void forecast (int noutput_items, gr_vector_int &ninput_items_required);
58
59 int general_work(int noutput_items,
60 gr_vector_int &ninput_items,
61 gr_vector_const_void_star &input_items,
62 gr_vector_void_star &output_items);
63 };
64
65 } // namespace gfdm
66} // namespace gr
67
68#endif /* INCLUDED_GFDM_SIMPLE_PREAMBLE_SYNC_CC_IMPL_H */
69
boost::shared_ptr< auto_cross_corr_multicarrier_sync_cc > sptr
Definition auto_cross_corr_multicarrier_sync_cc.h:44
Definition simple_preamble_sync_cc_impl.h:31
int general_work(int noutput_items, gr_vector_int &ninput_items, gr_vector_const_void_star &input_items, gr_vector_void_star &output_items)
void forecast(int noutput_items, gr_vector_int &ninput_items_required)
simple_preamble_sync_cc_impl(int frame_len, int subcarriers, int cp_len, std::vector< gr_complex > preamble, const std::string &in_key, const std::string &out_key)
Synchronizes GFDM frame to known preamble.
Definition simple_preamble_sync_cc.h:37
Definition add_cyclic_prefix_cc.h:30