GNU Radio 3.6.5 C++ API

channel_model_impl.h

Go to the documentation of this file.
00001 /* -*- c++ -*- */
00002 /*
00003  * Copyright 2009,2012 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 
00023 #ifndef INCLUDED_FILTER_CHANNEL_MODEL_IMPL_H
00024 #define INCLUDED_FILTER_CHANNEL_MODEL_IMPL_H
00025 
00026 #include <gr_top_block.h>
00027 #include <gr_sig_source_c.h>
00028 #include <gr_add_cc.h>
00029 #include <gr_multiply_cc.h>
00030 #include <gr_noise_source_c.h>
00031 #include <filter/channel_model.h>
00032 #include <filter/fractional_interpolator_cc.h>
00033 #include <filter/fir_filter_ccc.h>
00034 
00035 namespace gr {
00036   namespace filter {
00037 
00038     class FILTER_API channel_model_impl : public channel_model
00039     {
00040     private:
00041       gr_sig_source_c_sptr d_freq_offset;
00042       gr_add_cc_sptr d_noise_adder;
00043       gr_noise_source_c_sptr d_noise;
00044       gr_multiply_cc_sptr d_mixer_offset;
00045 
00046       fractional_interpolator_cc::sptr d_timing_offset;
00047       fir_filter_ccc::sptr d_multipath;
00048 
00049       std::vector<gr_complex> d_taps;
00050 
00051     public:
00052       channel_model_impl(double noise_voltage,
00053                          double frequency_offset,
00054                          double epsilon,
00055                          const std::vector<gr_complex> &taps,
00056                          double noise_seed);
00057       
00058       ~channel_model_impl();
00059 
00060       void set_noise_voltage(double noise_voltage);
00061       void set_frequency_offset(double frequency_offset);
00062       void set_taps(const std::vector<gr_complex> &taps);
00063       void set_timing_offset(double epsilon);
00064 
00065       double noise_voltage() const;
00066       double frequency_offset() const;
00067       std::vector<gr_complex> taps() const;
00068       double timing_offset() const;
00069     };
00070 
00071   } /* namespace filter */
00072 } /* namespace gr */
00073 
00074 #endif /* INCLUDED_FILTER_CHANNEL_MODEL_IMPL_H */