GNU Radio's M2K Package
analog_out_sink.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_ANALOG_OUT_SINK_H
9#define INCLUDED_M2K_ANALOG_OUT_SINK_H
10
11#include <gnuradio/m2k/api.h>
12#include <gnuradio/sync_block.h>
13#include <libm2k/m2k.hpp>
14
15
16namespace gr {
17 namespace m2k {
18
19
20 /*!
21 * \brief Sink for ADALM2000 with buffered input channels
22 * \ingroup m2k
23 *
24 *\details
25 * This block allows for streaming data to ADALM2000
26 */
27 class M2K_API analog_out_sink : virtual public gr::sync_block {
28 public:
29 typedef std::shared_ptr <analog_out_sink> sptr;
30
31 /*!
32 * \brief Return a shared_ptr to a new instance of m2k::analog_out_sink.
33 *
34 * \param uri String of the context uri
35 * \param buffer_size Integer number of samples to be put into each buffered
36 * \param sampling_frequency List of frequency at which the hardware will output samples
37 * \param oversampling_ratio List of integer numbers representing the oversampling factors
38 * \param kernel_buffers List of integer values representing the number of the internal buffers
39 * \param cyclic List of cyclic modes (1 = cyclic, 0 = non-cyclic)
40 * \param calibrate_DAC Boolean value for deciding if both DACs should be calibrated
41 * \param input_voltage Boolean value for setting the input type: voltage/raw
42 */
43 static sptr make(const std::string &uri,
44 const int buffer_size,
45 std::vector<double> sampling_frequency,
46 std::vector<int> oversampling_ratio,
47 const std::vector<int> &kernel_buffers,
48 const std::vector<int> &cyclic,
49 bool calibrate_DAC,
50 bool input_voltage);
51
52 virtual void set_params(std::vector<double> sampling_frequency,
53 std::vector<int> oversampling_ratio) = 0;
54 };
55
56
57 } // namespace m2k
58} // namespace gr
59
60#endif /* INCLUDED_M2K_ANALOG_OUT_SINK_H */
#define M2K_API
Definition api.h:19
Sink for ADALM2000 with buffered input channels.
Definition analog_out_sink.h:27
virtual void set_params(std::vector< double > sampling_frequency, std::vector< int > oversampling_ratio)=0
std::shared_ptr< analog_out_sink > sptr
Definition analog_out_sink.h:29
static sptr make(const std::string &uri, const int buffer_size, std::vector< double > sampling_frequency, std::vector< int > oversampling_ratio, const std::vector< int > &kernel_buffers, const std::vector< int > &cyclic, bool calibrate_DAC, bool input_voltage)
Return a shared_ptr to a new instance of m2k::analog_out_sink.
Definition adf4350_sink.h:15
Definition adf4350_sink.h:14