summaryrefslogtreecommitdiff
path: root/gr-blocks/include/gnuradio/blocks/correctiq_auto.h
blob: 2ae9864b58f6a6b15acb6bdeb5b599863b92d124 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
/* -*- c++ -*- */
/*
 * Copyright 2020 Free Software Foundation, Inc.
 *
 * This file is part of GNU Radio
 *
 * SPDX-License-Identifier: GPL-3.0-or-later
 *
 */

#ifndef INCLUDED_CORRECTIQ_CORRECTIQ_AUTO_H
#define INCLUDED_CORRECTIQ_CORRECTIQ_AUTO_H

#include <gnuradio/blocks/api.h>
#include <gnuradio/sync_block.h>

namespace gr {
namespace blocks {

/*!
 * \brief This block to removes that center frequency IQ DC spike with a slight variation.
 * \p It automatically calculates the offset then switches to straight DC offset mode to
 * \p prevent any possible IIR filtering after it's been tuned.  However, if frequency
 * \p or upstream gain is changed, it must retune, so frequency and upstream gain are
 * \p all taken as parameters and monitored for changes.
 * \ingroup iq_correction
 *
 */
class BLOCKS_API correctiq_auto : virtual public gr::sync_block
{
public:
    typedef std::shared_ptr<correctiq_auto> sptr;

    /*!
     * \brief Return a shared_ptr to a new instance of correctiq::correctiq_auto.
     *
     * To avoid accidental use of raw pointers, correctiq::correctiq_auto's
     * constructor is in a private implementation
     * class. correctiq::correctiq_auto::make is the public interface for
     * creating new instances.
     */

    virtual double get_freq() = 0;
    virtual float get_gain() = 0;

    virtual void set_freq(double newValue) = 0;
    virtual void set_gain(float newValue) = 0;

    static sptr make(double samp_rate, double freq, float gain, float sync_window);
};

} // namespace blocks
} // namespace gr

#endif /* INCLUDED_CORRECTIQ_CORRECTIQ_AUTO_H */