GNU Radio Manual and C++ API Reference 3.10.5.1
The Free & Open Software Radio Ecosystem
dds_control.h
Go to the documentation of this file.
1/* -*- c++ -*- */
2/*
3 * Copyright 2019 Analog Devices Inc.
4 * Author: Travis Collins <travis.collins@analog.com>
5 *
6 * SPDX-License-Identifier: GPL-3.0-or-later
7 *
8 */
9
10
11#ifndef INCLUDED_IIO_DDS_CONTROL_H
12#define INCLUDED_IIO_DDS_CONTROL_H
13
14#include <gnuradio/block.h>
15#include <gnuradio/iio/api.h>
16
17namespace gr {
18namespace iio {
19
20/*!
21 * \brief Control block for DDSs which are available in controlling FPGAs of
22 * certain IIO drivers
23 * \ingroup iio
24 *
25 * \details
26 * This block allow for control of multiple direct digital synthesizers (DDS)
27 * to create transmit tones. The are available in the generic AXI DAC driver
28 * from Analog Devices.
29 */
30class IIO_API dds_control : virtual public gr::block
31{
32public:
33 typedef std::shared_ptr<dds_control> sptr;
34
35 /*!
36 * \brief Return a shared_ptr to a new instance of iio::dds_control.
37 *
38 * \param uri String of the context uri
39 * \param enabled Vector of integers where individual indexes represent
40 * specific DDSs and when not zero the are enabled
41 * \param frequencies Vector of long integers where individual indexes
42 * represent specific DDS frequencies in Hz
43 * \param phases Vector of floats where individual indexes represent
44 * specific DDS phase in degrees
45 * \param scales Vector of floats where individual indexes represent
46 * specific DDS scale from 0 to 1
47 */
48 static sptr make(const std::string& uri,
49 std::vector<int> enabled,
50 std::vector<long> frequencies,
51 std::vector<float> phases,
52 std::vector<float> scales);
53
54 virtual void set_dds_confg(std::vector<long> frequencies,
55 std::vector<float> phases,
56 std::vector<float> scales) = 0;
57};
58
59} // namespace iio
60} // namespace gr
61
62#endif /* INCLUDED_IIO_DDS_CONTROL_H */
The abstract base class for all 'terminal' processing blocks.
Definition: gnuradio-runtime/include/gnuradio/block.h:63
Control block for DDSs which are available in controlling FPGAs of certain IIO drivers.
Definition: dds_control.h:31
static sptr make(const std::string &uri, std::vector< int > enabled, std::vector< long > frequencies, std::vector< float > phases, std::vector< float > scales)
Return a shared_ptr to a new instance of iio::dds_control.
virtual void set_dds_confg(std::vector< long > frequencies, std::vector< float > phases, std::vector< float > scales)=0
std::shared_ptr< dds_control > sptr
Definition: dds_control.h:33
#define IIO_API
Definition: gr-iio/include/gnuradio/iio/api.h:18
GNU Radio logging wrapper.
Definition: basic_block.h:29