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