From 74c53aa4c5b9aeac590b803b12601bcc9c8b9b60 Mon Sep 17 00:00:00 2001 From: Tom Rondeau Date: Thu, 29 Dec 2011 11:27:00 -0500 Subject: digital: added a probe (sink) for the new SNR estimators; also fixes up Makefiles and Swig files for SNR est blocks. --- gr-digital/swig/digital_probe_mpsk_snr_est_c.i | 41 ++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 gr-digital/swig/digital_probe_mpsk_snr_est_c.i (limited to 'gr-digital/swig/digital_probe_mpsk_snr_est_c.i') diff --git a/gr-digital/swig/digital_probe_mpsk_snr_est_c.i b/gr-digital/swig/digital_probe_mpsk_snr_est_c.i new file mode 100644 index 000000000..fe3684a81 --- /dev/null +++ b/gr-digital/swig/digital_probe_mpsk_snr_est_c.i @@ -0,0 +1,41 @@ +/* -*- c++ -*- */ +/* + * Copyright 2011 Free Software Foundation, Inc. + * + * This file is part of GNU Radio + * + * GNU Radio is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3, or (at your option) + * any later version. + * + * GNU Radio is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with GNU Radio; see the file COPYING. If not, write to + * the Free Software Foundation, Inc., 51 Franklin Street, + * Boston, MA 02110-1301, USA. + */ + +GR_SWIG_BLOCK_MAGIC(digital,probe_mpsk_snr_est_c); + +digital_probe_mpsk_snr_est_c_sptr +digital_make_probe_mpsk_snr_est_c(snr_est_type_t type, + double alpha); + +class digital_probe_mpsk_snr_est_c : public gr_sync_block +{ +private: + void digital_probe_mpsk_snr_est_c(snr_est_type_t type, + double alpha); + +public: + double snr(); + snr_est_type_t type() const; + double alpha() const; + void set_type(snr_est_type_t t); + void set_alpha(double alpha); +}; -- cgit From 36dda1f11620c6c9db63036d76a67b3be3f711bc Mon Sep 17 00:00:00 2001 From: Tom Rondeau Date: Thu, 29 Dec 2011 18:30:27 -0500 Subject: digital: added documentation for SNR estimators; made a Doxygen group for them. Also set the alpha value to a default of 0.001; most won't need to change this. --- gr-digital/swig/digital_probe_mpsk_snr_est_c.i | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gr-digital/swig/digital_probe_mpsk_snr_est_c.i') diff --git a/gr-digital/swig/digital_probe_mpsk_snr_est_c.i b/gr-digital/swig/digital_probe_mpsk_snr_est_c.i index fe3684a81..fbe04cec2 100644 --- a/gr-digital/swig/digital_probe_mpsk_snr_est_c.i +++ b/gr-digital/swig/digital_probe_mpsk_snr_est_c.i @@ -24,7 +24,7 @@ GR_SWIG_BLOCK_MAGIC(digital,probe_mpsk_snr_est_c); digital_probe_mpsk_snr_est_c_sptr digital_make_probe_mpsk_snr_est_c(snr_est_type_t type, - double alpha); + double alpha=0.001); class digital_probe_mpsk_snr_est_c : public gr_sync_block { -- cgit From 6e52e9f86b40ccc38ee21068983936113e6b53dc Mon Sep 17 00:00:00 2001 From: Tom Rondeau Date: Fri, 30 Dec 2011 11:35:15 -0500 Subject: digital: added tag_nsamples placeholder into SNR probe block. The intent of this block is to be able to pass messages containing the SNR at a set number of samples. --- gr-digital/swig/digital_probe_mpsk_snr_est_c.i | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'gr-digital/swig/digital_probe_mpsk_snr_est_c.i') diff --git a/gr-digital/swig/digital_probe_mpsk_snr_est_c.i b/gr-digital/swig/digital_probe_mpsk_snr_est_c.i index fbe04cec2..93db4127a 100644 --- a/gr-digital/swig/digital_probe_mpsk_snr_est_c.i +++ b/gr-digital/swig/digital_probe_mpsk_snr_est_c.i @@ -24,18 +24,22 @@ GR_SWIG_BLOCK_MAGIC(digital,probe_mpsk_snr_est_c); digital_probe_mpsk_snr_est_c_sptr digital_make_probe_mpsk_snr_est_c(snr_est_type_t type, + int msg_nsamples=10000, double alpha=0.001); class digital_probe_mpsk_snr_est_c : public gr_sync_block { private: void digital_probe_mpsk_snr_est_c(snr_est_type_t type, + int msg_nsamples, double alpha); public: double snr(); snr_est_type_t type() const; + int msg_nsample() const; double alpha() const; void set_type(snr_est_type_t t); + void set_msg_nsample(int n); void set_alpha(double alpha); }; -- cgit