GNU Radio C++ API Reference: cfo_model.h Source File

| GNU Radio C++ API Reference 3.10.12.0 The Free & Open Software Radio Ecosystem |

Loading...
Searching...
No Matches
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
14#include <gnuradio/channels/api.h>
15#include <gnuradio/sync_block.h>
16#include <gnuradio/types.h>
17
18namespace gr {
19 namespace 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 */
32 class 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 */
gr::channels::cfo_model
channel simulator
Definition cfo_model.h:33
gr::channels::cfo_model::max_dev
virtual double max_dev() const =0
gr::channels::cfo_model::make
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.
gr::channels::cfo_model::samp_rate
virtual double samp_rate() const =0
gr::channels::cfo_model::set_max_dev
virtual void set_max_dev(double _dev)=0
gr::channels::cfo_model::set_samp_rate
virtual void set_samp_rate(double _rate)=0
gr::channels::cfo_model::sptr
std::shared_ptr< cfo_model > sptr
Definition cfo_model.h:36
gr::channels::cfo_model::std_dev
virtual double std_dev() const =0
gr::channels::cfo_model::set_std_dev
virtual void set_std_dev(double _dev)=0
gr::sync_block::sync_block
sync_block(void)
Definition sync_block.h:28
api.h
CHANNELS_API
#define CHANNELS_API
Definition gr-channels/include/gnuradio/channels/api.h:18
gr::channels
Definition cfo_model.h:19
gr
GNU Radio logging wrapper.
Definition basic_block.h:29
sync_block.h
types.h