GNU Radio Manual and C++ API Reference 3.10.5.1
The Free & Open Software Radio Ecosystem
rfnoc_fir_filter.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_FIR_FILTER_H
10#define INCLUDED_GR_UHD_RFNOC_FIR_FILTER_H
11
12#include <gnuradio/uhd/api.h>
14#include <vector>
15
16namespace gr {
17namespace uhd {
18
19/*! RFNoC FIR Filter Block
20 *
21 * \ingroup uhd_blk
22 */
24{
25public:
26 typedef std::shared_ptr<rfnoc_fir_filter> sptr;
27
28 /*!
29 * \param graph Reference to the rfnoc_graph object this block is attached to
30 * \param block_args Additional block arguments
31 * \param device_select Device Selection
32 * \param instance Instance Selection
33 */
35 const ::uhd::device_addr_t& block_args,
36 const int device_select,
37 const int instance);
38
39 /*! Set the FIR Filter coefficients
40 *
41 * \param coeffs Vector of Coeffs (float)
42 * \param chan Channel Index
43 */
44 virtual void set_coefficients(const std::vector<float>& coeffs,
45 const size_t chan = 0) = 0;
46
47 /*! Set the FIR Filter coefficients
48 *
49 * \param coeffs Vector of Coeffs (int16)
50 * \param chan Channel Index
51 */
52 virtual void set_coefficients(const std::vector<int16_t>& coeffs,
53 const size_t chan = 0) = 0;
54
55 /*! Get the number of FIR Filter coefficients
56 *
57 * \param chan Channel Index
58 */
59 virtual size_t get_max_num_coefficients(const size_t chan = 0) = 0;
60
61 /*! Returns a vector of FIR Filter coefficients
62 *
63 * \param chan Channel Index
64 */
65 virtual std::vector<int16_t> get_coefficients(const size_t chan = 0) = 0;
66};
67
68} // namespace uhd
69} // namespace gr
70
71#endif /* INCLUDED_GR_UHD_RFNOC_FIR_FILTER_H */
Definition: rfnoc_block.h:26
std::shared_ptr< rfnoc_block > sptr
Definition: rfnoc_block.h:34
Definition: rfnoc_fir_filter.h:24
virtual size_t get_max_num_coefficients(const size_t chan=0)=0
std::shared_ptr< rfnoc_fir_filter > sptr
Definition: rfnoc_fir_filter.h:26
virtual void set_coefficients(const std::vector< int16_t > &coeffs, const size_t chan=0)=0
virtual void set_coefficients(const std::vector< float > &coeffs, const size_t chan=0)=0
static sptr make(rfnoc_graph::sptr graph, const ::uhd::device_addr_t &block_args, const int device_select, const int instance)
virtual std::vector< int16_t > get_coefficients(const size_t chan=0)=0
std::shared_ptr< rfnoc_graph > sptr
Definition: rfnoc_graph.h:32
#define GR_UHD_API
Definition: gr-uhd/include/gnuradio/uhd/api.h:18
GNU Radio logging wrapper.
Definition: basic_block.h:29