GNU Radio's GSM Package: controlled_fractional_resampler_cc_impl.h Source File

GNU Radio's GSM Package

controlled_fractional_resampler_cc_impl.h
Go to the documentation of this file.
1 /* -*- c++ -*- */
2 /* @file
3 * @author (C) 2016 by Piotr Krysik <ptrkrysik@gmail.com>
4 * @section LICENSE
5 *
6 * Gr-gsm is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 3, or (at your option)
9 * any later version.
10 *
11 * Gr-gsm is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with gr-gsm; see the file COPYING. If not, write to
18 * the Free Software Foundation, Inc., 51 Franklin Street,
19 * Boston, MA 02110-1301, USA.
20 *
21 */
22
23 #ifndef INCLUDED_GRGSM_CONTROLLED_FRACTIONAL_RESAMPLER_CC_IMPL_H
24 #define INCLUDED_GRGSM_CONTROLLED_FRACTIONAL_RESAMPLER_CC_IMPL_H
25
26 #include <grgsm/misc_utils/controlled_fractional_resampler_cc.h>
27 #include <gnuradio/filter/mmse_fir_interpolator_cc.h>
28
29 using namespace gr::filter;
30
31 namespace gr {
32 namespace gsm {
33
34 class controlled_fractional_resampler_cc_impl : public controlled_fractional_resampler_cc
35 {
36 private:
37 float d_mu;
38 float d_mu_inc;
39 mmse_fir_interpolator_cc *d_resamp;
40
41 inline uint64_t resample(const gr_complex *in,
42 uint64_t first_in_sample,
43 gr_complex *out,
44 uint64_t first_out_sample,
45 uint64_t samples_to_produce);
46
47 public:
48 controlled_fractional_resampler_cc_impl(float phase_shift,
49 float resamp_ratio);
50 ~controlled_fractional_resampler_cc_impl();
51
52 void forecast(int noutput_items,
53 gr_vector_int &ninput_items_required);
54
55 int general_work(int noutput_items,
56 gr_vector_int &ninput_items,
57 gr_vector_const_void_star &input_items,
58 gr_vector_void_star &output_items);
59
60
61 float mu() const;
62 float resamp_ratio() const;
63 void set_mu(float mu);
64 void set_resamp_ratio(float resamp_ratio);
65 };
66
67 } // namespace grgsm
68 } // namespace gr
69
70 #endif /* INCLUDED_GRGSM_CONTROLLED_FRACTIONAL_RESAMPLER_CC_IMPL_H */
71
gr::gsm::controlled_fractional_resampler_cc
<+description of block+>
Definition: controlled_fractional_resampler_cc.h:39
controlled_fractional_resampler_cc.h
gr
Definition: constants.h:29
gr::gsm::controlled_fractional_resampler_cc_impl
Definition: controlled_fractional_resampler_cc_impl.h:34
filter