GNU Radio Manual and C++ API Reference 3.10.5.1
The Free & Open Software Radio Ecosystem
probe_avg_mag_sqrd_cf.h
Go to the documentation of this file.
1/* -*- c++ -*- */
2/*
3 * Copyright 2005,2006,2012 Free Software Foundation, Inc.
4 *
5 * This file is part of GNU Radio
6 *
7 * SPDX-License-Identifier: GPL-3.0-or-later
8 *
9 */
10
11#ifndef INCLUDED_ANALOG_PROBE_AVG_MAG_SQRD_CF_H
12#define INCLUDED_ANALOG_PROBE_AVG_MAG_SQRD_CF_H
13
14#include <gnuradio/analog/api.h>
15#include <gnuradio/sync_block.h>
16
17namespace gr {
18namespace analog {
19
20/*!
21 * \brief compute avg magnitude squared.
22 * \ingroup measurement_tools_blk
23 *
24 * \details
25 * Input stream 0: complex
26 * Output stream 0: float
27 *
28 * Compute a running average of the magnitude squared of the the
29 * input. The level and indication as to whether the level exceeds
30 * threshold can be retrieved with the level and unmuted
31 * accessors.
32 */
34{
35public:
36 // gr::analog::probe_avg_mag_sqrd_cf::sptr
37 typedef std::shared_ptr<probe_avg_mag_sqrd_cf> sptr;
38
39 /*!
40 * \brief Make a block that computes avg magnitude squared.
41 *
42 * \param threshold_db Threshold for muting.
43 * \param alpha Gain parameter for the running average filter.
44 */
45 static sptr make(double threshold_db, double alpha = 0.0001);
46
47 virtual bool unmuted() const = 0;
48 virtual double level() const = 0;
49 virtual double threshold() const = 0;
50
51 virtual void set_alpha(double alpha) = 0;
52 virtual void set_threshold(double decibels) = 0;
53 virtual void reset() = 0;
54};
55
56} /* namespace analog */
57} /* namespace gr */
58
59#endif /* INCLUDED_ANALOG_PROBE_AVG_MAG_SQRD_CF_H */
compute avg magnitude squared.
Definition: probe_avg_mag_sqrd_cf.h:34
virtual void set_alpha(double alpha)=0
virtual void set_threshold(double decibels)=0
virtual bool unmuted() const =0
virtual double level() const =0
virtual double threshold() const =0
static sptr make(double threshold_db, double alpha=0.0001)
Make a block that computes avg magnitude squared.
std::shared_ptr< probe_avg_mag_sqrd_cf > sptr
Definition: probe_avg_mag_sqrd_cf.h:37
synchronous 1:1 input to output with history
Definition: sync_block.h:26
#define ANALOG_API
Definition: gr-analog/include/gnuradio/analog/api.h:18
GNU Radio logging wrapper.
Definition: basic_block.h:29