GNU Radio Manual and C++ API Reference  3.10.3.0
The Free & Open Software Radio Ecosystem
attr_sink_impl.h
Go to the documentation of this file.
1 /* -*- c++ -*- */
2 /*
3  * Copyright 2018 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 #ifndef INCLUDED_IIO_ATTR_SINK_IMPL_H
11 #define INCLUDED_IIO_ATTR_SINK_IMPL_H
12 
13 #include "device_source_impl.h"
14 #include <gnuradio/iio/attr_sink.h>
15 #include <iio.h>
16 #include <pmt/pmt.h>
17 
18 #include <string>
19 
20 namespace gr {
21 namespace iio {
22 
23 class attr_sink_impl : public attr_sink
24 {
25 private:
26  std::string device;
27  std::string channel;
28  std::string uri;
29  attr_type_t type;
30 
31 protected:
32  iio_context* ctx;
33  iio_device* dev;
34  iio_channel* chan;
35 
36 public:
37  attr_sink_impl(const std::string& uri,
38  const std::string& device,
39  const std::string& channel,
40  attr_type_t type,
41  bool output);
43 
45 };
46 
47 } // namespace iio
48 } // namespace gr
49 
50 #endif /* INCLUDED_IIO_ATTR_SINK_IMPL_H */
Definition: attr_sink_impl.h:24
iio_context * ctx
Definition: attr_sink_impl.h:32
attr_sink_impl(const std::string &uri, const std::string &device, const std::string &channel, attr_type_t type, bool output)
iio_channel * chan
Definition: attr_sink_impl.h:34
iio_device * dev
Definition: attr_sink_impl.h:33
void write_attribute(pmt::pmt_t pdu)
Generic writer for attributes of IIO devices.
Definition: attr_sink.h:33
attr_type_t
Definition: iio_types.h:23
GR_RUNTIME_API const pmt::pmt_t pdu()
GNU Radio logging wrapper.
Definition: basic_block.h:29
std::shared_ptr< pmt_base > pmt_t
typedef for shared pointer (transparent reference counting).
Definition: pmt.h:83