GNU Radio's HOWTO Package
fcdpp_control_impl.h
Go to the documentation of this file.
1 /* -*- c++ -*- */
2 /*
3  * Copyright 2018 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_CONTROL_IMPL_H
22 #define INCLUDED_FCDPROPLUS_CONTROL_IMPL_H
23 
25 
26 #ifdef SYSTEM_HIDAPI
27 #include <hidapi/hidapi.h>
28 #else
29 #include "hidapi.h"
30 #endif
31 
32 namespace gr {
33  namespace fcdproplus {
34 
36  {
37  private:
38 
39  hid_device *d_control_handle; /*!< handle to control the device, set frequency, etc */
40  unsigned char aucBuf[65]; /*!< Buffers to read/write control messages to the dongle */
41 
42  public:
45  /* Public API functions documented in include/control.h */
46  void set_freq(float freq);
47  void set_lna(int gain);
48  void set_mixer_gain(int gain);
49  void set_if_gain(int gain);
50  void set_frequency_msg(pmt::pmt_t msg);
51 
52 
53  };
54 
55  } // namespace fcdproplus
56 } // namespace gr
57 
58 #endif /* INCLUDED_FCDPROPLUS_CONTROL_H */
59 
void set_frequency_msg(pmt::pmt_t msg)
void set_mixer_gain(int gain)
Switches mixer gain onf/off.
Definition: fcd.h:29
Definition: fcdpp_control_impl.h:35
void set_if_gain(int gain)
Set If gain.
Definition: fcdpp_control.h:31
void set_freq(float freq)
Sets the frequency .
void set_lna(int gain)
Switches the LNA on/off.