3 * Copyright 2009 Free Software Foundation, Inc.
5 * This file is part of GNU Radio
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)
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.
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.
24 #ifndef INCLUDED_GR_PFB_CLOCK_SYNC_CCF_H
25 #define INCLUDED_GR_PFB_CLOCK_SYNC_CCF_H
29 class gr_pfb_clock_sync_ccf;
30 typedef boost::shared_ptr<gr_pfb_clock_sync_ccf> gr_pfb_clock_sync_ccf_sptr;
31 gr_pfb_clock_sync_ccf_sptr gr_make_pfb_clock_sync_ccf (float sps, float gain,
32 const std::vector<float> &taps,
33 unsigned int filter_size=32,
39 * \class gr_pfb_clock_sync_ccf
41 * \brief Timing synchronizer using polyphase filterbanks
47 class gr_pfb_clock_sync_ccf : public gr_block
51 * Build the polyphase filterbank timing synchronizer.
53 friend gr_pfb_clock_sync_ccf_sptr gr_make_pfb_clock_sync_ccf (float sps, float gain,
54 const std::vector<float> &taps,
55 unsigned int filter_size,
62 unsigned int d_nfilters;
63 std::vector<gr_fir_ccf*> d_filters;
64 std::vector<gr_fir_ccf*> d_diff_filters;
65 std::vector< std::vector<float> > d_taps;
66 std::vector< std::vector<float> > d_dtaps;
69 unsigned int d_start_count;
70 unsigned int d_taps_per_filter;
73 * Build the polyphase filterbank timing synchronizer.
75 gr_pfb_clock_sync_ccf (float sps, float gain,
76 const std::vector<float> &taps,
77 unsigned int filter_size,
80 void create_diff_taps(const std::vector<float> &newtaps,
81 std::vector<float> &difftaps);
84 ~gr_pfb_clock_sync_ccf ();
87 * Resets the filterbank's filter taps with the new prototype filter
89 void set_taps (const std::vector<float> &taps,
90 std::vector< std::vector<float> > &ourtaps,
91 std::vector<gr_fir_ccf*> &ourfilter);
92 std::vector<float> channel_taps(int channel);
93 std::vector<float> diff_channel_taps(int channel);
96 * Print all of the filterbank taps to screen.
99 void print_diff_taps();
101 void set_alpha(float alpha)
105 void set_beta(float beta)
110 int general_work (int noutput_items,
111 gr_vector_int &ninput_items,
112 gr_vector_const_void_star &input_items,
113 gr_vector_void_star &output_items);