GNU Radio Manual and C++ API Reference 3.10.5.1
The Free & Open Software Radio Ecosystem
agc2_ff.h
Go to the documentation of this file.
1/* -*- c++ -*- */
2/*
3 * Copyright 2005,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_AGC2_FF_H
12#define INCLUDED_ANALOG_AGC2_FF_H
13
15#include <gnuradio/analog/api.h>
16#include <gnuradio/sync_block.h>
17
18namespace gr {
19namespace analog {
20
21/*!
22 * \brief high performance Automatic Gain Control class with
23 * attack and decay rates.
24 * \ingroup level_controllers_blk
25 *
26 * \details
27 * Power is approximated by absolute value
28 */
29class ANALOG_API agc2_ff : virtual public sync_block
30{
31public:
32 // gr::analog::agc2_ff::sptr
33 typedef std::shared_ptr<agc2_ff> sptr;
34
35 /*!
36 * Build a floating point AGC loop block with attack and decay rates.
37 *
38 * \param attack_rate the update rate of the loop when in attack mode.
39 * \param decay_rate the update rate of the loop when in decay mode.
40 * \param reference reference value to adjust signal power to.
41 * \param gain initial gain value.
42 */
43 static sptr make(float attack_rate = 1e-1,
44 float decay_rate = 1e-2,
45 float reference = 1.0,
46 float gain = 1.0);
47
48 virtual float attack_rate() const = 0;
49 virtual float decay_rate() const = 0;
50 virtual float reference() const = 0;
51 virtual float gain() const = 0;
52 virtual float max_gain() const = 0;
53
54 virtual void set_attack_rate(float rate) = 0;
55 virtual void set_decay_rate(float rate) = 0;
56 virtual void set_reference(float reference) = 0;
57 virtual void set_gain(float gain) = 0;
58 virtual void set_max_gain(float max_gain) = 0;
59};
60
61} /* namespace analog */
62} /* namespace gr */
63
64#endif /* INCLUDED_ANALOG_AGC2_FF_H */
high performance Automatic Gain Control class with attack and decay rates.
Definition: agc2_ff.h:30
virtual float gain() const =0
std::shared_ptr< agc2_ff > sptr
Definition: agc2_ff.h:33
virtual void set_max_gain(float max_gain)=0
virtual void set_decay_rate(float rate)=0
virtual void set_attack_rate(float rate)=0
virtual float decay_rate() const =0
virtual void set_reference(float reference)=0
static sptr make(float attack_rate=1e-1, float decay_rate=1e-2, float reference=1.0, float gain=1.0)
virtual float attack_rate() const =0
virtual float max_gain() const =0
virtual void set_gain(float gain)=0
virtual float reference() 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