GNU Radio 3.7.0 C++ API
constellation_receiver_cb.h
Go to the documentation of this file.
00001 /* -*- c++ -*- */
00002 /*
00003  * Copyright 2011,2012 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 3, 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., 51 Franklin Street,
00020  * Boston, MA 02110-1301, USA.
00021  */
00022 
00023 #ifndef INCLUDED_DIGITAL_CONSTELLATION_RECEIVER_CB_H
00024 #define INCLUDED_DIGITAL_CONSTELLATION_RECEIVER_CB_H
00025 
00026 #include <gnuradio/digital/api.h>
00027 #include <gnuradio/digital/constellation.h>
00028 #include <gnuradio/block.h>
00029 
00030 namespace gr {
00031   namespace digital {
00032 
00033     /*!
00034      * \brief This block makes hard decisions about the received
00035      * symbols (using a constellation object) and also fine tunes
00036      * phase synchronization.
00037      *
00038      * \details
00039      *
00040      * The phase and frequency synchronization are based on a Costas
00041      * loop that finds the error of the incoming signal point compared
00042      * to its nearest constellation point. The frequency and phase of
00043      * the NCO are updated according to this error.
00044      */
00045     class DIGITAL_API constellation_receiver_cb
00046       : virtual public block
00047     {
00048     public:
00049       // gr::digital::constellation_receiver_cb::sptr
00050       typedef boost::shared_ptr<constellation_receiver_cb> sptr;
00051 
00052       /*!
00053        * \brief Constructor to synchronize incoming M-PSK symbols
00054        *
00055        * \param constellation constellation of points for generic modulation
00056        * \param loop_bw Loop  bandwidth of the Costas Loop (~ 2pi/100)
00057        * \param fmin          minimum normalized frequency value the loop can achieve
00058        * \param fmax          maximum normalized frequency value the loop can achieve
00059        *
00060        * The constructor chooses which phase detector and decision
00061        * maker to use in the work loop based on the value of M.
00062        */
00063       static sptr make(constellation_sptr constellation, 
00064                        float loop_bw, float fmin, float fmax);
00065 
00066       virtual void phase_error_tracking(float phase_error) = 0;
00067     };
00068 
00069   } /* namespace digital */
00070 } /* namespace gr */
00071 
00072 #endif /* INCLUDED_DIGITAL_CONSTELLATION_RECEIVER_CB_H */