GNU Radio Manual and C++ API Reference 3.8.5.0
The Free & Open Software Radio Ecosystem
 
Loading...
Searching...
No Matches
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 * 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_SRO_MODEL_H
24#define INCLUDED_CHANNELS_SRO_MODEL_H
25
26#include <gnuradio/block.h>
28#include <gnuradio/types.h>
29
30namespace gr {
31namespace channels {
32
33/*!
34 * \brief Sample Rate Offset Model
35 * \ingroup channel_models_blk
36 *
37 * \details
38 * This block implements a model that varies sample rate offset
39 * with respect to time by performing a random walk on the
40 * interpolation rate.
41 */
42class CHANNELS_API sro_model : virtual public block
43{
44public:
45 // gr::channels::sro_model::sptr
46 typedef boost::shared_ptr<sro_model> sptr;
47
48 /*! \brief Build the sample rate offset model
49 *
50 * \param sample_rate_hz Sample rate of the input signal in Hz
51 * \param std_dev_hz Desired standard deviation of the random walk
52 process every sample in Hz
53 * \param max_dev_hz Maximum sample rate deviation from zero in Hz.
54 * \param noise_seed A random number generator seed for the noise source.
55 */
56 static sptr make(double sample_rate_hz,
57 double std_dev_hz,
58 double max_dev_hz,
59 double noise_seed = 0);
60
61 virtual void set_std_dev(double _dev) = 0;
62 virtual void set_max_dev(double _dev) = 0;
63 virtual void set_samp_rate(double _rate) = 0;
64
65 virtual double std_dev() const = 0;
66 virtual double max_dev() const = 0;
67 virtual double samp_rate() const = 0;
68};
69
70} /* namespace channels */
71} /* namespace gr */
72
73#endif /* INCLUDED_CHANNELS_SRO_MODEL_H */
The abstract base class for all 'terminal' processing blocks.
Definition block.h:72
Sample Rate Offset Model.
Definition sro_model.h:43
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
boost::shared_ptr< sro_model > sptr
Definition sro_model.h:46
virtual void set_max_dev(double _dev)=0
virtual void set_samp_rate(double _rate)=0
#define CHANNELS_API
Definition gr-channels/include/gnuradio/channels/api.h:30
GNU Radio logging wrapper for log4cpp library (C++ port of log4j)
Definition basic_block.h:46