GNU Radio's IIO Package
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 * This is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 3, or (at your option)
9 * any later version.
10 *
11 * This software is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this software; see the file COPYING. If not, write to
18 * the Free Software Foundation, Inc., 51 Franklin Street,
19 * Boston, MA 02110-1301, USA.
20 */
21
22#ifndef INCLUDED_IIO_ATTR_SINK_IMPL_H
23#define INCLUDED_IIO_ATTR_SINK_IMPL_H
24
25#include <iio.h>
26#include <iio/attr_sink.h>
27#include <pmt/pmt.h>
28
29#include "device_source_impl.h"
30
31namespace gr {
32 namespace iio {
33
35 {
36 private:
37 std::string device;
38 std::string channel;
39 std::string uri;
40 int type;
41 bool output;
42 bool required_enable;
43 bool retry;
44
45 protected:
46 struct iio_context *ctx;
47 struct iio_device *dev;
48 struct iio_channel * chan;
49
50 public:
51 attr_sink_impl(const std::string &uri, const std::string &device,
52 const std::string &channel, int type, bool output, bool required_enable, bool retry);
54
55 void write_attribute(pmt::pmt_t pdu);
56 };
57
58 } // namespace iio
59} // namespace gr
60
61#endif /* INCLUDED_IIO_ATTR_SINK_IMPL_H */
struct iio_device * dev
Definition attr_sink_impl.h:47
struct iio_context * ctx
Definition attr_sink_impl.h:46
struct iio_channel * chan
Definition attr_sink_impl.h:48
attr_sink_impl(const std::string &uri, const std::string &device, const std::string &channel, int type, bool output, bool required_enable, bool retry)
void write_attribute(pmt::pmt_t pdu)
<+description of block+>
Definition attr_sink.h:38
Definition attr_sink.h:30
Definition attr_sink.h:29