GNU Radio Manual and C++ API Reference  3.10.9.1
The Free & Open Software Radio Ecosystem
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  * SPDX-License-Identifier: GPL-3.0-or-later
8  *
9  */
10 
11 #ifndef INCLUDED_ANALOG_AGC3_CC_H
12 #define INCLUDED_ANALOG_AGC3_CC_H
13 
14 #include <gnuradio/analog/api.h>
15 #include <gnuradio/sync_block.h>
16 
17 namespace gr {
18 namespace analog {
19 
20 /*!
21  * \brief high performance Automatic Gain Control class with
22  * attack and decay rates.
23  * \ingroup level_controllers_blk
24  *
25  * \details
26  * Unlike the AGC2 loop, this uses an initial linear calculation
27  * at the beginning for very fast initial acquisition. Moves to
28  * IIR model for tracking purposes.
29  *
30  * For Power the absolute value of the complex number is used.
31  */
32 class ANALOG_API agc3_cc : virtual public sync_block
33 {
34 public:
35  // gr::analog::agc3_cc::sptr
36  typedef std::shared_ptr<agc3_cc> sptr;
37 
38  /*!
39  * Build a complex value AGC loop block with attack and decay rates.
40  *
41  * \param attack_rate the update rate of the loop when in attack mode.
42  * \param decay_rate the update rate of the loop when in decay mode.
43  * \param reference reference value to adjust signal power to.
44  * \param gain initial gain value.
45  * \param iir_update_decim stride by this number of samples before
46  * computing an IIR gain update
47  * \param max_gain maximum gain value (0 for unlimited).
48  */
49  static sptr make(float attack_rate = 1e-1,
50  float decay_rate = 1e-2,
51  float reference = 1.0,
52  float gain = 1.0,
53  int iir_update_decim = 1,
54  float max_gain = 0.0);
55 
56  virtual float attack_rate() const = 0;
57  virtual float decay_rate() const = 0;
58  virtual float reference() const = 0;
59  virtual float gain() const = 0;
60  virtual float max_gain() const = 0;
61 
62  virtual void set_attack_rate(float rate) = 0;
63  virtual void set_decay_rate(float rate) = 0;
64  virtual void set_reference(float reference) = 0;
65  virtual void set_gain(float gain) = 0;
66  virtual void set_max_gain(float max_gain) = 0;
67 };
68 
69 } /* namespace analog */
70 } /* namespace gr */
71 
72 #endif /* INCLUDED_ANALOG_AGC3_CC_H */
high performance Automatic Gain Control class with attack and decay rates.
Definition: agc3_cc.h:33
virtual float decay_rate() const =0
static sptr make(float attack_rate=1e-1, float decay_rate=1e-2, float reference=1.0, float gain=1.0, int iir_update_decim=1, float max_gain=0.0)
virtual void set_max_gain(float max_gain)=0
std::shared_ptr< agc3_cc > sptr
Definition: agc3_cc.h:36
virtual void set_gain(float gain)=0
virtual void set_reference(float reference)=0
virtual void set_attack_rate(float rate)=0
virtual float attack_rate() const =0
virtual float gain() const =0
virtual float reference() const =0
virtual void set_decay_rate(float rate)=0
virtual float max_gain() const =0
synchronous 1:1 input to output with history
Definition: sync_block.h:26
#define ANALOG_API
Definition: gr-analog/include/gnuradio/analog/api.h:18
GNU Radio logging wrapper.
Definition: basic_block.h:29