Merge commit 'v3.3.0' into upstream
[debian/gnuradio] / gr-atsc / src / lib / GrAtscBitTimingLoop3.h
1 /* -*- c++ -*- */
2 /*
3  * Copyright 2002 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 _GRATSCBITTIMINGLOOP3_H_
24 #define _GRATSCBITTIMINGLOOP3_H_
25
26 #include <cstdio>
27 #include <VrDecimatingSigProc.h>
28 #include <atsci_diag_output.h>
29 #include <atsci_sssr.h>
30 #include <atsci_syminfo.h>
31
32 /*!
33  * \brief ATSC BitTimingLoop3
34  *
35  * This class accepts a single real input and produces two outputs,
36  *  the raw symbol (float) and the tag (atsc_syminfo)
37  */
38
39 class GrAtscBitTimingLoop3 : public VrDecimatingSigProc<float,float> {
40
41  public:
42
43   GrAtscBitTimingLoop3 (double ratio_of_rx_clock_to_symbol_freq);
44   virtual ~GrAtscBitTimingLoop3 () { };
45
46   virtual const char *name () { return "GrAtscBitTimingLoop3"; }
47
48   virtual int forecast (VrSampleRange output,
49                         VrSampleRange inputs[]);
50
51   virtual int work (VrSampleRange output, void *o[],
52                     VrSampleRange inputs[], void *i[]);
53
54   // debug (NOPs)
55   void set_mu (double a_mu) {  }
56   void set_no_update (bool a_no_update) {  }
57   void set_loop_filter_tap (double tap)  { }
58   void set_timing_rate (double rate)     { }
59
60  protected:
61
62   typedef float         iType;
63   typedef float         oDataType;
64   typedef atsc::syminfo oTagType;
65
66   atsci_sssr                    d_sssr;
67   atsci_interpolator            d_interp;
68   VrSampleIndex                 d_next_input;
69   double                        d_rx_clock_to_symbol_freq;
70 };
71
72 #endif // _GRATSCBITTIMINGLOOP3_H_