From 4c503b6ab621cb15724a6f5ddc6f399d945b42bf Mon Sep 17 00:00:00 2001 From: Alexandru Csete Date: Fri, 1 Jul 2011 11:12:47 -0700 Subject: gnuradio-core: add accessors for gain property of quadrature_demod_cf Date: Tue, 17 May 2011 21:52:02 +0200 Message-ID: From: Alexandru Csete To: patch-gnuradio@gnu.org Subject: [Patch-gnuradio] set/get gain for quadrature_demod Greetings, The attached patch adds set/get gain accessors to the quadrature_demod_cf block, inspired by the similar changes to the frequency_modulator block few days ago. Alex --- gnuradio-core/src/lib/general/gr_quadrature_demod_cf.h | 2 ++ gnuradio-core/src/lib/general/gr_quadrature_demod_cf.i | 4 ++++ 2 files changed, 6 insertions(+) (limited to 'gnuradio-core/src') diff --git a/gnuradio-core/src/lib/general/gr_quadrature_demod_cf.h b/gnuradio-core/src/lib/general/gr_quadrature_demod_cf.h index a29acd628..a7b449c0f 100644 --- a/gnuradio-core/src/lib/general/gr_quadrature_demod_cf.h +++ b/gnuradio-core/src/lib/general/gr_quadrature_demod_cf.h @@ -44,6 +44,8 @@ class gr_quadrature_demod_cf : public gr_sync_block float d_gain; public: + void set_gain(float gain) { d_gain = gain; } + float get_gain() { return d_gain; } int work (int noutput_items, gr_vector_const_void_star &input_items, diff --git a/gnuradio-core/src/lib/general/gr_quadrature_demod_cf.i b/gnuradio-core/src/lib/general/gr_quadrature_demod_cf.i index fbd45dcf8..2591e1085 100644 --- a/gnuradio-core/src/lib/general/gr_quadrature_demod_cf.i +++ b/gnuradio-core/src/lib/general/gr_quadrature_demod_cf.i @@ -27,4 +27,8 @@ gr_quadrature_demod_cf_sptr gr_make_quadrature_demod_cf (float gain); class gr_quadrature_demod_cf : public gr_sync_block { gr_quadrature_demod_cf (float gain); + +public: + void set_gain(float gain) { d_gain = gain; } + float get_gain() { return d_gain; } }; -- cgit From 33c00729c9720c2254cb0fa9daad5994aeba1ab7 Mon Sep 17 00:00:00 2001 From: Johnathan Corgan Date: Fri, 1 Jul 2011 11:19:32 -0700 Subject: gnuradio-core: use common coding style for accessor in quadrature_demod_cf --- gnuradio-core/src/lib/general/gr_quadrature_demod_cf.h | 2 +- gnuradio-core/src/lib/general/gr_quadrature_demod_cf.i | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'gnuradio-core/src') diff --git a/gnuradio-core/src/lib/general/gr_quadrature_demod_cf.h b/gnuradio-core/src/lib/general/gr_quadrature_demod_cf.h index a7b449c0f..df6de93d5 100644 --- a/gnuradio-core/src/lib/general/gr_quadrature_demod_cf.h +++ b/gnuradio-core/src/lib/general/gr_quadrature_demod_cf.h @@ -45,7 +45,7 @@ class gr_quadrature_demod_cf : public gr_sync_block public: void set_gain(float gain) { d_gain = gain; } - float get_gain() { return d_gain; } + float gain() const { return d_gain; } int work (int noutput_items, gr_vector_const_void_star &input_items, diff --git a/gnuradio-core/src/lib/general/gr_quadrature_demod_cf.i b/gnuradio-core/src/lib/general/gr_quadrature_demod_cf.i index 2591e1085..d9f338daa 100644 --- a/gnuradio-core/src/lib/general/gr_quadrature_demod_cf.i +++ b/gnuradio-core/src/lib/general/gr_quadrature_demod_cf.i @@ -30,5 +30,5 @@ class gr_quadrature_demod_cf : public gr_sync_block public: void set_gain(float gain) { d_gain = gain; } - float get_gain() { return d_gain; } + float gain() const { return d_gain; } }; -- cgit