GNU Radio's M2K Package
digital_in_source.h
Go to the documentation of this file.
1/* -*- c++ -*- */
2/*
3 * Copyright 2022 Analog Devices Inc..
4 *
5 * SPDX-License-Identifier: GPL-3.0-or-later
6 */
7
8#ifndef INCLUDED_M2K_DIGITAL_IN_SOURCE_H
9#define INCLUDED_M2K_DIGITAL_IN_SOURCE_H
10
11#include <gnuradio/m2k/api.h>
12#include <gnuradio/sync_block.h>
13#include <libm2k/m2k.hpp>
14
15namespace gr {
16 namespace m2k {
17
18 /*!
19 * \brief Source for ADALM2000 with buffered output channels
20 * \ingroup m2k
21 *
22 * \details
23 * This block allows for streaming digital data from ADALM2000
24 */
25 class M2K_API digital_in_source : virtual public gr::sync_block {
26 public:
27 typedef std::shared_ptr <digital_in_source> sptr;
28
29 /*!
30 * \brief Return a shared_ptr to a new instance of m2k::digital_in_source.
31 */
32 static sptr make(const std::string &uri,
33 int buffer_size,
34 int channel,
35 double sampling_frequency,
36 int kernel_buffers,
37 bool streaming,
38 bool deinit = true,
39 double data_rate = 0);
40
41 static sptr make_from(libm2k::context::M2k *context,
42 int buffer_size,
43 int channel,
44 double sampling_frequency,
45 int kernel_buffers,
46 bool streaming,
47 bool deinit = true,
48 double data_rate = 0);
49
50 virtual void set_params(double sampling_frequency, bool streaming) = 0;
51
52 virtual void set_data_rate(double rate) = 0;
53
54 virtual void set_timeout_ms(unsigned int timeout) = 0;
55
56 virtual void set_buffer_size(int buffer_size) = 0;
57
58 };
59 } // namespace m2k
60} // namespace gr
61
62#endif /* INCLUDED_M2K_DIGITAL_IN_SOURCE_H */
#define M2K_API
Definition api.h:19
Source for ADALM2000 with buffered output channels.
Definition digital_in_source.h:25
virtual void set_buffer_size(int buffer_size)=0
virtual void set_params(double sampling_frequency, bool streaming)=0
std::shared_ptr< digital_in_source > sptr
Definition digital_in_source.h:27
static sptr make(const std::string &uri, int buffer_size, int channel, double sampling_frequency, int kernel_buffers, bool streaming, bool deinit=true, double data_rate=0)
Return a shared_ptr to a new instance of m2k::digital_in_source.
virtual void set_timeout_ms(unsigned int timeout)=0
virtual void set_data_rate(double rate)=0
static sptr make_from(libm2k::context::M2k *context, int buffer_size, int channel, double sampling_frequency, int kernel_buffers, bool streaming, bool deinit=true, double data_rate=0)
Definition adf4350_sink.h:15
Definition adf4350_sink.h:14