GNU Radio's FUNCUBE Package
fcd_impl.h
Go to the documentation of this file.
1 /* -*- c++ -*- */
2 /*
3  * Copyright 2020 dl1ksv.
4  *
5  * SPDX-License-Identifier: GPL-3.0-or-later
6  */
7 
8 #ifndef INCLUDED_FUNCUBE_FCD_IMPL_H
9 #define INCLUDED_FUNCUBE_FCD_IMPL_H
10 
11 #include <gnuradio/audio/source.h>
12 #include <gnuradio/logger.h>
13 #include <gnuradio/prefs.h>
14 #include <funcube/fcd.h>
15 #include <funcube/fcd_control.h>
16 namespace gr {
17 namespace funcube {
18 
19 class fcd_impl : public fcd
20 {
21 private:
22  // Nothing to declare in this block.
23 
24 public:
25  fcd_impl(const std::string device_name = "");
27  /* Public API functions documented in include/fcdproplus/fcd.h */
28  void set_freq(float freq);
29  void set_lna_gain(float gain);
30  void set_mixer_gain(float gain);
31  void set_freq_corr(int ppm);
32  void set_dc_corr(double _dci, double _dcq);
33  void set_iq_corr(double _gain, double _phase);
34 
35 private:
36  gr::audio::source::sptr fcd_audio; /*!< The audio input source */
37  int d_freq_corr; /*!< The frequency correction in ppm */
38  int d_freq_req; /*!< The latest requested frequency in Hz */
39  fcd_control::sptr fcd_control_block; /*!< The fcd control block */
40  gr::logger_ptr d_logger;
41 };
42 
43 } // namespace funcube
44 } // namespace gr
45 
46 #endif /* INCLUDED_FUNCUBE_FCD_IMPL_H */
std::shared_ptr< fcd_control > sptr
Definition: fcd_control.h:25
Definition: fcd_impl.h:20
void set_mixer_gain(float gain)
Set mixer gain.
void set_freq(float freq)
Set frequency with Hz resolution.
void set_iq_corr(double _gain, double _phase)
Set IQ phase and gain balance.
fcd_impl(const std::string device_name="")
void set_lna_gain(float gain)
Set LNA gain.
void set_freq_corr(int ppm)
Set new frequency correction.
void set_dc_corr(double _dci, double _dcq)
Set DC offset correction.
Funcube Dongle source block.
Definition: fcd.h:32
Definition: fcd.h:14