GNU Radio Manual and C++ API Reference  3.7.9.2
The Free & Open Software Radio Ecosystem
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
constellation_receiver_cb.h
Go to the documentation of this file.
1 /* -*- c++ -*- */
2 /*
3  * Copyright 2011,2012 Free Software Foundation, Inc.
4  *
5  * This file is part of GNU Radio
6  *
7  * GNU Radio is free software; you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License as published by
9  * the Free Software Foundation; either version 3, or (at your option)
10  * any later version.
11  *
12  * GNU Radio is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with GNU Radio; see the file COPYING. If not, write to
19  * the Free Software Foundation, Inc., 51 Franklin Street,
20  * Boston, MA 02110-1301, USA.
21  */
22 
23 #ifndef INCLUDED_DIGITAL_CONSTELLATION_RECEIVER_CB_H
24 #define INCLUDED_DIGITAL_CONSTELLATION_RECEIVER_CB_H
25 
26 #include <gnuradio/digital/api.h>
29 #include <gnuradio/block.h>
30 
31 namespace gr {
32  namespace digital {
33 
34  /*!
35  * \brief This block makes hard decisions about the received
36  * symbols (using a constellation object) and also fine tunes
37  * phase synchronization.
38  *
39  * \details
40  *
41  * The phase and frequency synchronization are based on a Costas
42  * loop that finds the error of the incoming signal point compared
43  * to its nearest constellation point. The frequency and phase of
44  * the NCO are updated according to this error.
45  *
46  * Message Ports:
47  *
48  * set_constellation (input):
49  * Receives a PMT any containing a new gr::digital::constellation object.
50  * The PMT is cast back to a gr::digital::constellation_sptr
51  * and passes this to set_constellation.
52  *
53  * rotate_phase (input):
54  * Receives a PMT double to update the phase.
55  * The phase value passed in the message is added to the
56  * current phase of the receiver.
57  */
59  : virtual public block,
60  virtual public blocks::control_loop
61  {
62  public:
63  // gr::digital::constellation_receiver_cb::sptr
64  typedef boost::shared_ptr<constellation_receiver_cb> sptr;
65 
66  /*!
67  * \brief Constructs a constellation receiver that (phase/fine
68  * freq) synchronizes and decodes constellation points specified
69  * by a constellation object.
70  *
71  * \param constellation constellation of points for generic modulation
72  * \param loop_bw Loop bandwidth of the Costas Loop (~ 2pi/100)
73  * \param fmin minimum normalized frequency value the loop can achieve
74  * \param fmax maximum normalized frequency value the loop can achieve
75  */
76  static sptr make(constellation_sptr constellation,
77  float loop_bw, float fmin, float fmax);
78 
79  virtual void phase_error_tracking(float phase_error) = 0;
80  };
81 
82  } /* namespace digital */
83 } /* namespace gr */
84 
85 #endif /* INCLUDED_DIGITAL_CONSTELLATION_RECEIVER_CB_H */
This block makes hard decisions about the received symbols (using a constellation object) and also fi...
Definition: constellation_receiver_cb.h:58
An abstracted constellation object.
Definition: constellation.h:62
#define DIGITAL_API
Definition: gr-digital/include/gnuradio/digital/api.h:30
Include this header to use the message passing features.
Definition: logger.h:131
A second-order control loop implementation class.
Definition: control_loop.h:61
The abstract base class for all 'terminal' processing blocks.A signal processing flow is constructed ...
Definition: block.h:60
boost::shared_ptr< constellation_receiver_cb > sptr
Definition: constellation_receiver_cb.h:64