Statistics
| Branch: | Tag: | Revision:

root / gnuradio-core / src / lib / general / gri_agc2_cc.i @ d516a6c2

History | View | Annotate | Download (1.4 kB)

1 5d69a524 jcorgan
/* -*- c++ -*- */
2 5d69a524 jcorgan
/*
3 f1c41f80 eb
 * Copyright 2006 Free Software Foundation, Inc.
4 f919f9dc Tom Rondeau
 *
5 5d69a524 jcorgan
 * This file is part of GNU Radio
6 f919f9dc Tom Rondeau
 *
7 5d69a524 jcorgan
 * GNU Radio is free software; you can redistribute it and/or modify
8 5d69a524 jcorgan
 * it under the terms of the GNU General Public License as published by
9 937b719d eb
 * the Free Software Foundation; either version 3, or (at your option)
10 5d69a524 jcorgan
 * any later version.
11 f919f9dc Tom Rondeau
 *
12 5d69a524 jcorgan
 * GNU Radio is distributed in the hope that it will be useful,
13 5d69a524 jcorgan
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 5d69a524 jcorgan
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15 5d69a524 jcorgan
 * GNU General Public License for more details.
16 f919f9dc Tom Rondeau
 *
17 5d69a524 jcorgan
 * You should have received a copy of the GNU General Public License
18 5d69a524 jcorgan
 * along with GNU Radio; see the file COPYING.  If not, write to
19 86f5c924 eb
 * the Free Software Foundation, Inc., 51 Franklin Street,
20 86f5c924 eb
 * Boston, MA 02110-1301, USA.
21 5d69a524 jcorgan
 */
22 5d69a524 jcorgan
23 5d69a524 jcorgan
#include <math.h>
24 5d69a524 jcorgan
25 5d69a524 jcorgan
/*!
26 f1c41f80 eb
 * \brief high performance Automatic Gain Control class with attack and decay rates
27 5d69a524 jcorgan
 *
28 f1c41f80 eb
 * For Power the absolute value of the complex number is used.
29 5d69a524 jcorgan
 */
30 5d69a524 jcorgan
31 5d69a524 jcorgan
32 f1c41f80 eb
class gri_agc2_cc {
33 5d69a524 jcorgan
34 5d69a524 jcorgan
 public:
35 f919f9dc Tom Rondeau
  gri_agc2_cc (float attack_rate = 1e-1, float decay_rate = 1e-2, float reference = 1.0,
36 f1c41f80 eb
	       float gain = 1.0, float max_gain = 0.0);
37 f1c41f80 eb
  float decay_rate ();
38 f1c41f80 eb
  float attack_rate ();
39 f1c41f80 eb
  float reference ();
40 f1c41f80 eb
  float gain ();
41 f1c41f80 eb
  float max_gain ();
42 f7a2b8b0 Alexandru Csete
  void set_decay_rate (float rate);
43 f7a2b8b0 Alexandru Csete
  void set_attack_rate (float rate);
44 f7a2b8b0 Alexandru Csete
  void set_reference (float reference);
45 f7a2b8b0 Alexandru Csete
  void set_gain (float gain);
46 f7a2b8b0 Alexandru Csete
  void set_max_gain(float max_gain);
47 5d69a524 jcorgan
  };