GNU Radio 3.6.5 C++ API

atsc_bit_timing_loop.h

Go to the documentation of this file.
00001 /* -*- c++ -*- */
00002 /*
00003  * Copyright 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 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 #ifndef INCLUDED_ATSC_BIT_TIMING_LOOP_H
00023 #define INCLUDED_ATSC_BIT_TIMING_LOOP_H
00024 
00025 #include <atsc_api.h>
00026 #include <cstdio>
00027 #include <gr_block.h>
00028 #include <atsci_diag_output.h>
00029 #include <atsci_sssr.h>
00030 #include <atsci_syminfo.h>
00031 
00032 class atsc_bit_timing_loop;
00033 typedef boost::shared_ptr<atsc_bit_timing_loop> atsc_bit_timing_loop_sptr;
00034 
00035 ATSC_API atsc_bit_timing_loop_sptr atsc_make_bit_timing_loop();
00036 
00037 /*!
00038  * \brief ATSC BitTimingLoop3
00039  * \ingroup atsc
00040  *
00041  * This class accepts a single real input and produces two outputs,
00042  *  the raw symbol (float) and the tag (atsc_syminfo)
00043  */
00044 class ATSC_API atsc_bit_timing_loop : public gr_block
00045 {
00046   friend ATSC_API atsc_bit_timing_loop_sptr atsc_make_bit_timing_loop();
00047 
00048   atsc_bit_timing_loop();
00049 
00050 public:
00051   int work (int noutput_items,
00052             gr_vector_const_void_star &input_items,
00053             gr_vector_void_star &output_items);
00054 
00055   void reset() { /* nop */ }
00056 
00057   ~atsc_bit_timing_loop () { };
00058 
00059   void forecast (int noutput_items, gr_vector_int &ninput_items_required);
00060 
00061   int  general_work (int noutput_items,
00062                      gr_vector_int &ninput_items,
00063                      gr_vector_const_void_star &input_items,
00064                      gr_vector_void_star &output_items);
00065 
00066 
00067   // debug (NOPs)
00068   void set_mu (double a_mu) {  }
00069   void set_no_update (bool a_no_update) {  }
00070   void set_loop_filter_tap (double tap)  { }
00071   void set_timing_rate (double rate)     { }
00072 
00073 
00074  protected:
00075 
00076   atsci_sssr                    d_sssr;
00077   atsci_interpolator            d_interp;
00078   unsigned long long            d_next_input;
00079   double                        d_rx_clock_to_symbol_freq;
00080   int                           d_si;
00081 
00082 
00083 };
00084 
00085 #endif /* INCLUDED_ATSC_BIT_TIMING_LOOP_H */
00086 
00087 
00088