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_FSF_H
00030 #define INCLUDED_GR_RATIONAL_RESAMPLER_BASE_FSF_H
00031
00032 #include <gr_block.h>
00033
00034 class gr_rational_resampler_base_fsf;
00035 typedef boost::shared_ptr<gr_rational_resampler_base_fsf> gr_rational_resampler_base_fsf_sptr;
00036 gr_rational_resampler_base_fsf_sptr
00037 gr_make_rational_resampler_base_fsf (unsigned interpolation,
00038 unsigned decimation,
00039 const std::vector<float> &taps);
00040
00041 class gr_fir_fsf;
00042
00047 class gr_rational_resampler_base_fsf : public gr_block
00048 {
00049 private:
00050 unsigned d_history;
00051 unsigned d_interpolation, d_decimation;
00052 unsigned d_ctr;
00053 std::vector<float> d_new_taps;
00054 bool d_updated;
00055 std::vector<gr_fir_fsf *> d_firs;
00056
00057 friend gr_rational_resampler_base_fsf_sptr
00058 gr_make_rational_resampler_base_fsf (unsigned interpolation, unsigned decimation, const std::vector<float> &taps);
00059
00060
00064 gr_rational_resampler_base_fsf (unsigned interpolation, unsigned decimation,
00065 const std::vector<float> &taps);
00066
00067 void install_taps (const std::vector<float> &taps);
00068
00069 public:
00070 ~gr_rational_resampler_base_fsf ();
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<float> &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