GNU Radio Manual and C++ API Reference  3.7.9.2
The Free & Open Software Radio Ecosystem
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
agc3_cc.h
Go to the documentation of this file.
1 /* -*- c++ -*- */
2 /*
3  * Copyright 2006,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 #ifndef INCLUDED_ANALOG_AGC3_CC_H
24 #define INCLUDED_ANALOG_AGC3_CC_H
25 
26 #include <gnuradio/analog/api.h>
27 #include <gnuradio/sync_block.h>
28 
29 namespace gr {
30  namespace analog {
31 
32  /*!
33  * \brief high performance Automatic Gain Control class with
34  * attack and decay rates.
35  * \ingroup level_controllers_blk
36  *
37  * \details
38  * Unlike the AGC2 loop, this uses an initial linear calculation
39  * at the beginning for very fast initial acquisition. Moves to
40  * IIR model for tracking purposes.
41  *
42  * For Power the absolute value of the complex number is used.
43  */
44  class ANALOG_API agc3_cc : virtual public sync_block
45  {
46  public:
47  // gr::analog::agc3_cc::sptr
48  typedef boost::shared_ptr<agc3_cc> sptr;
49 
50  /*!
51  * Build a complex value AGC loop block with attack and decay rates.
52  *
53  * \param attack_rate the update rate of the loop when in attack mode.
54  * \param decay_rate the update rate of the loop when in decay mode.
55  * \param reference reference value to adjust signal power to.
56  * \param gain initial gain value.
57  * \param iir_update_decim stride by this number of samples before
58  * computing an IIR gain update
59  */
60  static sptr make(float attack_rate = 1e-1, float decay_rate = 1e-2,
61  float reference = 1.0, float gain = 1.0, int iir_update_decim=1);
62 
63  virtual float attack_rate() const = 0;
64  virtual float decay_rate() const = 0;
65  virtual float reference() const = 0;
66  virtual float gain() const = 0;
67  virtual float max_gain() const = 0;
68 
69  virtual void set_attack_rate(float rate) = 0;
70  virtual void set_decay_rate(float rate) = 0;
71  virtual void set_reference(float reference) = 0;
72  virtual void set_gain(float gain) = 0;
73  virtual void set_max_gain(float max_gain) = 0;
74  };
75 
76  } /* namespace analog */
77 } /* namespace gr */
78 
79 #endif /* INCLUDED_ANALOG_AGC3_CC_H */
Include this header to use the message passing features.
Definition: logger.h:131
boost::shared_ptr< agc3_cc > sptr
Definition: agc3_cc.h:48
synchronous 1:1 input to output with historyOverride work to provide the signal processing implementa...
Definition: sync_block.h:37
high performance Automatic Gain Control class with attack and decay rates.
Definition: agc3_cc.h:44
#define ANALOG_API
Definition: gr-analog/include/gnuradio/analog/api.h:30