GNU Radio 3.7.1 C++ API
|
00001 /* -*- c++ -*- */ 00002 /* 00003 * Copyright 2013 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_CHANNELS_FADING_MODEL_H 00024 #define INCLUDED_CHANNELS_FADING_MODEL_H 00025 00026 #include <gnuradio/channels/api.h> 00027 #include <gnuradio/sync_block.h> 00028 #include <gnuradio/types.h> 00029 00030 namespace gr { 00031 namespace channels { 00032 00033 /*! 00034 * \brief fading simulator 00035 * \ingroup channel_models_blk 00036 * 00037 * \details 00038 * This block implements a basic fading model simulator that can 00039 * be used to help evaluate, design, and test various signals, 00040 * waveforms, and algorithms. 00041 */ 00042 class CHANNELS_API fading_model : virtual public sync_block 00043 { 00044 public: 00045 // gr::channels::channel_model::sptr 00046 typedef boost::shared_ptr<fading_model> sptr; 00047 00048 /*! \brief Build the channel simulator. 00049 * 00050 * \param N The number of sinusiods to use in simulating the channel; 8 is a good value 00051 * \param fDTs normalized maximum Doppler frequency, fD * Ts 00052 * \param LOS include Line-of-Site path? selects between Rayleigh (NLOS) and Rician (LOS) models 00053 * \param K Rician factor (ratio of the specular power to the scattered power) 00054 * \param seed a random number to seed the noise generators 00055 */ 00056 static sptr make(unsigned int N, 00057 float fDTs=0.01, 00058 bool LOS=true, 00059 float K=4, 00060 int seed=0); 00061 00062 virtual float fDTs() = 0; 00063 virtual float K() = 0; 00064 virtual float step() = 0; 00065 00066 virtual void set_fDTs(float fDTs) = 0; 00067 virtual void set_K(float K) = 0; 00068 virtual void set_step(float step) = 0; 00069 00070 }; 00071 00072 } /* namespace channels */ 00073 } /* namespace gr */ 00074 00075 #endif /* INCLUDED_CHANNELS_FADING_MODEL_H */