GNU Radio Manual and C++ API Reference 3.10.5.1
The Free & Open Software Radio Ecosystem
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 * SPDX-License-Identifier: GPL-3.0-or-later
8 *
9 */
10
11#ifndef INCLUDED_CHANNELS_CFO_MODEL_H
12#define INCLUDED_CHANNELS_CFO_MODEL_H
13
15#include <gnuradio/sync_block.h>
16#include <gnuradio/types.h>
17
18namespace gr {
19namespace channels {
20
21/*!
22 * \brief channel simulator
23 * \ingroup channel_models_blk
24 *
25 * \details
26 * This block implements a carrier frequency offset model that
27 * can be used to simulate carrier frequency drift typically from
28 * mixer LO drift on either transmit or receive hardware.
29 *
30 * A clipped gaussian random walk process is used.
31 */
32class CHANNELS_API cfo_model : virtual public sync_block
33{
34public:
35 // gr::channels::cfo_model::sptr
36 typedef std::shared_ptr<cfo_model> sptr;
37
38 /*! \brief Build the carrier frequency offset model
39 *
40 * \param sample_rate_hz Sample rate of the input signal in Hz
41 * \param std_dev_hz Desired standard deviation of the random walk
42 process every sample in Hz
43 * \param max_dev_hz Maximum carrier frequency deviation in Hz.
44 * \param noise_seed A random number generator seed for the noise source.
45 */
46 static sptr make(double sample_rate_hz,
47 double std_dev_hz,
48 double max_dev_hz,
49 double noise_seed = 0);
50
51 virtual void set_std_dev(double _dev) = 0;
52 virtual void set_max_dev(double _dev) = 0;
53 virtual void set_samp_rate(double _rate) = 0;
54
55 virtual double std_dev() const = 0;
56 virtual double max_dev() const = 0;
57 virtual double samp_rate() const = 0;
58};
59
60} /* namespace channels */
61} /* namespace gr */
62
63#endif /* INCLUDED_CHANNELS_CFO_MODEL_H */
channel simulator
Definition: cfo_model.h:33
virtual double max_dev() const =0
static sptr make(double sample_rate_hz, double std_dev_hz, double max_dev_hz, double noise_seed=0)
Build the carrier frequency offset model.
virtual double samp_rate() const =0
virtual void set_max_dev(double _dev)=0
virtual void set_samp_rate(double _rate)=0
std::shared_ptr< cfo_model > sptr
Definition: cfo_model.h:36
virtual double std_dev() const =0
virtual void set_std_dev(double _dev)=0
synchronous 1:1 input to output with history
Definition: sync_block.h:26
#define CHANNELS_API
Definition: gr-channels/include/gnuradio/channels/api.h:18
GNU Radio logging wrapper.
Definition: basic_block.h:29