GNU Radio 3.6.3.1 C++ API
channel_model_impl.h
Go to the documentation of this file.
1 /* -*- c++ -*- */
2 /*
3  * Copyright 2009,2012 Free Software Foundation, Inc.
4  *
5  * This file is part of GNU Radio
6  *
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)
10  * any later version.
11  *
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.
16  *
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.
21  */
22 
23 #ifndef INCLUDED_FILTER_CHANNEL_MODEL_IMPL_H
24 #define INCLUDED_FILTER_CHANNEL_MODEL_IMPL_H
25 
26 #include <gr_top_block.h>
27 #include <gr_sig_source_c.h>
28 #include <gr_add_cc.h>
29 #include <gr_multiply_cc.h>
30 #include <gr_noise_source_c.h>
31 #include <filter/channel_model.h>
33 #include <filter/fir_filter_ccc.h>
34 
35 namespace gr {
36  namespace filter {
37 
39  {
40  private:
41  gr_sig_source_c_sptr d_freq_offset;
42  gr_add_cc_sptr d_noise_adder;
43  gr_noise_source_c_sptr d_noise;
44  gr_multiply_cc_sptr d_mixer_offset;
45 
46  fractional_interpolator_cc::sptr d_timing_offset;
47  fir_filter_ccc::sptr d_multipath;
48 
49  std::vector<gr_complex> d_taps;
50 
51  public:
52  channel_model_impl(double noise_voltage,
53  double frequency_offset,
54  double epsilon,
55  const std::vector<gr_complex> &taps,
56  double noise_seed);
57 
59 
60  void set_noise_voltage(double noise_voltage);
61  void set_frequency_offset(double frequency_offset);
62  void set_taps(const std::vector<gr_complex> &taps);
63  void set_timing_offset(double epsilon);
64 
65  double noise_voltage() const;
66  double frequency_offset() const;
67  std::vector<gr_complex> taps() const;
68  double timing_offset() const;
69  };
70 
71  } /* namespace filter */
72 } /* namespace gr */
73 
74 #endif /* INCLUDED_FILTER_CHANNEL_MODEL_IMPL_H */