GNU Radio's HNCHIIO Package
eightbit_sink.h
Go to the documentation of this file.
1/* -*- c++ -*- */
2/*
3 * Copyright 2014 Analog Devices Inc.
4 * Author: Paul Cercueil <paul.cercueil@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
23#ifndef INCLUDED_HNCHIIO_EIGHTBIT_SINK_H
24#define INCLUDED_HNCHIIO_EIGHTBIT_SINK_H
25
27#include <gnuradio/sync_block.h>
28
29#define DEFAULT_BUFFER_SIZE 0x8000
30
31extern "C" {
32 struct iio_context;
33};
34
35namespace gr {
36 namespace hnchiio {
37
38 /*!
39 * \brief <+description of block+>
40 * \ingroup hnchiio
41 *
42 */
43 class IIO_API eightbit_sink : virtual public gr::sync_block
44 {
45 public:
46 typedef std::shared_ptr<eightbit_sink> sptr;
47
48 /*!
49 * \brief Return a shared_ptr to a new instance of hnchiio::device.
50 *
51 * To avoid accidental use of raw pointers, hnchiio::device's
52 * constructor is in a private implementation
53 * class. hnchiio::device::make is the public interface for
54 * creating new instances.
55 */
56 static sptr make(const std::string &uri, const std::string &device,
57 const std::vector<std::string> &channels,
58 const std::string &device_phy,
59 const std::vector<std::string> &params,
60 unsigned int buffer_size = DEFAULT_BUFFER_SIZE,
61 unsigned int interpolation = 0, bool cyclic = false);
62
63 static sptr make_from(struct iio_context *ctx, const std::string &device,
64 const std::vector<std::string> &channels,
65 const std::string &device_phy,
66 const std::vector<std::string> &params,
67 unsigned int buffer_size = DEFAULT_BUFFER_SIZE,
68 unsigned int interpolation = 0, bool cyclic = false);
69 };
70
71 } // namespace hnchiio
72} // namespace gr
73
74#endif /* INCLUDED_HNCHIIO_EIGHTBIT_SINK_H */
75
#define IIO_API
Definition api.h:19
<+description of block+>
Definition eightbit_sink.h:44
static sptr make_from(struct iio_context *ctx, const std::string &device, const std::vector< std::string > &channels, const std::string &device_phy, const std::vector< std::string > &params, unsigned int buffer_size=DEFAULT_BUFFER_SIZE, unsigned int interpolation=0, bool cyclic=false)
static sptr make(const std::string &uri, const std::string &device, const std::vector< std::string > &channels, const std::string &device_phy, const std::vector< std::string > &params, unsigned int buffer_size=DEFAULT_BUFFER_SIZE, unsigned int interpolation=0, bool cyclic=false)
Return a shared_ptr to a new instance of hnchiio::device.
std::shared_ptr< eightbit_sink > sptr
Definition eightbit_sink.h:46
#define DEFAULT_BUFFER_SIZE
Definition device_sink.h:29
Definition device_sink.h:36
Definition device_sink.h:35