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

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

Loading...
Searching...
No Matches
attr_updater.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_ATTR_UPDATER_H
12#define INCLUDED_IIO_ATTR_UPDATER_H
13
14#include <gnuradio/block.h>
15#include <gnuradio/iio/api.h>
16
17namespace gr {
18namespace iio {
19
20/*!
21 * \brief Generic helper block to create message in a format that will be
22 * accepted by the IIO Attribute Sink Block
23 * \ingroup iio
24 *
25 * \details
26 * This block is a simple but flexible message source which can be connected to
27 * the IIO Attribute Sink block for easy interaction and real-time control of
28 * IIO driver attributes.
29 */
30 class IIO_API attr_updater : virtual public gr::block
31{
32public:
33 typedef std::shared_ptr<attr_updater> sptr;
34
35 /*!
36 * \brief Return a shared_ptr to a new instance of iio::attr_updater.
37 *
38 * \param attribute String of name of attribute to be updated
39 * \param value String of value to update the attribute too
40 * \param interval_ms Integer of interval in milliseconds to produce
41 * messages. If zero outputs will be made only on callback changes
42 * and when the flowgraph starts
43 */
44 static sptr
45 make(const std::string attribute, const std::string value, unsigned int interval_ms);
46
47 virtual void set_value(std::string value) = 0;
48};
49
50} // namespace iio
51} // namespace gr
52
53#endif /* INCLUDED_IIO_ATTR_UPDATER_H */
gr::block
The abstract base class for all 'terminal' processing blocks.
Definition gnuradio-runtime/include/gnuradio/block.h:63
gr::iio::attr_updater
Generic helper block to create message in a format that will be accepted by the IIO Attribute Sink Bl...
Definition attr_updater.h:31
gr::iio::attr_updater::set_value
virtual void set_value(std::string value)=0
gr::iio::attr_updater::make
static sptr make(const std::string attribute, const std::string value, unsigned int interval_ms)
Return a shared_ptr to a new instance of iio::attr_updater.
gr::iio::attr_updater::sptr
std::shared_ptr< attr_updater > sptr
Definition attr_updater.h:33
block.h
api.h
IIO_API
#define IIO_API
Definition gr-iio/include/gnuradio/iio/api.h:18
gr::iio
Definition attr_sink.h:19
gr
GNU Radio logging wrapper.
Definition basic_block.h:29