GNU Radio 3.6.3 C++ API
dc_blocker_cc_impl.h
Go to the documentation of this file.
1 /* -*- c++ -*- */
2 /*
3  * Copyright 2011,2012 Free Software Foundation, Inc.
4  *
5  * This file is part of GNU Radio
6  *
7  * GNU Radio 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  * GNU Radio 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 GNU Radio; 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 
24 #ifndef INCLUDED_FILTER_DC_BLOCKER_CC_IMPL_H
25 #define INCLUDED_FILTER_DC_BLOCKER_CC_IMPL_H
26 
27 #include <filter/dc_blocker_cc.h>
28 #include <deque>
29 
30 namespace gr {
31  namespace filter {
32 
34  {
35  public:
36  moving_averager_c(int D);
38 
40  gr_complex delayed_sig() { return d_out; }
41 
42  private:
43  int d_length;
44  gr_complex d_out, d_out_d1, d_out_d2;
45  std::deque<gr_complex> d_delay_line;
46  };
47 
49  {
50  private:
51  int d_length;
52  bool d_long_form;
53  moving_averager_c *d_ma_0;
54  moving_averager_c *d_ma_1;
55  moving_averager_c *d_ma_2;
56  moving_averager_c *d_ma_3;
57  std::deque<gr_complex> d_delay_line;
58 
59  public:
60  dc_blocker_cc_impl(int D, bool long_form);
61 
63 
64  int group_delay();
65 
66  //int set_length(int D);
67 
68  int work(int noutput_items,
69  gr_vector_const_void_star &input_items,
70  gr_vector_void_star &output_items);
71  };
72 
73  } /* namespace filter */
74 } /* namespace gr */
75 
76 #endif /* INCLUDED_FILTER_DC_BLOCKER_CC_IMPL_H */