GNU Radio's HOWTO Package
fcd_impl.h
Go to the documentation of this file.
1 /* -*- c++ -*- */
2 /*
3  * Copyright 2011-2013 Free Software Foundation, Inc.
4  *
5  * GNU Radio is free software; you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License as published by
7  * the Free Software Foundation; either version 3, or (at your option)
8  * any later version.
9  *
10  * GNU Radio is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License
16  * along with GNU Radio; see the file COPYING. If not, write to
17  * the Free Software Foundation, Inc., 51 Franklin Street,
18  * Boston, MA 02110-1301, USA.
19  */
20 
21 #ifndef INCLUDED_FCDPROPLUS_FCD_IMPL_H
22 #define INCLUDED_FCDPROPLUS_FCD_IMPL_H
23 
24 #include <fcdproplus/fcd.h>
25 #include <fcdproplus/fcd_control.h>
26 #include <gnuradio/audio/source.h>
27 #include <gnuradio/logger.h>
28 #include <gnuradio/prefs.h>
29 
30 namespace gr {
31  namespace fcdproplus {
32 
33  class fcd_impl : public fcd
34  {
35  public:
36  fcd_impl(const std::string device_name = "");
37  ~fcd_impl();
38 
39  /* Public API functions documented in include/fcdproplus/fcd.h */
40  void set_freq(float freq);
41  void set_lna_gain(float gain);
42  void set_mixer_gain(float gain);
43  void set_freq_corr(int ppm);
44  void set_dc_corr(double _dci, double _dcq);
45  void set_iq_corr(double _gain, double _phase);
46 
47  private:
48  gr::audio::source::sptr fcd_audio; /*!< The audio input source */
49  int d_freq_corr; /*!< The frequency correction in ppm */
50  int d_freq_req; /*!< The latest requested frequency in Hz */
51  fcd_control::sptr fcd_control_block;/*!< The fcd control block */
52  gr::logger_ptr d_logger;
53  };
54 
55  } /* namespace fcd */
56 } /* namespace gr */
57 
58 #endif /* INCLUDED_FCDPROPLUS_FCD_IMPL_H */
void set_lna_gain(float gain)
Set LNA gain.
boost::shared_ptr< fcd_control > sptr
Definition: fcd_control.h:48
fcd_impl(const std::string device_name="")
void set_mixer_gain(float gain)
Set mixer gain.
void set_freq_corr(int ppm)
Set new frequency correction.
Funcube Dongle source block.
Definition: fcd.h:46
Definition: fcd.h:29
Definition: fcd_impl.h:33
void set_dc_corr(double _dci, double _dcq)
Set DC offset correction.
void set_freq(float freq)
Set frequency with Hz resolution.
void set_iq_corr(double _gain, double _phase)
Set IQ phase and gain balance.