GNU Radio 3.6.5 C++ API
|
A block for computing SNR of a signal. More...
#include <digital_mpsk_snr_est_cc.h>
Public Member Functions | |
~digital_mpsk_snr_est_cc () | |
int | work (int noutput_items, gr_vector_const_void_star &input_items, gr_vector_void_star &output_items) |
just like gr_block::general_work, only this arranges to call consume_each for you | |
double | snr () |
Return the estimated signal-to-noise ratio in decibels. | |
snr_est_type_t | type () const |
Return the type of estimator in use. | |
int | tag_nsample () const |
Return how many samples between SNR tags. | |
double | alpha () const |
Get the running-average coefficient. | |
void | set_type (snr_est_type_t t) |
Set type of estimator to use. | |
void | set_tag_nsample (int n) |
Set the number of samples between SNR tags. | |
void | set_alpha (double alpha) |
Set the running-average coefficient. | |
Friends | |
DIGITAL_API digital_mpsk_snr_est_cc_sptr | digital_make_mpsk_snr_est_cc (snr_est_type_t type, int tag_nsamples, double alpha) |
A block for computing SNR of a signal.
This block can be used to monitor and retrieve estimations of the signal SNR. It is designed to work in a flowgraph and passes all incoming data along to its output.
The block is designed for use with M-PSK signals especially. The type of estimator is specified as the type
parameter in the constructor. The estimators tend to trade off performance for accuracy, although experimentation should be done to figure out the right approach for a given implementation. Further, the current set of estimators are designed and proven theoretically under AWGN conditions; some amount of error should be assumed and/or estimated for real channel conditions.
digital_mpsk_snr_est_cc::~digital_mpsk_snr_est_cc | ( | ) |
double digital_mpsk_snr_est_cc::alpha | ( | ) | const |
Get the running-average coefficient.
void digital_mpsk_snr_est_cc::set_alpha | ( | double | alpha | ) |
Set the running-average coefficient.
void digital_mpsk_snr_est_cc::set_tag_nsample | ( | int | n | ) |
Set the number of samples between SNR tags.
void digital_mpsk_snr_est_cc::set_type | ( | snr_est_type_t | t | ) |
Set type of estimator to use.
double digital_mpsk_snr_est_cc::snr | ( | ) |
Return the estimated signal-to-noise ratio in decibels.
int digital_mpsk_snr_est_cc::tag_nsample | ( | ) | const |
Return how many samples between SNR tags.
snr_est_type_t digital_mpsk_snr_est_cc::type | ( | ) | const |
Return the type of estimator in use.
int digital_mpsk_snr_est_cc::work | ( | int | noutput_items, |
gr_vector_const_void_star & | input_items, | ||
gr_vector_void_star & | output_items | ||
) | [virtual] |
just like gr_block::general_work, only this arranges to call consume_each for you
The user must override work to define the signal processing code
Implements gr_sync_block.
DIGITAL_API digital_mpsk_snr_est_cc_sptr digital_make_mpsk_snr_est_cc | ( | snr_est_type_t | type, |
int | tag_nsamples, | ||
double | alpha | ||
) | [friend] |
Factory function returning shared pointer of this class
Parameters:
type,: | the type of estimator to use snr_est_type_t for details about the available types. |
tag_nsamples,: | after this many samples, a tag containing the SNR (key='snr') will be sent |
alpha,: | the update rate of internal running average calculations. |