The Inspector (GNU Radio module gr-inspector)
ofdm_zkf_c_impl.h
Go to the documentation of this file.
1 /* -*- c++ -*- */
2 /*
3  * Copyright 2016 Free Software Foundation, Inc.
4  *
5  * This file is part of GNU Radio
6  *
7  * This is free software; you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License as published by
9  * the Free Software Foundation; either version 3, or (at your option)
10  * any later version.
11  *
12  * This software is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with this software; see the file COPYING. If not, write to
19  * the Free Software Foundation, Inc., 51 Franklin Street,
20  * Boston, MA 02110-1301, USA.
21  */
22 
23 #ifndef INCLUDED_INSPECTOR_OFDM_ZKF_C_IMPL_H
24 #define INCLUDED_INSPECTOR_OFDM_ZKF_C_IMPL_H
25 
26 #include <inspector/ofdm_zkf_c.h>
27 #include <gnuradio/fft/fft.h>
28 
29 namespace gr {
30  namespace inspector {
31 
32  class ofdm_zkf_c_impl : public ofdm_zkf_c
33  {
34  private:
35  double d_samp_rate;
36  unsigned int d_signal;
37  std::vector<int> d_typ_len, d_typ_cp;
38  gr_complex *d_Rxx;
39  fft::fft_complex *d_fft;
40  unsigned int d_tmpbuflen;
41  int d_min_items;
42 
43  public:
44  ofdm_zkf_c_impl(double samp_rate, int signal, int min_items,
45  const std::vector<int> &typ_len,
46  const std::vector<int> &typ_cp);
48  std::vector<float> autocorr(const gr_complex *in, int len);
49  gr_complex* tv_autocorr(const gr_complex *in, int len, int shift);
50  int round_to_list(int val, std::vector<int> *list);
51  void resize_fft(int size);
52 
53  void set_samp_rate(double d_samp_rate);
54 
55  pmt::pmt_t pack_message(float subc, float time, int fft, int cp);
56  // Where all the action really happens
57  int work(int noutput_items,
58  gr_vector_const_void_star &input_items,
59  gr_vector_void_star &output_items);
60  };
61 
62  } // namespace inspector
63 } // namespace gr
64 
65 #endif /* INCLUDED_INSPECTOR_OFDM_ZKF_C_IMPL_H */
Parameter estimation block for OFDM signals.
Definition: ofdm_zkf_c.h:46
pmt::pmt_t pack_message(float subc, float time, int fft, int cp)
ofdm_zkf_c_impl(double samp_rate, int signal, int min_items, const std::vector< int > &typ_len, const std::vector< int > &typ_cp)
gr_complex * tv_autocorr(const gr_complex *in, int len, int shift)
Definition: ofdm_bouzegzi_c.h:30
std::vector< float > autocorr(const gr_complex *in, int len)
Definition: ofdm_zkf_c_impl.h:32
int work(int noutput_items, gr_vector_const_void_star &input_items, gr_vector_void_star &output_items)
int round_to_list(int val, std::vector< int > *list)
void set_samp_rate(double d_samp_rate)