gr_clock_recovery_mm_cc.h

Go to the documentation of this file.
00001 /* -*- c++ -*- */
00002 /*
00003  * Copyright 2004 Free Software Foundation, Inc.
00004  *
00005  * This file is part of GNU Radio
00006  *
00007  * GNU Radio is free software; you can redistribute it and/or modify
00008  * it under the terms of the GNU General Public License as published by
00009  * the Free Software Foundation; either version 2, or (at your option)
00010  * any later version.
00011  *
00012  * GNU Radio is distributed in the hope that it will be useful,
00013  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00014  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00015  * GNU General Public License for more details.
00016  *
00017  * You should have received a copy of the GNU General Public License
00018  * along with GNU Radio; see the file COPYING.  If not, write to
00019  * the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
00020  * Boston, MA 02111-1307, USA.
00021  */
00022 
00023 #ifndef INCLUDED_GR_CLOCK_RECOVERY_MM_CC_H
00024 #define INCLUDED_GR_CLOCK_RECOVERY_MM_CC_H
00025 
00026 #include <gr_block.h>
00027 #include <gr_complex.h>
00028 
00029 class gri_mmse_fir_interpolator_cc;
00030 
00031 class gr_clock_recovery_mm_cc;
00032 typedef boost::shared_ptr<gr_clock_recovery_mm_cc> gr_clock_recovery_mm_cc_sptr;
00033 
00034 // public constructor
00035 gr_clock_recovery_mm_cc_sptr 
00036 gr_make_clock_recovery_mm_cc (float omega, float gain_omega, float mu, float gain_mu);
00037 
00048 class gr_clock_recovery_mm_cc : public gr_block
00049 {
00050  public:
00051   ~gr_clock_recovery_mm_cc ();
00052   void forecast(int noutput_items, gr_vector_int &ninput_items_required);
00053   int general_work (int noutput_items,
00054                     gr_vector_int &ninput_items,
00055                     gr_vector_const_void_star &input_items,
00056                     gr_vector_void_star &output_items);
00057   float mu() const { return d_mu;}
00058   float omega() const { return d_omega;}
00059   float gain_mu() const { return d_gain_mu;}
00060   float gain_omega() const { return d_gain_omega;}
00061   void set_verbose (bool verbose) { d_verbose = verbose; }
00062 
00063   void set_gain_mu (float gain_mu) { d_gain_mu = gain_mu; }
00064   void set_gain_omega (float gain_omega) { d_gain_omega = gain_omega; }
00065   void set_mu (float mu) { d_mu = mu; }
00066   void set_omega (float omega) { d_omega = omega; }
00067 
00068 protected:
00069   gr_clock_recovery_mm_cc (float omega, float gain_omega, float mu, float gain_mu);
00070 
00071  private:
00072   float                         d_mu;
00073   float                         d_omega;
00074   float                         d_gain_omega;
00075   float                         d_gain_mu;
00076   gr_complex                    d_last_sample;
00077   gri_mmse_fir_interpolator_cc  *d_interp;
00078   bool                          d_verbose;
00079 
00080 
00081   gr_complex slicer_0deg (gr_complex sample);
00082   gr_complex slicer_45deg (gr_complex sample);
00083 
00084   friend gr_clock_recovery_mm_cc_sptr
00085   gr_make_clock_recovery_mm_cc (float omega, float gain_omega, float mu, float gain_mu);
00086 };
00087 
00088 #endif

Generated on Mon Sep 18 14:57:46 2006 for GNU Radio 2.x by  doxygen 1.4.7