The Inspector (GNU Radio module gr-inspector)
ofdm_zkf_c_impl.h
Go to the documentation of this file.
1 /* -*- c++ -*- */
2 /*
3  * Copyright 2019 Free Software Foundation, Inc..
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_INSPECTOR_OFDM_ZKF_C_IMPL_H
22 #define INCLUDED_INSPECTOR_OFDM_ZKF_C_IMPL_H
23 
24 #include <gnuradio/fft/fft.h>
25 #include <inspector/ofdm_zkf_c.h>
26 
27 namespace gr {
28 namespace inspector {
29 
31 {
32 private:
33  double d_samp_rate;
34  unsigned int d_signal;
35  std::vector<int> d_typ_len, d_typ_cp;
36  gr_complex* d_Rxx;
37  fft::fft_complex* d_fft;
38  unsigned int d_tmpbuflen;
39  int d_min_items;
40 
41 public:
42  ofdm_zkf_c_impl(double samp_rate,
43  int signal,
44  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 
57  // Where all the action really happens
58  int work(int noutput_items,
59  gr_vector_const_void_star& input_items,
60  gr_vector_void_star& output_items);
61 };
62 
63 } // namespace inspector
64 } // namespace gr
65 
66 #endif /* INCLUDED_INSPECTOR_OFDM_ZKF_C_IMPL_H */
Parameter estimation block for OFDM signals.
Definition: ofdm_zkf_c.h:44
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: inspector_form.h:40
std::vector< float > autocorr(const gr_complex *in, int len)
Definition: ofdm_zkf_c_impl.h:30
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)