summaryrefslogtreecommitdiff
path: root/gr-uhd/include/gnuradio/uhd/rfnoc_duc.h
blob: f6b12270665b7890bf1694b9f609918fe6d91a3c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
/* -*- c++ -*- */
/*
 * Copyright 2019 Ettus Research, a National Instruments Brand.
 * Copyright 2020 Free Software Foundation, Inc.
 *
 * SPDX-License-Identifier: GPL-3.0-or-later
 */

#ifndef INCLUDED_GR_UHD_RFNOC_DUC_H
#define INCLUDED_GR_UHD_RFNOC_DUC_H

#include <gnuradio/uhd/api.h>
#include <gnuradio/uhd/rfnoc_block.h>
#include <gnuradio/uhd/rfnoc_graph.h>

namespace gr {
namespace uhd {

/*! RFNoC Digital Upconverter Block
 *
 * \ingroup uhd_blk
 */
class GR_UHD_API rfnoc_duc : virtual public rfnoc_block
{
public:
    typedef boost::shared_ptr<rfnoc_duc> sptr;

    /*!
     * \param graph Reference to the rfnoc_graph object this block is attached to
     * \param block_args Additional block arguments
     * \param device_select Device Selection
     * \param instance Instance Selection
     */
    static sptr make(rfnoc_graph::sptr graph,
                     const ::uhd::device_addr_t& block_args,
                     const int device_select,
                     const int instance);

    /*! Set DDS frequency
     */
    virtual double set_freq(const double freq,
                            const size_t chan,
                            const ::uhd::time_spec_t time = ::uhd::time_spec_t::ASAP) = 0;

    /*! Set the sample rate at the input
     *
     * When the DUC block is connected to a TX streamer block, then this will
     * help with the property propagation.
     *
     * \param rate Input Sampling Rate (Hz)
     * \param chan Channel Index
     */
    virtual double set_input_rate(const double rate, const size_t chan) = 0;
};

} // namespace uhd
} // namespace gr

#endif /* INCLUDED_GR_UHD_RFNOC_DUC_H */