gr-baz Package
pll_carriertracking_cc_impl.h
Go to the documentation of this file.
1 /* -*- c++ -*- */
2 /*
3  * Copyright 2004,2006,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_ANALOG_PLL_CARRIERTRACKING_CC_IMPL_H
24 #define INCLUDED_ANALOG_PLL_CARRIERTRACKING_CC_IMPL_H
25 
27 #include <gri_control_loop.h>
28 
29 namespace gr {
30  namespace analog {
31 
34  {
35  private:
36  float d_locksig,d_lock_threshold;
37  bool d_squelch_enable;
38 
39  float mod_2pi(float in);
40  float phase_detector(gr_complex sample,float ref_phase);
41 
42  public:
43  pll_carriertracking_cc_impl(float loop_bw, float max_freq, float min_freq);
45 
46  bool lock_detector(void);
47  bool squelch_enable(bool);
48  float set_lock_threshold(float);
49 
50  void set_loop_bandwidth(float bw);
51  void set_damping_factor(float df);
52  void set_alpha(float alpha);
53  void set_beta(float beta);
54  void set_frequency(float freq);
55  void set_phase(float phase);
56  void set_min_freq(float freq);
57  void set_max_freq(float freq);
58 
59  float get_loop_bandwidth() const;
60  float get_damping_factor() const;
61  float get_alpha() const;
62  float get_beta() const;
63  float get_frequency() const;
64  float get_phase() const;
65  float get_min_freq() const;
66  float get_max_freq() const;
67 
68  int work(int noutput_items,
69  gr_vector_const_void_star &input_items,
70  gr_vector_void_star &output_items);
71  };
72 
73  } /* namespace analog */
74 } /* namespace gr */
75 
76 #endif /* INCLUDED_ANALOG_PLL_CARRIERTRACKING_CC_IMPL_H */