SDRAngel  4.11.5
Developer docs for <a href="https://github.com/f4exb/sdrangel">SDRangel<\a>, an Open Source Qt5 / OpenGL 3.0+ SDR and signal analyzer frontend to various hardware.
Public Member Functions | Protected Attributes | List of all members
AGC Class Referenceabstract

#include <agc.h>

+ Inheritance diagram for AGC:
+ Collaboration diagram for AGC:

Public Member Functions

 AGC (int historySize, double R)
 
virtual ~AGC ()
 
void resize (int historySize, double R)
 
void setOrder (double R)
 
Real getValue ()
 
Real getAverage ()
 
virtual void feed (Complex &ci)=0
 

Protected Attributes

double m_u0
 AGC factor. More...
 
double m_R
 ordered magnitude More...
 
MovingAverage< double > m_moving_average
 Averaging engine. The stack length conditions the smoothness of AGC. More...
 
int m_historySize
 Averaging length (attack) More...
 
int m_count
 Samples counter. More...
 

Detailed Description

Definition at line 15 of file agc.h.

Constructor & Destructor Documentation

◆ AGC()

AGC::AGC ( int  historySize,
double  R 
)

Definition at line 13 of file agc.cpp.

13  :
14  m_u0(1.0),
15  m_R(R),
16  m_moving_average(historySize, m_R),
17  m_historySize(historySize),
18  m_count(0)
19 {}
double m_u0
AGC factor.
Definition: agc.h:28
int m_historySize
Averaging length (attack)
Definition: agc.h:31
int m_count
Samples counter.
Definition: agc.h:32
MovingAverage< double > m_moving_average
Averaging engine. The stack length conditions the smoothness of AGC.
Definition: agc.h:30
double m_R
ordered magnitude
Definition: agc.h:29

◆ ~AGC()

AGC::~AGC ( )
virtual

Definition at line 21 of file agc.cpp.

22 {}

Member Function Documentation

◆ feed()

virtual void AGC::feed ( Complex ci)
pure virtual

Implemented in MagAGC.

Referenced by MagAGC::setSquared().

+ Here is the caller graph for this function:

◆ getAverage()

Real AGC::getAverage ( )

Definition at line 37 of file agc.cpp.

References MovingAverage< Type >::average(), and m_moving_average.

38 {
39  return m_moving_average.average();
40 }
Type average() const
Definition: movingaverage.h:43
MovingAverage< double > m_moving_average
Averaging engine. The stack length conditions the smoothness of AGC.
Definition: agc.h:30
+ Here is the call graph for this function:

◆ getValue()

Real AGC::getValue ( )

Definition at line 32 of file agc.cpp.

References m_u0.

33 {
34  return m_u0;
35 }
double m_u0
AGC factor.
Definition: agc.h:28

◆ resize()

void AGC::resize ( int  historySize,
double  R 
)

Definition at line 24 of file agc.cpp.

References m_count, m_historySize, m_moving_average, m_R, and MovingAverage< Type >::resize().

Referenced by MagAGC::resize(), and MagAGC::setSquared().

25 {
26  m_R = R;
27  m_moving_average.resize(historySize, R);
28  m_historySize = historySize;
29  m_count = 0;
30 }
int m_historySize
Averaging length (attack)
Definition: agc.h:31
int m_count
Samples counter.
Definition: agc.h:32
MovingAverage< double > m_moving_average
Averaging engine. The stack length conditions the smoothness of AGC.
Definition: agc.h:30
double m_R
ordered magnitude
Definition: agc.h:29
void resize(int historySize, Type initial)
Definition: movingaverage.h:16
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setOrder()

void AGC::setOrder ( double  R)
inline

Definition at line 22 of file agc.h.

Referenced by MagAGC::setOrder(), and MagAGC::setSquared().

22 { m_R = R; }
double m_R
ordered magnitude
Definition: agc.h:29
+ Here is the caller graph for this function:

Member Data Documentation

◆ m_count

int AGC::m_count
protected

Samples counter.

Definition at line 32 of file agc.h.

Referenced by MagAGC::feedAndGetValue(), MagAGC::getStepValue(), and resize().

◆ m_historySize

int AGC::m_historySize
protected

Averaging length (attack)

Definition at line 31 of file agc.h.

Referenced by resize().

◆ m_moving_average

MovingAverage<double> AGC::m_moving_average
protected

Averaging engine. The stack length conditions the smoothness of AGC.

Definition at line 30 of file agc.h.

Referenced by MagAGC::feedAndGetValue(), getAverage(), resize(), MagAGC::resize(), and MagAGC::setOrder().

◆ m_R

double AGC::m_R
protected

ordered magnitude

Definition at line 29 of file agc.h.

Referenced by MagAGC::feedAndGetValue(), and resize().

◆ m_u0

double AGC::m_u0
protected

AGC factor.

Definition at line 28 of file agc.h.

Referenced by MagAGC::feedAndGetValue(), and getValue().


The documentation for this class was generated from the following files: