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