GNU Radio Manual and C++ API Reference  3.7.9.2
The Free & Open Software Radio Ecosystem
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
probe_density_b.h
Go to the documentation of this file.
1 /* -*- c++ -*- */
2 /*
3  * Copyright 2008,2012 Free Software Foundation, Inc.
4  *
5  * GNU Radio is free software; you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License as published by
7  * the Free Software Foundation; either version 3, or (at your option)
8  * any later version.
9  *
10  * GNU Radio is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License
16  * along with GNU Radio; see the file COPYING. If not, write to
17  * the Free Software Foundation, Inc., 51 Franklin Street,
18  * Boston, MA 02110-1301, USA.
19  */
20 
21 #ifndef INCLUDED_GR_PROBE_DENSITY_B_H
22 #define INCLUDED_GR_PROBE_DENSITY_B_H
23 
24 #include <gnuradio/digital/api.h>
25 #include <gnuradio/sync_block.h>
26 
27 namespace gr {
28  namespace digital {
29 
30  /*!
31  * \ingroup measurement_tools_blk
32  *
33  * This block maintains a running average of the input stream and
34  * makes it available as an accessor function. The input stream is
35  * type unsigned char.
36  *
37  * If you send this block a stream of unpacked bytes, it will tell
38  * you what the bit density is.
39  */
40  class DIGITAL_API probe_density_b : virtual public sync_block
41  {
42  public:
43  // gr::digital::probe_density_b::sptr
44  typedef boost::shared_ptr<probe_density_b> sptr;
45 
46  /*!
47  * Make a density probe block.
48  *
49  * \param alpha Average filter constant
50  *
51  */
52  static sptr make(double alpha);
53 
54  /*!
55  * \brief Returns the current density value
56  */
57  virtual double density() const = 0;
58 
59  /*!
60  * \brief Set the average filter constant
61  */
62  virtual void set_alpha(double alpha) = 0;
63  };
64 
65  } /* namespace digital */
66 } /* namespace gr */
67 
68 #endif /* INCLUDED_GR_PROBE_DENSITY_B_H */
#define DIGITAL_API
Definition: gr-digital/include/gnuradio/digital/api.h:30
Include this header to use the message passing features.
Definition: logger.h:131
synchronous 1:1 input to output with historyOverride work to provide the signal processing implementa...
Definition: sync_block.h:37
Definition: probe_density_b.h:40
boost::shared_ptr< probe_density_b > sptr
Definition: probe_density_b.h:44