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
cfo_model.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_CHANNELS_CFO_MODEL_H
24 #define INCLUDED_CHANNELS_CFO_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 channel simulator
35  * \ingroup channel_models_blk
36  *
37  * \details
38  * This block implements a carrier frequency offset model that
39  * can be used to simulate carrier frequency drift typically from
40  * mixer LO drift on either transmit or receive hardware.
41  *
42  * A clipped gaussian random walk process is used.
43  */
44  class CHANNELS_API cfo_model : virtual public sync_block
45  {
46  public:
47  // gr::channels::cfo_model::sptr
48  typedef boost::shared_ptr<cfo_model> sptr;
49 
50  /*! \brief Build the carrier frequency offset model
51  *
52  * \param sample_rate_hz Sample rate of the input signal in Hz
53  * \param std_dev_hz Desired standard deviation of the random walk
54  process every sample in Hz
55  * \param max_dev_hz Maximum carrier frequency deviation in Hz.
56  * \param noise_seed A random number generator seed for the noise source.
57  */
58  static sptr make(
59  double sample_rate_hz,
60  double std_dev_hz,
61  double max_dev_hz,
62  double noise_seed=0);
63 
64  virtual void set_std_dev(double _dev) = 0;
65  virtual void set_max_dev(double _dev) = 0;
66  virtual void set_samp_rate(double _rate) = 0;
67 
68  virtual double std_dev() const = 0;
69  virtual double max_dev() const = 0;
70  virtual double samp_rate() const = 0;
71 
72  };
73 
74  } /* namespace channels */
75 } /* namespace gr */
76 
77 #endif /* INCLUDED_CHANNELS_CFO_MODEL_H */
channel simulator
Definition: cfo_model.h:44
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
boost::shared_ptr< cfo_model > sptr
Definition: cfo_model.h:48
#define CHANNELS_API
Definition: gr-channels/include/gnuradio/channels/api.h:30