Loading...
Searching...
No Matches
attr_sink.h
Go to the documentation of this file.
/* -*- c++ -*- */
/*
* Copyright 2018 Analog Devices Inc.
* Author: Travis Collins <travis.collins@analog.com>
*
* SPDX-License-Identifier: GPL-3.0-or-later
*
*/
#ifndef INCLUDED_IIO_ATTR_SINK_H
#define INCLUDED_IIO_ATTR_SINK_H
#include <gnuradio/block.h>
#include <gnuradio/iio/api.h>
#include <gnuradio/iio/iio_types.h>
namespace gr {
namespace iio {
/*!
* \brief Generic writer for attributes of IIO devices
* \ingroup iio
*
* \details
* This block allow for updating of any IIO attribute that is writable. This
* includes channel, device, device buffer, device debug, and direct register
* attributes. All messages must be a pmt dictionary where the key is the
* attribute to update and the value is the value to be written. Messages can
* be an array of dictionaries or a single dictionary.
*/
class IIO_API attr_sink : virtual public gr::block
{
public:
typedef std::shared_ptr<attr_sink> sptr;
/*!
* \brief Return a shared_ptr to a new instance of iio::attr_sink.
*
* \param uri String of context uri
* \param device String of device name
* \param channel String of device name
* \param type Integer determining attribute type:
* 0: Channel attribute
* 1: Device attribute
* 2: Device buffer attribute
* 3: Device debug attribute
* 4: Direct register access
* \param output Boolean when True if channel attribute is an output
*/
static sptr make(const std::string& uri,
const std::string& device,
const std::string& channel,
attr_type_t type,
bool output);
};
} // namespace iio
} // namespace gr
#endif /* INCLUDED_IIO_ATTR_SINK_H */
gr::block
The abstract base class for all 'terminal' processing blocks.
Definition gnuradio-runtime/include/gnuradio/block.h:63
gr::iio::attr_sink
Generic writer for attributes of IIO devices.
Definition attr_sink.h:33
gr::iio::attr_sink::make
static sptr make(const std::string &uri, const std::string &device, const std::string &channel, attr_type_t type, bool output)
Return a shared_ptr to a new instance of iio::attr_sink.
gr::iio::attr_sink::sptr
std::shared_ptr< attr_sink > sptr
Definition attr_sink.h:35
block.h
api.h
IIO_API
#define IIO_API
Definition gr-iio/include/gnuradio/iio/api.h:18
iio_types.h
gr::iio
Definition attr_sink.h:19
gr::iio::attr_type_t
attr_type_t
Definition iio_types.h:23
gr
GNU Radio logging wrapper.
Definition basic_block.h:29