gr-baz Package
dc_blocker_ff_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_FF_IMPL_H
25
#define INCLUDED_FILTER_DC_BLOCKER_FF_IMPL_H
26
27
#include <
filter/dc_blocker_ff.h
>
28
#include <deque>
29
30
namespace
gr {
31
namespace
filter {
32
33
class
moving_averager_f
34
{
35
public
:
36
moving_averager_f
(
int
D);
37
~moving_averager_f
();
38
39
float
filter
(
float
x);
40
float
delayed_sig
() {
return
d_out; }
41
42
private
:
43
int
d_length;
44
float
d_out, d_out_d1, d_out_d2;
45
std::deque<float> d_delay_line;
46
};
47
48
class
FILTER_API
dc_blocker_ff_impl
:
public
dc_blocker_ff
49
{
50
private
:
51
int
d_length;
52
bool
d_long_form;
53
moving_averager_f
*d_ma_0;
54
moving_averager_f
*d_ma_1;
55
moving_averager_f
*d_ma_2;
56
moving_averager_f
*d_ma_3;
57
std::deque<float> d_delay_line;
58
59
public
:
60
dc_blocker_ff_impl
(
int
D,
bool
long_form);
61
62
~
dc_blocker_ff_impl
();
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_FF_IMPL_H */
gnuradio
gr-filter
lib
dc_blocker_ff_impl.h
Generated by
1.8.1.1