Loading...
Searching...
No Matches
fmcomms2_source.h
Go to the documentation of this file.
/* -*- c++ -*- */
/*
* Copyright 2014 Analog Devices Inc.
* Author: Paul Cercueil <paul.cercueil@analog.com>
*
* SPDX-License-Identifier: GPL-3.0-or-later
*
*/
#ifndef INCLUDED_IIO_FMCOMMS2_SOURCE_H
#define INCLUDED_IIO_FMCOMMS2_SOURCE_H
#include <gnuradio/hier_block2.h>
#include <gnuradio/iio/api.h>
#include <gnuradio/sync_block.h>
#include "device_source.h"
namespace gr {
namespace iio {
/*!
* \brief Device specific source for FMComms evaluation cards
* \ingroup iio
*
* \details
* This block is a source specifically designed for FMComms2/3/4 evaluation
* cards. However, it should support any AD936x based device using an IIO
* driver.
*/
template <typename T>
class IIO_API fmcomms2_source : virtual public gr::sync_block
{
public:
typedef std::shared_ptr<fmcomms2_source> sptr;
static sptr make(const std::string& uri,
const std::vector<bool>& ch_en,
unsigned long buffer_size);
/*!
* \brief Key of the packet length tag. If empty no tag will be emitted
*/
virtual void set_len_tag_key(const std::string& len_tag_key = "packet_len") = 0;
virtual void set_frequency(double frequency) = 0;
virtual void set_samplerate(unsigned long samplerate) = 0;
virtual void set_gain_mode(size_t chan, const std::string& mode) = 0;
virtual void set_gain(size_t chan, double gain) = 0;
virtual void set_quadrature(bool quadrature) = 0;
virtual void set_rfdc(bool rfdc) = 0;
virtual void set_bbdc(bool bbdc) = 0;
virtual void set_filter_params(const std::string& filter_source,
const std::string& filter_filename = "",
float fpass = 0.0,
float fstop = 0.0) = 0;
};
typedef fmcomms2_source<int16_t> fmcomms2_source_s;
typedef fmcomms2_source<std::complex<int16_t>> fmcomms2_source_sc16;
typedef fmcomms2_source<gr_complex> fmcomms2_source_fc32;
} // namespace iio
} // namespace gr
#endif /* INCLUDED_IIO_FMCOMMS2_SOURCE_H */
gr::iio::fmcomms2_source
Device specific source for FMComms evaluation cards.
Definition fmcomms2_source.h:34
gr::iio::fmcomms2_source::set_gain
virtual void set_gain(size_t chan, double gain)=0
gr::iio::fmcomms2_source::set_rfdc
virtual void set_rfdc(bool rfdc)=0
gr::iio::fmcomms2_source::set_gain_mode
virtual void set_gain_mode(size_t chan, const std::string &mode)=0
gr::iio::fmcomms2_source::set_samplerate
virtual void set_samplerate(unsigned long samplerate)=0
gr::iio::fmcomms2_source::set_bbdc
virtual void set_bbdc(bool bbdc)=0
gr::iio::fmcomms2_source::sptr
std::shared_ptr< fmcomms2_source > sptr
Definition fmcomms2_source.h:36
gr::iio::fmcomms2_source::set_quadrature
virtual void set_quadrature(bool quadrature)=0
gr::iio::fmcomms2_source::set_filter_params
virtual void set_filter_params(const std::string &filter_source, const std::string &filter_filename="", float fpass=0.0, float fstop=0.0)=0
gr::iio::fmcomms2_source::set_frequency
virtual void set_frequency(double frequency)=0
gr::iio::fmcomms2_source::make
static sptr make(const std::string &uri, const std::vector< bool > &ch_en, unsigned long buffer_size)
gr::iio::fmcomms2_source::set_len_tag_key
virtual void set_len_tag_key(const std::string &len_tag_key="packet_len")=0
Key of the packet length tag. If empty no tag will be emitted.
gr::sync_block
synchronous 1:1 input to output with history
Definition sync_block.h:26
device_source.h
api.h
IIO_API
#define IIO_API
Definition gr-iio/include/gnuradio/iio/api.h:18
hier_block2.h
gr::iio
Definition attr_sink.h:19
gr::iio::fmcomms2_source_s
fmcomms2_source< int16_t > fmcomms2_source_s
Definition fmcomms2_source.h:60
gr::iio::fmcomms2_source_fc32
fmcomms2_source< gr_complex > fmcomms2_source_fc32
Definition fmcomms2_source.h:62
gr::iio::fmcomms2_source_sc16
fmcomms2_source< std::complex< int16_t > > fmcomms2_source_sc16
Definition fmcomms2_source.h:61
gr
GNU Radio logging wrapper.
Definition basic_block.h:29
sync_block.h