GNU Radio Manual and C++ API Reference  3.10.9.1
The Free & Open Software Radio Ecosystem
probe_density_b.h
Go to the documentation of this file.
1 /* -*- c++ -*- */
2 /*
3  * Copyright 2008,2012 Free Software Foundation, Inc.
4  *
5  * SPDX-License-Identifier: GPL-3.0-or-later
6  *
7  */
8 
9 #ifndef INCLUDED_GR_PROBE_DENSITY_B_H
10 #define INCLUDED_GR_PROBE_DENSITY_B_H
11 
12 #include <gnuradio/digital/api.h>
13 #include <gnuradio/sync_block.h>
14 
15 namespace gr {
16 namespace digital {
17 
18 /*!
19  * \ingroup measurement_tools_blk
20  *
21  * This block maintains a running average of the input stream and
22  * makes it available as an accessor function. The input stream is
23  * type unsigned char.
24  *
25  * If you send this block a stream of unpacked bytes, it will tell
26  * you what the bit density is.
27  */
28 class DIGITAL_API probe_density_b : virtual public sync_block
29 {
30 public:
31  // gr::digital::probe_density_b::sptr
32  typedef std::shared_ptr<probe_density_b> sptr;
33 
34  /*!
35  * Make a density probe block.
36  *
37  * \param alpha Average filter constant
38  *
39  */
40  static sptr make(double alpha);
41 
42  /*!
43  * \brief Returns the current density value
44  */
45  virtual double density() const = 0;
46 
47  /*!
48  * \brief Set the average filter constant
49  */
50  virtual void set_alpha(double alpha) = 0;
51 };
52 
53 } /* namespace digital */
54 } /* namespace gr */
55 
56 #endif /* INCLUDED_GR_PROBE_DENSITY_B_H */
Definition: probe_density_b.h:29
static sptr make(double alpha)
virtual void set_alpha(double alpha)=0
Set the average filter constant.
std::shared_ptr< probe_density_b > sptr
Definition: probe_density_b.h:32
virtual double density() const =0
Returns the current density value.
synchronous 1:1 input to output with history
Definition: sync_block.h:26
#define DIGITAL_API
Definition: gr-digital/include/gnuradio/digital/api.h:18
GNU Radio logging wrapper.
Definition: basic_block.h:29