GNU Radio Manual and C++ API Reference  3.10.9.1
The Free & Open Software Radio Ecosystem
sro_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  * SPDX-License-Identifier: GPL-3.0-or-later
8  *
9  */
10 
11 #ifndef INCLUDED_CHANNELS_SRO_MODEL_H
12 #define INCLUDED_CHANNELS_SRO_MODEL_H
13 
14 #include <gnuradio/block.h>
15 #include <gnuradio/channels/api.h>
16 #include <gnuradio/types.h>
17 
18 namespace gr {
19 namespace channels {
20 
21 /*!
22  * \brief Sample Rate Offset Model
23  * \ingroup channel_models_blk
24  *
25  * \details
26  * This block implements a model that varies sample rate offset
27  * with respect to time by performing a random walk on the
28  * interpolation rate.
29  */
30 class CHANNELS_API sro_model : virtual public block
31 {
32 public:
33  // gr::channels::sro_model::sptr
34  typedef std::shared_ptr<sro_model> sptr;
35 
36  /*! \brief Build the sample rate offset model
37  *
38  * \param sample_rate_hz Sample rate of the input signal in Hz
39  * \param std_dev_hz Desired standard deviation of the random walk
40  process every sample in Hz
41  * \param max_dev_hz Maximum sample rate deviation from zero in Hz.
42  * \param noise_seed A random number generator seed for the noise source.
43  */
44  static sptr make(double sample_rate_hz,
45  double std_dev_hz,
46  double max_dev_hz,
47  double noise_seed = 0);
48 
49  virtual void set_std_dev(double _dev) = 0;
50  virtual void set_max_dev(double _dev) = 0;
51  virtual void set_samp_rate(double _rate) = 0;
52 
53  virtual double std_dev() const = 0;
54  virtual double max_dev() const = 0;
55  virtual double samp_rate() const = 0;
56 };
57 
58 } /* namespace channels */
59 } /* namespace gr */
60 
61 #endif /* INCLUDED_CHANNELS_SRO_MODEL_H */
The abstract base class for all 'terminal' processing blocks.
Definition: gnuradio-runtime/include/gnuradio/block.h:63
Sample Rate Offset Model.
Definition: sro_model.h:31
static sptr make(double sample_rate_hz, double std_dev_hz, double max_dev_hz, double noise_seed=0)
Build the sample rate offset model.
virtual double samp_rate() const =0
virtual void set_std_dev(double _dev)=0
virtual double std_dev() const =0
virtual double max_dev() const =0
virtual void set_max_dev(double _dev)=0
virtual void set_samp_rate(double _rate)=0
std::shared_ptr< sro_model > sptr
Definition: sro_model.h:34
#define CHANNELS_API
Definition: gr-channels/include/gnuradio/channels/api.h:18
GNU Radio logging wrapper.
Definition: basic_block.h:29