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
25#include <gnuradio/audio/source.h>
26#ifdef SYSTEM_HIDAPI
27
28#include <hidapi/hidapi.h>
29
30#else
31#include "hidapi.h"
32#endif
33
34namespace gr {
35 namespace fcdproplus {
36
38 {
39 private:
40 gr::audio::source::sptr fcd; /*!< The audio input source */
41 hid_device *d_control_handle; /*!< handle to control the device, set frequency, etc */
42 unsigned int d_freq_req; /*!< The latest requested frequency in Khz */
43 unsigned char aucBuf[65]; /*!< Buffers to read/write control messages to the dongle */
44 int d_corr;
45 int d_unit;
46
47
48 public:
49 fcdproplus_impl(const std::string user_device_name,int unit);
51 /* Public API functions documented in include/fcdproplus.h */
52 void set_freq(float freq);
53 void set_lna(int gain);
54 void set_mixer_gain(int gain);
55 void set_freq_corr(int ppm);
56 void set_if_gain(int gain);
57
58 };
59
60 } // namespace fcdproplus
61} // namespace gr
62
63#endif /* INCLUDED_FCDPROPLUS_FCDPROPLUS_IMPL_H */
64
Definition: fcdproplus_impl.h:38
void set_lna(int gain)
Switches the LNA on/off.
void set_freq_corr(int ppm)
Set new frequency correction.
void set_freq(float freq)
Set frequency with resolution defined by unit.
void set_if_gain(int gain)
Set If gain.
void set_mixer_gain(int gain)
Switches mixer gain onf/off.
fcdproplus_impl(const std::string user_device_name, int unit)
Funcube Pro+ Dongle source block.
Definition: fcdproplus.h:47
struct hid_device_ hid_device
Definition: hidapi.h:46
Definition: fcdproplus.h:30