GNU Radio 3.6.5 C++ API

digital_probe_mpsk_snr_est_c Class Reference

A probe for computing SNR of a signal. More...

#include <digital_probe_mpsk_snr_est_c.h>

Inheritance diagram for digital_probe_mpsk_snr_est_c:
gr_sync_block gr_block gr_basic_block gr_msg_accepter gruel::msg_accepter

List of all members.

Public Member Functions

 ~digital_probe_mpsk_snr_est_c ()
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 msg_nsample () const
 Return how many samples between SNR messages.
double alpha () const
 Get the running-average coefficient.
void set_type (snr_est_type_t t)
 Set type of estimator to use.
void set_msg_nsample (int n)
 Set the number of samples between SNR messages.
void set_alpha (double alpha)
 Set the running-average coefficient.

Friends

DIGITAL_API
digital_probe_mpsk_snr_est_c_sptr 
digital_make_probe_mpsk_snr_est_c (snr_est_type_t type, int msg_nsamples, double alpha)

Detailed Description

A probe for computing SNR of a signal.

This is a probe block (a sink) that can be used to monitor and retrieve estimations of the signal SNR. This probe 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.


Constructor & Destructor Documentation

digital_probe_mpsk_snr_est_c::~digital_probe_mpsk_snr_est_c ( )

Member Function Documentation

double digital_probe_mpsk_snr_est_c::alpha ( ) const

Get the running-average coefficient.

int digital_probe_mpsk_snr_est_c::msg_nsample ( ) const

Return how many samples between SNR messages.

void digital_probe_mpsk_snr_est_c::set_alpha ( double  alpha)

Set the running-average coefficient.

void digital_probe_mpsk_snr_est_c::set_msg_nsample ( int  n)

Set the number of samples between SNR messages.

void digital_probe_mpsk_snr_est_c::set_type ( snr_est_type_t  t)

Set type of estimator to use.

double digital_probe_mpsk_snr_est_c::snr ( )

Return the estimated signal-to-noise ratio in decibels.

snr_est_type_t digital_probe_mpsk_snr_est_c::type ( ) const

Return the type of estimator in use.

int digital_probe_mpsk_snr_est_c::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.


Friends And Related Function Documentation

DIGITAL_API digital_probe_mpsk_snr_est_c_sptr digital_make_probe_mpsk_snr_est_c ( snr_est_type_t  type,
int  msg_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.
msg_nsamples,:[not implemented yet] after this many samples, a message containing the SNR (key='snr') will be sent
alpha,:the update rate of internal running average calculations.

The documentation for this class was generated from the following file: