GNU Radio Manual and C++ API Reference  3.10.9.1
The Free & Open Software Radio Ecosystem
rfnoc_window.h
Go to the documentation of this file.
1 /* -*- c++ -*- */
2 /*
3  * Copyright 2019 Ettus Research, a National Instruments Brand.
4  * Copyright 2020 Free Software Foundation, Inc.
5  *
6  * SPDX-License-Identifier: GPL-3.0-or-later
7  */
8 
9 #ifndef INCLUDED_GR_UHD_RFNOC_WINDOW_H
10 #define INCLUDED_GR_UHD_RFNOC_WINDOW_H
11 
12 #include <gnuradio/uhd/api.h>
14 
15 namespace gr {
16 namespace uhd {
17 
18 /*! RFNoC Window Block
19  *
20  * \ingroup uhd_blk
21  */
22 class GR_UHD_API rfnoc_window : virtual public rfnoc_block
23 {
24 public:
25  typedef std::shared_ptr<rfnoc_window> sptr;
26 
27  /*!
28  * \param graph Reference to the rfnoc_graph object this block is attached to
29  * \param block_args Additional block arguments
30  * \param device_select Device Selection
31  * \param instance Instance Selection
32  */
33  static sptr make(rfnoc_graph::sptr graph,
34  const ::uhd::device_addr_t& block_args,
35  const int device_select,
36  const int instance);
37 
38  /*! Set the Window coefficients
39  *
40  * \param coeffs Vector of Coeffs (float)
41  * \param chan Channel Index
42  */
43  virtual void set_coefficients(const std::vector<float>& coeffs,
44  const size_t chan) = 0;
45 
46  /*! Set the Window coefficients
47  *
48  * \param coeffs Vector of Coeffs (int16)
49  * \param chan Channel Index
50  */
51  virtual void set_coefficients(const std::vector<int16_t>& coeffs,
52  const size_t chan) = 0;
53 
54  /*! Get the number of Window coefficients
55  *
56  * \param chan Channel Index
57  */
58  virtual size_t get_max_num_coefficients(const size_t chan) = 0;
59 
60  /*! Returns a vector of Window coefficients
61  *
62  * \param chan Channel Index
63  */
64  virtual std::vector<int16_t> get_coefficients(const size_t chan) = 0;
65 };
66 
67 } // namespace uhd
68 } // namespace gr
69 
70 #endif /* INCLUDED_GR_UHD_RFNOC_WINDOW_H */
Definition: rfnoc_block.h:29
std::shared_ptr< rfnoc_block > sptr
Definition: rfnoc_block.h:37
std::shared_ptr< rfnoc_graph > sptr
Definition: rfnoc_graph.h:32
Definition: rfnoc_window.h:23
virtual void set_coefficients(const std::vector< float > &coeffs, const size_t chan)=0
virtual std::vector< int16_t > get_coefficients(const size_t chan)=0
virtual void set_coefficients(const std::vector< int16_t > &coeffs, const size_t chan)=0
virtual size_t get_max_num_coefficients(const size_t chan)=0
std::shared_ptr< rfnoc_window > sptr
Definition: rfnoc_window.h:25
static sptr make(rfnoc_graph::sptr graph, const ::uhd::device_addr_t &block_args, const int device_select, const int instance)
#define GR_UHD_API
Definition: gr-uhd/include/gnuradio/uhd/api.h:18
GNU Radio logging wrapper.
Definition: basic_block.h:29