GNU Radio Manual and C++ API Reference  3.7.9.2
The Free & Open Software Radio Ecosystem
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
fading_model.h
Go to the documentation of this file.
1 /* -*- c++ -*- */
2 /*
3  * Copyright 2013 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_CHANNELS_FADING_MODEL_H
24 #define INCLUDED_CHANNELS_FADING_MODEL_H
25 
26 #include <gnuradio/channels/api.h>
27 #include <gnuradio/sync_block.h>
28 #include <gnuradio/types.h>
29 
30 namespace gr {
31  namespace channels {
32 
33  /*!
34  * \brief fading simulator
35  * \ingroup channel_models_blk
36  *
37  * \details
38  * This block implements a basic fading model simulator that can
39  * be used to help evaluate, design, and test various signals,
40  * waveforms, and algorithms.
41  */
42  class CHANNELS_API fading_model : virtual public sync_block
43  {
44  public:
45  // gr::channels::channel_model::sptr
46  typedef boost::shared_ptr<fading_model> sptr;
47 
48  /*! \brief Build the channel simulator.
49  *
50  * \param N the number of sinusoids to use in simulating the channel; 8 is a good value
51  * \param fDTs normalized maximum Doppler frequency, fD * Ts
52  * \param LOS include Line-of-Site path? selects between Rayleigh (NLOS) and Rician (LOS) models
53  * \param K Rician factor (ratio of the specular power to the scattered power)
54  * \param seed a random number to seed the noise generators
55  */
56  static sptr make(unsigned int N,
57  float fDTs=0.01,
58  bool LOS=true,
59  float K=4,
60  int seed=0);
61 
62  virtual float fDTs() = 0;
63  virtual float K() = 0;
64  virtual float step() = 0;
65 
66  virtual void set_fDTs(float fDTs) = 0;
67  virtual void set_K(float K) = 0;
68  virtual void set_step(float step) = 0;
69 
70  };
71 
72  } /* namespace channels */
73 } /* namespace gr */
74 
75 #endif /* INCLUDED_CHANNELS_FADING_MODEL_H */
boost::shared_ptr< fading_model > sptr
Definition: fading_model.h:46
Include this header to use the message passing features.
Definition: logger.h:131
synchronous 1:1 input to output with historyOverride work to provide the signal processing implementa...
Definition: sync_block.h:37
fading simulator
Definition: fading_model.h:42
#define CHANNELS_API
Definition: gr-channels/include/gnuradio/channels/api.h:30