diff options
author | Tom Rondeau <trondeau@vt.edu> | 2012-06-19 22:22:06 -0400 |
---|---|---|
committer | Tom Rondeau <trondeau@vt.edu> | 2012-06-19 22:22:06 -0400 |
commit | d8d8e992e3f94792fefa74c61d32494903f77dfb (patch) | |
tree | e164a9c2c30712dd2ccc39d17ce2ac2f6b3ae23a /gr-filter/include | |
parent | 8a0ead8481c2418560dd98d8bb64c82842a76bcc (diff) |
filter: added channel_model block with GRC.
Dummy QA test needs work.
More documentation.
Diffstat (limited to 'gr-filter/include')
-rw-r--r-- | gr-filter/include/filter/CMakeLists.txt | 1 | ||||
-rw-r--r-- | gr-filter/include/filter/channel_model.h | 63 |
2 files changed, 64 insertions, 0 deletions
diff --git a/gr-filter/include/filter/CMakeLists.txt b/gr-filter/include/filter/CMakeLists.txt index b30a1fc76d..c6bf109cde 100644 --- a/gr-filter/include/filter/CMakeLists.txt +++ b/gr-filter/include/filter/CMakeLists.txt @@ -109,6 +109,7 @@ install(FILES pfb_synthesizer_ccf.h single_pole_iir_filter_cc.h single_pole_iir_filter_ff.h + channel_model.h DESTINATION ${GR_INCLUDE_DIR}/gnuradio/filter COMPONENT "filter_devel" ) diff --git a/gr-filter/include/filter/channel_model.h b/gr-filter/include/filter/channel_model.h new file mode 100644 index 0000000000..42b8795153 --- /dev/null +++ b/gr-filter/include/filter/channel_model.h @@ -0,0 +1,63 @@ +/* -*- c++ -*- */ +/* + * Copyright 2009,2012 Free Software Foundation, Inc. + * + * This file is part of GNU Radio + * + * GNU Radio is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3, or (at your option) + * any later version. + * + * GNU Radio is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with GNU Radio; see the file COPYING. If not, write to + * the Free Software Foundation, Inc., 51 Franklin Street, + * Boston, MA 02110-1301, USA. + */ + +#ifndef INCLUDED_FILTER_CHANNEL_MODEL_H +#define INCLUDED_FILTER_CHANNEL_MODEL_H + +#include <filter/api.h> +#include <gr_hier_block2.h> +#include <gr_types.h> + +namespace gr { + namespace filter { + + /*! + * \brief channel simulator + * \ingroup misc_blk + */ + class FILTER_API channel_model : virtual public gr_hier_block2 + { + public: + // gr::filter::channel_model::sptr + typedef boost::shared_ptr<channel_model> sptr; + + static FILTER_API sptr make(double noise_voltage, + double frequency_offset, + double epsilon, + const std::vector<gr_complex> &taps, + double noise_seed=0); + + virtual void set_noise_voltage(double noise_voltage) = 0; + virtual void set_frequency_offset(double frequency_offset) = 0; + virtual void set_taps(const std::vector<gr_complex> &taps) = 0; + virtual void set_timing_offset(double epsilon) = 0; + + virtual double noise_voltage() const = 0; + virtual double frequency_offset() const = 0; + virtual std::vector<gr_complex> taps() const = 0; + virtual double timing_offset() const = 0; + }; + + } /* namespace filter */ +} /* namespace gr */ + +#endif /* INCLUDED_FILTER_CHANNEL_MODEL_H */ |