Loading...
Searching...
No Matches
fmcomms2_sink.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_SINK_H
#define INCLUDED_IIO_FMCOMMS2_SINK_H
#include <gnuradio/hier_block2.h>
#include <gnuradio/iio/api.h>
#include <gnuradio/sync_block.h>
#include "device_sink.h"
namespace gr {
namespace iio {
/*!
* \brief Device specific sink for FMComms evaluation cards
* \ingroup iio
*
* \details
* This block is a sink 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_sink : virtual public gr::sync_block
{
public:
typedef std::shared_ptr<fmcomms2_sink<T>> sptr;
static sptr make(const std::string& uri,
const std::vector<bool>& ch_en,
unsigned long buffer_size,
bool cyclic);
/*!
* The key of the tag that indicates packet length.
* When not empty, samples are expected as "packets" and
* must be tagged as such, i.e. the first sample of a packet needs to be
* tagged with the corresponding length of that packet.
* Note, packet size MUST be equal to buffer_size / (1+interpolation),
* otherwise a runtime_error will be thrown. This is a deliberate design
* choice, because all other options would result in potentially unexpected
* behavior.
*/
virtual void set_len_tag_key(const std::string& val = "") = 0;
virtual void set_bandwidth(unsigned long bandwidth) = 0;
virtual void set_rf_port_select(const std::string& rf_port_select) = 0;
virtual void set_frequency(double frequency) = 0;
virtual void set_samplerate(unsigned long samplerate) = 0;
virtual void set_attenuation(size_t chan, double gain) = 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_sink<int16_t> fmcomms2_sink_s;
typedef fmcomms2_sink<std::complex<int16_t>> fmcomms2_sink_sc16;
typedef fmcomms2_sink<gr_complex> fmcomms2_sink_fc32;
} // namespace iio
} // namespace gr
#endif /* INCLUDED_IIO_FMCOMMS2_SINK_H */
gr::iio::fmcomms2_sink
Device specific sink for FMComms evaluation cards.
Definition fmcomms2_sink.h:35
gr::iio::fmcomms2_sink::set_len_tag_key
virtual void set_len_tag_key(const std::string &val="")=0
gr::iio::fmcomms2_sink::set_rf_port_select
virtual void set_rf_port_select(const std::string &rf_port_select)=0
gr::iio::fmcomms2_sink::sptr
std::shared_ptr< fmcomms2_sink< T > > sptr
Definition fmcomms2_sink.h:37
gr::iio::fmcomms2_sink::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_sink::set_samplerate
virtual void set_samplerate(unsigned long samplerate)=0
gr::iio::fmcomms2_sink::set_bandwidth
virtual void set_bandwidth(unsigned long bandwidth)=0
gr::iio::fmcomms2_sink::set_frequency
virtual void set_frequency(double frequency)=0
gr::iio::fmcomms2_sink::set_attenuation
virtual void set_attenuation(size_t chan, double gain)=0
gr::iio::fmcomms2_sink::make
static sptr make(const std::string &uri, const std::vector< bool > &ch_en, unsigned long buffer_size, bool cyclic)
gr::sync_block
synchronous 1:1 input to output with history
Definition sync_block.h:26
device_sink.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_sink_fc32
fmcomms2_sink< gr_complex > fmcomms2_sink_fc32
Definition fmcomms2_sink.h:69
gr::iio::fmcomms2_sink_s
fmcomms2_sink< int16_t > fmcomms2_sink_s
Definition fmcomms2_sink.h:67
gr::iio::fmcomms2_sink_sc16
fmcomms2_sink< std::complex< int16_t > > fmcomms2_sink_sc16
Definition fmcomms2_sink.h:68
gr
GNU Radio logging wrapper.
Definition basic_block.h:29
sync_block.h