GNU Radio C++ API Reference: fmcomms2_source.h Source File

| GNU Radio C++ API Reference 3.10.12.0 The Free & Open Software Radio Ecosystem |

Loading...
Searching...
No Matches
fmcomms2_source.h
Go to the documentation of this file.
1/* -*- c++ -*- */
2/*
3 * Copyright 2014 Analog Devices Inc.
4 * Author: Paul Cercueil <paul.cercueil@analog.com>
5 *
6 * SPDX-License-Identifier: GPL-3.0-or-later
7 *
8 */
9
10
11#ifndef INCLUDED_IIO_FMCOMMS2_SOURCE_H
12#define INCLUDED_IIO_FMCOMMS2_SOURCE_H
13
14#include <gnuradio/hier_block2.h>
15#include <gnuradio/iio/api.h>
16#include <gnuradio/sync_block.h>
17
18#include "device_source.h"
19
20namespace gr {
21namespace iio {
22
23/*!
24 * \brief Device specific source for FMComms evaluation cards
25 * \ingroup iio
26 *
27 * \details
28 * This block is a source specifically designed for FMComms2/3/4 evaluation
29 * cards. However, it should support any AD936x based device using an IIO
30 * driver.
31 */
32template <typename T>
33 class IIO_API fmcomms2_source : virtual public gr::sync_block
34{
35public:
36 typedef std::shared_ptr<fmcomms2_source> sptr;
37
38 static sptr make(const std::string& uri,
39 const std::vector<bool>& ch_en,
40 unsigned long buffer_size);
41
42 /*!
43 * \brief Key of the packet length tag. If empty no tag will be emitted
44 */
45 virtual void set_len_tag_key(const std::string& len_tag_key = "packet_len") = 0;
46
47 virtual void set_frequency(double frequency) = 0;
48 virtual void set_samplerate(unsigned long samplerate) = 0;
49 virtual void set_gain_mode(size_t chan, const std::string& mode) = 0;
50 virtual void set_gain(size_t chan, double gain) = 0;
51 virtual void set_quadrature(bool quadrature) = 0;
52 virtual void set_rfdc(bool rfdc) = 0;
53 virtual void set_bbdc(bool bbdc) = 0;
54 virtual void set_filter_params(const std::string& filter_source,
55 const std::string& filter_filename = "",
56 float fpass = 0.0,
57 float fstop = 0.0) = 0;
58};
59
60 typedef fmcomms2_source<int16_t> fmcomms2_source_s;
61 typedef fmcomms2_source<std::complex<int16_t>> fmcomms2_source_sc16;
62 typedef fmcomms2_source<gr_complex> fmcomms2_source_fc32;
63
64} // namespace iio
65} // namespace gr
66
67#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