fcdpp_impl.h
Go to the documentation of this file.
/* -*- c++ -*- */
/*
* Copyright 2020 dl1ksv.
*
* SPDX-License-Identifier: GPL-3.0-or-later
*/
#ifndef INCLUDED_FUNCUBE_FCDPP_IMPL_H
#define INCLUDED_FUNCUBE_FCDPP_IMPL_H
#include <gnuradio/audio/source.h>
#include <gnuradio/logger.h>
#include <gnuradio/prefs.h>
#include <funcube/fcdpp.h>
#include <funcube/fcdpp_control.h>
namespace gr {
namespace funcube {
class FUNCUBE_API fcdpp_impl : public fcdpp
{
private:
gr::audio::source::sptr fcd; /*!< The audio input source */
fcdpp_control::sptr fcd_control_block; /*!< The fcd control block */
double d_freq_req; /*!< The latest requested frequency in Hz */
double d_freq_corr;
int d_unit;
gr::logger_ptr d_logger;
public:
fcdpp_impl(const std::string device_name, int unit);
~fcdpp_impl();
/* Public API functions documented in include/funcube/fcdproplus.h */
void set_freq(double freq) override;
void set_lna(int gain) override;
void set_mixer_gain(int gain) override;
void set_freq_corr(double ppm) override;
void set_if_gain(int gain) override;
};
} // namespace funcube
} // namespace gr
#endif /* INCLUDED_FUNCUBE_FCDPP_IMPL_H */
FUNCUBE_API
#define FUNCUBE_API
Definition api.h:19
gr::funcube::fcd
Funcube Dongle source block.
Definition fcd.h:32
gr::funcube::fcdpp_control::sptr
std::shared_ptr< fcdpp_control > sptr
Definition fcdpp_control.h:25
gr::funcube::fcdpp_impl
Definition fcdpp_impl.h:22
gr::funcube::fcdpp_impl::~fcdpp_impl
~fcdpp_impl()
gr::funcube::fcdpp_impl::set_freq
void set_freq(double freq) override
Set frequency with resolution defined by unit.
gr::funcube::fcdpp_impl::fcdpp_impl
fcdpp_impl(const std::string device_name, int unit)
gr::funcube::fcdpp_impl::set_if_gain
void set_if_gain(int gain) override
Set If gain.
gr::funcube::fcdpp_impl::set_mixer_gain
void set_mixer_gain(int gain) override
Switches mixer gain onf/off.
gr::funcube::fcdpp_impl::set_lna
void set_lna(int gain) override
Switches the LNA on/off.
gr::funcube::fcdpp_impl::set_freq_corr
void set_freq_corr(double ppm) override
Set new frequency correction.
gr::funcube::fcdpp
Funcube Pro+ Dongle source block.
Definition fcdpp.h:31
fcdpp.h
fcdpp_control.h
gr
Definition fcd.h:14