Main Page | Modules | Namespace List | Class Hierarchy | Class List | File List | Class Members | File Members

gr_dd_mpsk_sync_cc.h

Go to the documentation of this file.
00001 /* -*- c++ -*- */
00002 /*
00003  * Copyright 2004,2006 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_DD_MPSK_SYNC_CC_H
00024 #define INCLUDED_GR_DD_MPSK_SYNC_CC_H
00025 
00026 #include <gr_sync_block.h>
00027 
00028 class gri_mmse_fir_interpolator_cc;
00029 
00030 class gr_dd_mpsk_sync_cc;
00031 typedef boost::shared_ptr<gr_dd_mpsk_sync_cc> gr_dd_mpsk_sync_cc_sptr;
00032 
00033 gr_dd_mpsk_sync_cc_sptr 
00034 gr_make_dd_mpsk_sync_cc (float alpha, float beta,
00035                          float max_freq, float min_freq, float ref_phase,
00036                          float omega, float gain_omega, float mu, float gain_mu);
00037 
00047 class gr_dd_mpsk_sync_cc : public gr_block
00048 {
00049   friend gr_dd_mpsk_sync_cc_sptr gr_make_dd_mpsk_sync_cc (float alpha, float beta,
00050                                                           float max_freq, float min_freq, float ref_phase,
00051                                                           float omega, float gain_omega, float mu, float gain_mu);
00052 public:
00053   ~gr_dd_mpsk_sync_cc ();
00054   void forecast(int noutput_items, gr_vector_int &ninput_items_required);
00055   float mu() const { return d_mu;}
00056   float omega() const { return d_omega;}
00057   float gain_mu() const { return d_gain_mu;}
00058   float gain_omega() const { return d_gain_omega;}
00059   
00060   void set_gain_mu (float gain_mu) { d_gain_mu = gain_mu; }
00061   void set_gain_omega (float gain_omega) { d_gain_omega = gain_omega; }
00062   void set_mu (float mu) { d_mu = mu; }
00063   void set_omega (float omega) { d_omega = omega; }
00064 
00065 protected:
00066   gr_dd_mpsk_sync_cc (float alpha, float beta, float max_freq, float min_freq, float ref_phase,
00067                       float omega, float gain_omega, float mu, float gain_mu);
00068   
00069   int general_work (int noutput_items,
00070                     gr_vector_int &ninput_items,
00071                     gr_vector_const_void_star &input_items,
00072                     gr_vector_void_star &output_items);
00073   
00074 private:
00075   static const unsigned int DLLEN = 8;  // delay line length.
00076 
00077   float d_alpha,d_beta,d_max_freq,d_min_freq,d_ref_phase;
00078   float d_omega, d_gain_omega, d_mu, d_gain_mu;
00079   float d_phase, d_freq;
00080   gr_complex slicer_45deg (gr_complex sample);
00081   gr_complex slicer_0deg (gr_complex sample);
00082   gr_complex d_last_sample;
00083   gri_mmse_fir_interpolator_cc  *d_interp;
00084   
00085   gr_complex d_dl[2 * DLLEN];   // Holds post carrier tracking samples.
00086                                 // double length delay line to avoid wraps.
00087   unsigned int d_dl_idx;        // indexes oldest sample in delay line.
00088 
00089   float phase_detector(gr_complex sample,float ref_phase);
00090 };
00091 
00092 #endif

Generated on Sat Jul 8 17:04:51 2006 for GNU Radio 2.x by  doxygen 1.4.1