GNU Radio Manual and C++ API Reference 3.10.5.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
17namespace gr {
18namespace 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 */
32class ANALOG_API agc3_cc : virtual public sync_block
33{
34public:
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 */
48 static sptr make(float attack_rate = 1e-1,
49 float decay_rate = 1e-2,
50 float reference = 1.0,
51 float gain = 1.0,
52 int iir_update_decim = 1);
53
54 virtual float attack_rate() const = 0;
55 virtual float decay_rate() const = 0;
56 virtual float reference() const = 0;
57 virtual float gain() const = 0;
58 virtual float max_gain() const = 0;
59
60 virtual void set_attack_rate(float rate) = 0;
61 virtual void set_decay_rate(float rate) = 0;
62 virtual void set_reference(float reference) = 0;
63 virtual void set_gain(float gain) = 0;
64 virtual void set_max_gain(float max_gain) = 0;
65};
66
67} /* namespace analog */
68} /* namespace gr */
69
70#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)
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