<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> <title>GNU Radio 3.2.2 C++ API: gri_agc2_cc Class Reference</title> <link href="tabs.css" rel="stylesheet" type="text/css"/> <link href="doxygen.css" rel="stylesheet" type="text/css"/> </head> <body> <!-- Generated by Doxygen 1.6.2 --> <div class="contents"> <h1>gri_agc2_cc Class Reference</h1><!-- doxytag: class="gri_agc2_cc" --> <p>high performance Automatic Gain Control class <a href="#_details">More...</a></p> <p><code>#include <<a class="el" href="gri__agc2__cc_8h_source.html">gri_agc2_cc.h</a>></code></p> <div class="dynheader"> Inheritance diagram for gri_agc2_cc:</div> <div class="dynsection"> <div class="center"><img src="classgri__agc2__cc__inherit__graph.png" border="0" usemap="#gri__agc2__cc_inherit__map" alt="Inheritance graph"/></div> <map name="gri__agc2__cc_inherit__map" id="gri__agc2__cc_inherit__map"> <area shape="rect" id="node3" href="classgr__agc2__cc.html" title="high performance Automatic Gain Control classFor Power the absolute value of the..." alt="" coords="7,83,95,112"/></map> <center><span class="legend">[<a target="top" href="graph_legend.html">legend</a>]</span></center></div> <p><a href="classgri__agc2__cc-members.html">List of all members.</a></p> <table border="0" cellpadding="0" cellspacing="0"> <tr><td colspan="2"><h2>Public Member Functions</h2></td></tr> <tr><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classgri__agc2__cc.html#aa9b3989197681d146b32ff1a4bc995ba">gri_agc2_cc</a> (float attack_rate=1e-1, float decay_rate=1e-2, float reference=1.0, float gain=1.0, float max_gain=0.0)</td></tr> <tr><td class="memItemLeft" align="right" valign="top">float </td><td class="memItemRight" valign="bottom"><a class="el" href="classgri__agc2__cc.html#a9779995f8b978301f3d8b3de3be52049">decay_rate</a> () const </td></tr> <tr><td class="memItemLeft" align="right" valign="top">float </td><td class="memItemRight" valign="bottom"><a class="el" href="classgri__agc2__cc.html#a4996c777b5d4f7df997046e48228710c">attack_rate</a> () const </td></tr> <tr><td class="memItemLeft" align="right" valign="top">float </td><td class="memItemRight" valign="bottom"><a class="el" href="classgri__agc2__cc.html#ad7b129a57fff9b8f2974bbb9ec5c9ee4">reference</a> () const </td></tr> <tr><td class="memItemLeft" align="right" valign="top">float </td><td class="memItemRight" valign="bottom"><a class="el" href="classgri__agc2__cc.html#a72006985b1547b093173035c4072e4ff">gain</a> () const </td></tr> <tr><td class="memItemLeft" align="right" valign="top">float </td><td class="memItemRight" valign="bottom"><a class="el" href="classgri__agc2__cc.html#a36d3140ac98f030cca50b74bc218111e">max_gain</a> () const </td></tr> <tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classgri__agc2__cc.html#a3bf819a9eb77d2c5ab825c0f5605bcad">set_decay_rate</a> (float rate)</td></tr> <tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classgri__agc2__cc.html#a0cfe25f7e50db7a1b84c97600eda4059">set_attack_rate</a> (float rate)</td></tr> <tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classgri__agc2__cc.html#af55399565c7f0ae9eb65db1ffd456d32">set_reference</a> (float reference)</td></tr> <tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classgri__agc2__cc.html#abad4ab13d1cd016f3d298947ef137fea">set_gain</a> (float gain)</td></tr> <tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classgri__agc2__cc.html#ade06ca7a97d859668f51c10449b0b727">set_max_gain</a> (float max_gain)</td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="gr__complex_8h.html#aec4bfe41433369afae9327f1b0bc9109">gr_complex</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classgri__agc2__cc.html#ad2fda74489ea47d76a13743ac8eb62fc">scale</a> (<a class="el" href="gr__complex_8h.html#aec4bfe41433369afae9327f1b0bc9109">gr_complex</a> input)</td></tr> <tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classgri__agc2__cc.html#a5bbf86a6d29d43aa163599048ef3ab96">scaleN</a> (<a class="el" href="gr__complex_8h.html#aec4bfe41433369afae9327f1b0bc9109">gr_complex</a> output[], const <a class="el" href="gr__complex_8h.html#aec4bfe41433369afae9327f1b0bc9109">gr_complex</a> input[], unsigned n)</td></tr> <tr><td colspan="2"><h2>Protected Attributes</h2></td></tr> <tr><td class="memItemLeft" align="right" valign="top">float </td><td class="memItemRight" valign="bottom"><a class="el" href="classgri__agc2__cc.html#a788fb3f95c84611e63612d23d568ef12">_attack_rate</a></td></tr> <tr><td class="memItemLeft" align="right" valign="top">float </td><td class="memItemRight" valign="bottom"><a class="el" href="classgri__agc2__cc.html#a7e9bc91e5b7139147f5e3cf05514bb8a">_decay_rate</a></td></tr> <tr><td class="memItemLeft" align="right" valign="top">float </td><td class="memItemRight" valign="bottom"><a class="el" href="classgri__agc2__cc.html#afedbdaaae8b0398a5bce7c826ee971bc">_reference</a></td></tr> <tr><td class="memItemLeft" align="right" valign="top">float </td><td class="memItemRight" valign="bottom"><a class="el" href="classgri__agc2__cc.html#a458e0f3624fada7de409285bc4a16ba9">_gain</a></td></tr> <tr><td class="memItemLeft" align="right" valign="top">float </td><td class="memItemRight" valign="bottom"><a class="el" href="classgri__agc2__cc.html#a4e8a334937f39a7844f49d13d7b7c7ce">_max_gain</a></td></tr> </table> <hr/><a name="_details"></a><h2>Detailed Description</h2> <p>high performance Automatic Gain Control class </p> <p>For Power the absolute value of the complex number is used. </p> <hr/><h2>Constructor & Destructor Documentation</h2> <a class="anchor" id="aa9b3989197681d146b32ff1a4bc995ba"></a><!-- doxytag: member="gri_agc2_cc::gri_agc2_cc" ref="aa9b3989197681d146b32ff1a4bc995ba" args="(float attack_rate=1e-1, float decay_rate=1e-2, float reference=1.0, float gain=1.0, float max_gain=0.0)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">gri_agc2_cc::gri_agc2_cc </td> <td>(</td> <td class="paramtype">float </td> <td class="paramname"> <em>attack_rate</em> = <code>1e-1</code>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">float </td> <td class="paramname"> <em>decay_rate</em> = <code>1e-2</code>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">float </td> <td class="paramname"> <em>reference</em> = <code>1.0</code>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">float </td> <td class="paramname"> <em>gain</em> = <code>1.0</code>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">float </td> <td class="paramname"> <em>max_gain</em> = <code>0.0</code></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td><code> [inline]</code></td> </tr> </table> </div> <div class="memdoc"> </div> </div> <hr/><h2>Member Function Documentation</h2> <a class="anchor" id="a4996c777b5d4f7df997046e48228710c"></a><!-- doxytag: member="gri_agc2_cc::attack_rate" ref="a4996c777b5d4f7df997046e48228710c" args="() const " --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">float gri_agc2_cc::attack_rate </td> <td>(</td> <td class="paramname"></td> <td> ) </td> <td> const<code> [inline]</code></td> </tr> </table> </div> <div class="memdoc"> <p>References <a class="el" href="gri__agc2__cc_8h_source.html#l00083">_attack_rate</a>.</p> </div> </div> <a class="anchor" id="a9779995f8b978301f3d8b3de3be52049"></a><!-- doxytag: member="gri_agc2_cc::decay_rate" ref="a9779995f8b978301f3d8b3de3be52049" args="() const " --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">float gri_agc2_cc::decay_rate </td> <td>(</td> <td class="paramname"></td> <td> ) </td> <td> const<code> [inline]</code></td> </tr> </table> </div> <div class="memdoc"> <p>References <a class="el" href="gri__agc2__cc_8h_source.html#l00084">_decay_rate</a>.</p> </div> </div> <a class="anchor" id="a72006985b1547b093173035c4072e4ff"></a><!-- doxytag: member="gri_agc2_cc::gain" ref="a72006985b1547b093173035c4072e4ff" args="() const " --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">float gri_agc2_cc::gain </td> <td>(</td> <td class="paramname"></td> <td> ) </td> <td> const<code> [inline]</code></td> </tr> </table> </div> <div class="memdoc"> <p>References <a class="el" href="gri__agc2__cc_8h_source.html#l00086">_gain</a>.</p> </div> </div> <a class="anchor" id="a36d3140ac98f030cca50b74bc218111e"></a><!-- doxytag: member="gri_agc2_cc::max_gain" ref="a36d3140ac98f030cca50b74bc218111e" args="() const " --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">float gri_agc2_cc::max_gain </td> <td>(</td> <td class="paramname"></td> <td> ) </td> <td> const<code> [inline]</code></td> </tr> </table> </div> <div class="memdoc"> <p>References <a class="el" href="gri__agc2__cc_8h_source.html#l00087">_max_gain</a>.</p> </div> </div> <a class="anchor" id="ad7b129a57fff9b8f2974bbb9ec5c9ee4"></a><!-- doxytag: member="gri_agc2_cc::reference" ref="ad7b129a57fff9b8f2974bbb9ec5c9ee4" args="() const " --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">float gri_agc2_cc::reference </td> <td>(</td> <td class="paramname"></td> <td> ) </td> <td> const<code> [inline]</code></td> </tr> </table> </div> <div class="memdoc"> <p>References <a class="el" href="gri__agc2__cc_8h_source.html#l00085">_reference</a>.</p> </div> </div> <a class="anchor" id="ad2fda74489ea47d76a13743ac8eb62fc"></a><!-- doxytag: member="gri_agc2_cc::scale" ref="ad2fda74489ea47d76a13743ac8eb62fc" args="(gr_complex input)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="gr__complex_8h.html#aec4bfe41433369afae9327f1b0bc9109">gr_complex</a> gri_agc2_cc::scale </td> <td>(</td> <td class="paramtype"><a class="el" href="gr__complex_8h.html#aec4bfe41433369afae9327f1b0bc9109">gr_complex</a> </td> <td class="paramname"> <em>input</em></td> <td> ) </td> <td><code> [inline]</code></td> </tr> </table> </div> <div class="memdoc"> <p>References <a class="el" href="gri__agc2__cc_8h_source.html#l00083">_attack_rate</a>, <a class="el" href="gri__agc2__cc_8h_source.html#l00084">_decay_rate</a>, <a class="el" href="gri__agc2__cc_8h_source.html#l00086">_gain</a>, <a class="el" href="gri__agc2__cc_8h_source.html#l00087">_max_gain</a>, and <a class="el" href="gri__agc2__cc_8h_source.html#l00085">_reference</a>.</p> <p>Referenced by <a class="el" href="gri__agc2__cc_8h_source.html#l00077">scaleN()</a>.</p> </div> </div> <a class="anchor" id="a5bbf86a6d29d43aa163599048ef3ab96"></a><!-- doxytag: member="gri_agc2_cc::scaleN" ref="a5bbf86a6d29d43aa163599048ef3ab96" args="(gr_complex output[], const gr_complex input[], unsigned n)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void gri_agc2_cc::scaleN </td> <td>(</td> <td class="paramtype"><a class="el" href="gr__complex_8h.html#aec4bfe41433369afae9327f1b0bc9109">gr_complex</a> </td> <td class="paramname"> <em>output</em>[], </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const <a class="el" href="gr__complex_8h.html#aec4bfe41433369afae9327f1b0bc9109">gr_complex</a> </td> <td class="paramname"> <em>input</em>[], </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">unsigned </td> <td class="paramname"> <em>n</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td><code> [inline]</code></td> </tr> </table> </div> <div class="memdoc"> <p>References <a class="el" href="gri__agc2__cc_8h_source.html#l00053">scale()</a>.</p> </div> </div> <a class="anchor" id="a0cfe25f7e50db7a1b84c97600eda4059"></a><!-- doxytag: member="gri_agc2_cc::set_attack_rate" ref="a0cfe25f7e50db7a1b84c97600eda4059" args="(float rate)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void gri_agc2_cc::set_attack_rate </td> <td>(</td> <td class="paramtype">float </td> <td class="paramname"> <em>rate</em></td> <td> ) </td> <td><code> [inline]</code></td> </tr> </table> </div> <div class="memdoc"> <p>References <a class="el" href="gri__agc2__cc_8h_source.html#l00083">_attack_rate</a>.</p> </div> </div> <a class="anchor" id="a3bf819a9eb77d2c5ab825c0f5605bcad"></a><!-- doxytag: member="gri_agc2_cc::set_decay_rate" ref="a3bf819a9eb77d2c5ab825c0f5605bcad" args="(float rate)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void gri_agc2_cc::set_decay_rate </td> <td>(</td> <td class="paramtype">float </td> <td class="paramname"> <em>rate</em></td> <td> ) </td> <td><code> [inline]</code></td> </tr> </table> </div> <div class="memdoc"> <p>References <a class="el" href="gri__agc2__cc_8h_source.html#l00084">_decay_rate</a>.</p> </div> </div> <a class="anchor" id="abad4ab13d1cd016f3d298947ef137fea"></a><!-- doxytag: member="gri_agc2_cc::set_gain" ref="abad4ab13d1cd016f3d298947ef137fea" args="(float gain)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void gri_agc2_cc::set_gain </td> <td>(</td> <td class="paramtype">float </td> <td class="paramname"> <em>gain</em></td> <td> ) </td> <td><code> [inline]</code></td> </tr> </table> </div> <div class="memdoc"> <p>References <a class="el" href="gri__agc2__cc_8h_source.html#l00086">_gain</a>.</p> </div> </div> <a class="anchor" id="ade06ca7a97d859668f51c10449b0b727"></a><!-- doxytag: member="gri_agc2_cc::set_max_gain" ref="ade06ca7a97d859668f51c10449b0b727" args="(float max_gain)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void gri_agc2_cc::set_max_gain </td> <td>(</td> <td class="paramtype">float </td> <td class="paramname"> <em>max_gain</em></td> <td> ) </td> <td><code> [inline]</code></td> </tr> </table> </div> <div class="memdoc"> <p>References <a class="el" href="gri__agc2__cc_8h_source.html#l00087">_max_gain</a>.</p> </div> </div> <a class="anchor" id="af55399565c7f0ae9eb65db1ffd456d32"></a><!-- doxytag: member="gri_agc2_cc::set_reference" ref="af55399565c7f0ae9eb65db1ffd456d32" args="(float reference)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void gri_agc2_cc::set_reference </td> <td>(</td> <td class="paramtype">float </td> <td class="paramname"> <em>reference</em></td> <td> ) </td> <td><code> [inline]</code></td> </tr> </table> </div> <div class="memdoc"> <p>References <a class="el" href="gri__agc2__cc_8h_source.html#l00085">_reference</a>.</p> </div> </div> <hr/><h2>Member Data Documentation</h2> <a class="anchor" id="a788fb3f95c84611e63612d23d568ef12"></a><!-- doxytag: member="gri_agc2_cc::_attack_rate" ref="a788fb3f95c84611e63612d23d568ef12" args="" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">float <a class="el" href="classgri__agc2__cc.html#a788fb3f95c84611e63612d23d568ef12">gri_agc2_cc::_attack_rate</a><code> [protected]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Referenced by <a class="el" href="gri__agc2__cc_8h_source.html#l00042">attack_rate()</a>, <a class="el" href="gri__agc2__cc_8h_source.html#l00053">scale()</a>, and <a class="el" href="gri__agc2__cc_8h_source.html#l00048">set_attack_rate()</a>.</p> </div> </div> <a class="anchor" id="a7e9bc91e5b7139147f5e3cf05514bb8a"></a><!-- doxytag: member="gri_agc2_cc::_decay_rate" ref="a7e9bc91e5b7139147f5e3cf05514bb8a" args="" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">float <a class="el" href="classgri__agc2__cc.html#a7e9bc91e5b7139147f5e3cf05514bb8a">gri_agc2_cc::_decay_rate</a><code> [protected]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Referenced by <a class="el" href="gri__agc2__cc_8h_source.html#l00041">decay_rate()</a>, <a class="el" href="gri__agc2__cc_8h_source.html#l00053">scale()</a>, and <a class="el" href="gri__agc2__cc_8h_source.html#l00047">set_decay_rate()</a>.</p> </div> </div> <a class="anchor" id="a458e0f3624fada7de409285bc4a16ba9"></a><!-- doxytag: member="gri_agc2_cc::_gain" ref="a458e0f3624fada7de409285bc4a16ba9" args="" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">float <a class="el" href="classgri__agc2__cc.html#a458e0f3624fada7de409285bc4a16ba9">gri_agc2_cc::_gain</a><code> [protected]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Referenced by <a class="el" href="gri__agc2__cc_8h_source.html#l00044">gain()</a>, <a class="el" href="gri__agc2__cc_8h_source.html#l00053">scale()</a>, and <a class="el" href="gri__agc2__cc_8h_source.html#l00050">set_gain()</a>.</p> </div> </div> <a class="anchor" id="a4e8a334937f39a7844f49d13d7b7c7ce"></a><!-- doxytag: member="gri_agc2_cc::_max_gain" ref="a4e8a334937f39a7844f49d13d7b7c7ce" args="" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">float <a class="el" href="classgri__agc2__cc.html#a4e8a334937f39a7844f49d13d7b7c7ce">gri_agc2_cc::_max_gain</a><code> [protected]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Referenced by <a class="el" href="gri__agc2__cc_8h_source.html#l00045">max_gain()</a>, <a class="el" href="gri__agc2__cc_8h_source.html#l00053">scale()</a>, and <a class="el" href="gri__agc2__cc_8h_source.html#l00051">set_max_gain()</a>.</p> </div> </div> <a class="anchor" id="afedbdaaae8b0398a5bce7c826ee971bc"></a><!-- doxytag: member="gri_agc2_cc::_reference" ref="afedbdaaae8b0398a5bce7c826ee971bc" args="" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">float <a class="el" href="classgri__agc2__cc.html#afedbdaaae8b0398a5bce7c826ee971bc">gri_agc2_cc::_reference</a><code> [protected]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Referenced by <a class="el" href="gri__agc2__cc_8h_source.html#l00043">reference()</a>, <a class="el" href="gri__agc2__cc_8h_source.html#l00053">scale()</a>, and <a class="el" href="gri__agc2__cc_8h_source.html#l00049">set_reference()</a>.</p> </div> </div> <hr/>The documentation for this class was generated from the following file:<ul> <li><a class="el" href="gri__agc2__cc_8h_source.html">gri_agc2_cc.h</a></li> </ul> </div> <hr size="1"/><address style="text-align: right;"><small>Generated by <a href="http://www.doxygen.org/index.html"> <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.2 </small></address> </body> </html>