00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029 #ifndef INCLUDED_GR_RATIONAL_RESAMPLER_BASE_CCC_H
00030 #define INCLUDED_GR_RATIONAL_RESAMPLER_BASE_CCC_H
00031
00032 #include <gr_block.h>
00033
00034 class gr_rational_resampler_base_ccc;
00035 typedef boost::shared_ptr<gr_rational_resampler_base_ccc> gr_rational_resampler_base_ccc_sptr;
00036 gr_rational_resampler_base_ccc_sptr
00037 gr_make_rational_resampler_base_ccc (unsigned interpolation,
00038 unsigned decimation,
00039 const std::vector<gr_complex> &taps);
00040
00041 class gr_fir_ccc;
00042
00047 class gr_rational_resampler_base_ccc : public gr_block
00048 {
00049 private:
00050 unsigned d_history;
00051 unsigned d_interpolation, d_decimation;
00052 unsigned d_ctr;
00053 std::vector<gr_complex> d_new_taps;
00054 bool d_updated;
00055 std::vector<gr_fir_ccc *> d_firs;
00056
00057 friend gr_rational_resampler_base_ccc_sptr
00058 gr_make_rational_resampler_base_ccc (unsigned interpolation, unsigned decimation, const std::vector<gr_complex> &taps);
00059
00060
00064 gr_rational_resampler_base_ccc (unsigned interpolation, unsigned decimation,
00065 const std::vector<gr_complex> &taps);
00066
00067 void install_taps (const std::vector<gr_complex> &taps);
00068
00069 public:
00070 ~gr_rational_resampler_base_ccc ();
00071 unsigned history () const { return d_history; }
00072 void set_history (unsigned history) { d_history = history; }
00073
00074 unsigned interpolation() const { return d_interpolation; }
00075 unsigned decimation() const { return d_decimation; }
00076
00077 void set_taps (const std::vector<gr_complex> &taps);
00078
00079 void forecast (int noutput_items, gr_vector_int &ninput_items_required);
00080 int general_work (int noutput_items,
00081 gr_vector_int &ninput_items,
00082 gr_vector_const_void_star &input_items,
00083 gr_vector_void_star &output_items);
00084 };
00085
00086
00087 #endif