gr-baz Package

baz_agc_cc.h
Go to the documentation of this file.
1/* -*- c++ -*- */
2/*
3 * Copyright 2006,2013 Free Software Foundation, Inc.
4 *
5 * This file is part of GNU Radio
6 *
7 * GNU Radio is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 3, or (at your option)
10 * any later version.
11 *
12 * GNU Radio is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with GNU Radio; see the file COPYING. If not, write to
19 * the Free Software Foundation, Inc., 51 Franklin Street,
20 * Boston, MA 02110-1301, USA.
21 */
22
23/*
24 * gr-baz by Balint Seeber (http://spench.net/contact)
25 * Information, documentation & samples: http://wiki.spench.net/wiki/gr-baz
26 */
27
28// THIS IS EXPERIMENTAL AND UNFINISHED
29
30#ifndef INCLUDED_BAZ_AGC_CC_H
31#define INCLUDED_BAZ_AGC_CC_H
32
33#include <gnuradio/sync_block.h>
34
35//#include <gri_agc_cc.h>
36
37 class BAZ_API baz_agc_cc;
38 typedef boost::shared_ptr<baz_agc_cc> baz_agc_cc_sptr;
39
40 BAZ_API baz_agc_cc_sptr
41 baz_make_agc_cc (float rate = 1e-4, float reference = 1.0, float gain = 1.0, float max_gain = 0.0);
42/*!
43 * \brief high performance Automatic Gain Control class
44 * \ingroup level_blk
45 *
46 * For Power the absolute value of the complex number is used.
47 */
48
49 class BAZ_API baz_agc_cc : public gr::sync_block//, public gri_agc_cc
50{
51 friend BAZ_API baz_agc_cc_sptr baz_make_agc_cc (float rate, float reference, float gain, float max_gain);
52 baz_agc_cc (float rate, float reference, float gain, float max_gain);
53
54 protected:
55 float _rate; // adjustment rate
56 /*float*/double _reference; // reference value
57 /*float*/double _gain; // current gain
58 float _max_gain; // max allowable gain
59 unsigned long long _count;
60 double _env;
61
62 public:
63 virtual int work (int noutput_items,
64 gr_vector_const_void_star &input_items,
65 gr_vector_void_star &output_items);
66};
67
68#endif /* INCLUDED_BAZ_AGC_CC_H */
BAZ_API
#define BAZ_API
Definition: api.h:19
baz_make_agc_cc
BAZ_API baz_agc_cc_sptr baz_make_agc_cc(float rate=1e-4, float reference=1.0, float gain=1.0, float max_gain=0.0)
baz_agc_cc
class BAZ_API baz_agc_cc
Definition: baz_agc_cc.h:37
baz_agc_cc
high performance Automatic Gain Control class
Definition: baz_agc_cc.h:50
baz_agc_cc::work
virtual int work(int noutput_items, gr_vector_const_void_star &input_items, gr_vector_void_star &output_items)
baz_agc_cc::_env
double _env
Definition: baz_agc_cc.h:60
baz_agc_cc::_gain
double _gain
Definition: baz_agc_cc.h:57
baz_agc_cc::_count
unsigned long long _count
Definition: baz_agc_cc.h:59
baz_agc_cc::_rate
float _rate
Definition: baz_agc_cc.h:55
baz_agc_cc::_max_gain
float _max_gain
Definition: baz_agc_cc.h:58
baz_agc_cc::_reference
double _reference
Definition: baz_agc_cc.h:56
baz_agc_cc::baz_make_agc_cc
friend BAZ_API baz_agc_cc_sptr baz_make_agc_cc(float rate, float reference, float gain, float max_gain)