GNU Radio 3.7.0-50 C++ API
probe_mpsk_snr_est_c.h
Go to the documentation of this file.
1
/* -*- c++ -*- */
2
/*
3
* Copyright 2011,2012 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
#ifndef INCLUDED_DIGITAL_PROBE_MPSK_SNR_EST_C_H
24
#define INCLUDED_DIGITAL_PROBE_MPSK_SNR_EST_C_H
25
26
#include <
gnuradio/digital/api.h
>
27
#include <
gnuradio/digital/mpsk_snr_est.h
>
28
#include <
gnuradio/sync_block.h
>
29
30
namespace
gr {
31
namespace
digital {
32
33
/*!
34
* \brief A probe for computing SNR of a signal.
35
* \ingroup measurement_tools_blk
36
*
37
* \details
38
* This is a probe block (a sink) that can be used to monitor and
39
* retrieve estimations of the signal SNR. This probe is designed
40
* for use with M-PSK signals especially. The type of estimator is
41
* specified as the \p type parameter in the constructor. The
42
* estimators tend to trade off performance for accuracy, although
43
* experimentation should be done to figure out the right approach
44
* for a given implementation. Further, the current set of
45
* estimators are designed and proven theoretically under AWGN
46
* conditions; some amount of error should be assumed and/or
47
* estimated for real channel conditions.
48
*/
49
class
DIGITAL_API
probe_mpsk_snr_est_c
:
virtual
public
sync_block
50
{
51
public
:
52
// gr::digital::probe_mpsk_snr_est_c::sptr
53
typedef
boost::shared_ptr<probe_mpsk_snr_est_c>
sptr
;
54
55
/*! Make an MPSK SNR probe.
56
*
57
* Parameters:
58
*
59
* \param type: the type of estimator to use see
60
* gr::digital::snr_est_type_t for details about the types.
61
* \param msg_nsamples: [not implemented yet] after this many
62
* samples, a message containing the SNR (key='snr') will be sent
63
* \param alpha: the update rate of internal running average
64
* calculations.
65
*/
66
static
sptr
make(
snr_est_type_t
type,
67
int
msg_nsamples=10000,
68
double
alpha=0.001);
69
70
//! Return the estimated signal-to-noise ratio in decibels
71
virtual
double
snr() = 0;
72
73
//! Return the type of estimator in use
74
virtual
snr_est_type_t
type()
const
= 0;
75
76
//! Return how many samples between SNR messages
77
virtual
int
msg_nsample()
const
= 0;
78
79
//! Get the running-average coefficient
80
virtual
double
alpha()
const
= 0;
81
82
//! Set type of estimator to use
83
virtual
void
set_type(
snr_est_type_t
t) = 0;
84
85
//! Set the number of samples between SNR messages
86
virtual
void
set_msg_nsample(
int
n) = 0;
87
88
//! Set the running-average coefficient
89
virtual
void
set_alpha(
double
alpha) = 0;
90
};
91
92
}
/* namespace digital */
93
}
/* namespace gr */
94
95
#endif
/* INCLUDED_DIGITAL_PROBE_MPSK_SNR_EST_C_H */
gnuradio
gr-digital
include
gnuradio
digital
probe_mpsk_snr_est_c.h
Generated by
1.8.3.1