GNU Radio's FCDPROPLUS Package
fcdproplus_impl.h
Go to the documentation of this file.
1 /* -*- c++ -*- */
2 /*
3  * Copyright 2013 Volker Schroer, DL1KSV.
4  *
5  * This 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  * This software 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 this software; 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_FCDPROPLUS_IMPL_H
22 #define INCLUDED_FCDPROPLUS_FCDPROPLUS_IMPL_H
23 
24 #include <fcdproplus/fcdproplus.h>
25 #include <gnuradio/audio/source.h>
26 #include <hidapi/hidapi.h>
27 
28 namespace gr {
29  namespace fcdproplus {
30 
31  class fcdproplus_impl : public fcdproplus
32  {
33  private:
34  gr::audio::source::sptr fcd; /*!< The audio input source */
35  hid_device *d_control_handle; /*!< handle to control the device, set frequency, etc */
36  unsigned int d_freq_req; /*!< The latest requested frequency in Khz */
37  unsigned char aucBuf[65]; /*!< Buffers to read/write control messages to the dongle */
38  int d_corr;
39  int d_unit;
40 
41 
42  public:
43  fcdproplus_impl(const std::string user_device_name,int unit);
45  /* Public API functions documented in include/fcdproplus.h */
46  void set_freq(float freq);
47  void set_lna(int gain);
48  void set_mixer_gain(int gain);
49  void set_freq_corr(int ppm);
50  void set_if_gain(int gain);
51 
52  };
53 
54  } // namespace fcdproplus
55 } // namespace gr
56 
57 #endif /* INCLUDED_FCDPROPLUS_FCDPROPLUS_IMPL_H */
58 
fcdproplus_impl(const std::string user_device_name, int unit)
void set_if_gain(int gain)
Set If gain.
void set_freq(float freq)
Set frequency with resolution defined by unit.
void set_freq_corr(int ppm)
Set new frequency correction.
Definition: fcdproplus_impl.h:31
Funcube Pro+ Dongle source block.
Definition: fcdproplus.h:46
void set_mixer_gain(int gain)
Switches mixer gain onf/off.
Definition: fcdproplus.h:30
void set_lna(int gain)
Switches the LNA on/off.