From 595fba47d534634432d4e114d31bbfa42cc00812 Mon Sep 17 00:00:00 2001 From: Brent Stapleton Date: Fri, 16 Aug 2019 17:03:47 -0700 Subject: rfnoc: adding filter_api mixin class for blocks Adding filter_node, a mixin class that provides an interface that multi_usrp_rfnoc will use to implement the filter API. --- host/include/uhd/rfnoc/filter_node.hpp | 42 ++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 host/include/uhd/rfnoc/filter_node.hpp (limited to 'host/include') diff --git a/host/include/uhd/rfnoc/filter_node.hpp b/host/include/uhd/rfnoc/filter_node.hpp new file mode 100644 index 000000000..73875e463 --- /dev/null +++ b/host/include/uhd/rfnoc/filter_node.hpp @@ -0,0 +1,42 @@ +// +// Copyright 2019 Ettus Research, a National Instruments Brand +// +// SPDX-License-Identifier: GPL-3.0-or-later +// + +#ifndef INCLUDED_LIBUHD_FILTER_NODE_HPP +#define INCLUDED_LIBUHD_FILTER_NODE_HPP + +#include +#include +#include + +namespace uhd { namespace rfnoc { namespace detail { + +// TODO: Support static filters +// TODO: User-defined (external?) filter +/*! Pure virtual mix-in class for RFNoC block controllers that have filters present. + */ +class filter_node +{ +public: + using sptr = std::shared_ptr; + + virtual std::vector get_rx_filter_names(const size_t chan) const = 0; + virtual uhd::filter_info_base::sptr get_rx_filter( + const std::string& name, const size_t chan) = 0; + virtual void set_rx_filter(const std::string& name, + uhd::filter_info_base::sptr filter, + const size_t chan) = 0; + + virtual std::vector get_tx_filter_names(const size_t chan) const = 0; + virtual uhd::filter_info_base::sptr get_tx_filter( + const std::string& name, const size_t chan) = 0; + virtual void set_tx_filter(const std::string& name, + uhd::filter_info_base::sptr filter, + const size_t chan) = 0; +}; + +}}} /* namespace uhd::rfnoc::detail */ + +#endif /* INCLUDED_LIBUHD_FILTER_NODE_HPP */ -- cgit v1.2.3