diff options
author | jcorgan | 2008-07-22 00:07:51 +0000 |
---|---|---|
committer | jcorgan | 2008-07-22 00:07:51 +0000 |
commit | e9ef818c8afd0e32e9033522acf2e713fffa01a5 (patch) | |
tree | 0bf6eea6ecf257f28af19cca6ad3cc764e03a716 /gnuradio-core/src/lib/general | |
parent | 5c8fcd7a45f2a32589ad87e1a14c8eed30bfd006 (diff) | |
download | gnuradio-e9ef818c8afd0e32e9033522acf2e713fffa01a5.tar.gz gnuradio-e9ef818c8afd0e32e9033522acf2e713fffa01a5.tar.bz2 gnuradio-e9ef818c8afd0e32e9033522acf2e713fffa01a5.zip |
Add gr_costas_loop_cc setters and getters
git-svn-id: http://gnuradio.org/svn/gnuradio/trunk@8966 221aa14e-8319-0410-a670-987f0aec2ac5
Diffstat (limited to 'gnuradio-core/src/lib/general')
-rw-r--r-- | gnuradio-core/src/lib/general/gr_costas_loop_cc.cc | 12 | ||||
-rw-r--r-- | gnuradio-core/src/lib/general/gr_costas_loop_cc.h | 22 | ||||
-rw-r--r-- | gnuradio-core/src/lib/general/gr_costas_loop_cc.i | 7 |
3 files changed, 40 insertions, 1 deletions
diff --git a/gnuradio-core/src/lib/general/gr_costas_loop_cc.cc b/gnuradio-core/src/lib/general/gr_costas_loop_cc.cc index f9178b7a1..4e0f7e067 100644 --- a/gnuradio-core/src/lib/general/gr_costas_loop_cc.cc +++ b/gnuradio-core/src/lib/general/gr_costas_loop_cc.cc @@ -85,6 +85,18 @@ gr_costas_loop_cc::phase_detector_2(gr_complex sample) const return (sample.real()*sample.imag()); } +void +gr_costas_loop_cc::set_alpha(float alpha) +{ + d_alpha = alpha; +} + +void +gr_costas_loop_cc::set_beta(float beta) +{ + d_beta = beta; +} + int gr_costas_loop_cc::work (int noutput_items, gr_vector_const_void_star &input_items, diff --git a/gnuradio-core/src/lib/general/gr_costas_loop_cc.h b/gnuradio-core/src/lib/general/gr_costas_loop_cc.h index ff40e6608..ba4e69c88 100644 --- a/gnuradio-core/src/lib/general/gr_costas_loop_cc.h +++ b/gnuradio-core/src/lib/general/gr_costas_loop_cc.h @@ -95,7 +95,7 @@ class gr_costas_loop_cc : public gr_sync_block */ float phase_detector_4(gr_complex sample) const; // for QPSK - /*! \breif the phase detector circuit for second-order loops + /*! \brief the phase detector circuit for second-order loops * \param a complex sample * \return the phase error */ @@ -106,6 +106,26 @@ class gr_costas_loop_cc : public gr_sync_block public: + /*! \brief set the first order gain + * \param alpha + */ + void set_alpha(float alpha); + + /*! \brief get the first order gain + * + */ + float alpha() const { return d_alpha; } + + /*! \brief set the second order gain + * \param beta + */ + void set_beta(float beta); + + /*! \brief get the second order gain + * + */ + float beta() const { return d_beta; } + int work (int noutput_items, gr_vector_const_void_star &input_items, gr_vector_void_star &output_items); diff --git a/gnuradio-core/src/lib/general/gr_costas_loop_cc.i b/gnuradio-core/src/lib/general/gr_costas_loop_cc.i index 841a86b28..39f49dd4f 100644 --- a/gnuradio-core/src/lib/general/gr_costas_loop_cc.i +++ b/gnuradio-core/src/lib/general/gr_costas_loop_cc.i @@ -34,4 +34,11 @@ class gr_costas_loop_cc : public gr_sync_block private: gr_costas_loop_cc (float alpha, float beta, float max_freq, float min_freq, int order); + + public: + void set_alpha(float alpha); + float alpha(); + void set_beta(float beta); + float beta(); + }; |