aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrent Stapleton <brent.stapleton@ettus.com>2019-08-16 17:03:47 -0700
committerMartin Braun <martin.braun@ettus.com>2019-11-26 11:49:34 -0800
commit595fba47d534634432d4e114d31bbfa42cc00812 (patch)
treeb8fc13dae71a7171e9d2369fe5c929562fa403dc
parentd717feaf3d6ce6f8823a6437000e0394b5b68134 (diff)
downloaduhd-595fba47d534634432d4e114d31bbfa42cc00812.tar.gz
uhd-595fba47d534634432d4e114d31bbfa42cc00812.tar.bz2
uhd-595fba47d534634432d4e114d31bbfa42cc00812.zip
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.
-rw-r--r--host/include/uhd/rfnoc/filter_node.hpp42
1 files changed, 42 insertions, 0 deletions
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 <uhd/types/filters.hpp>
+#include <string>
+#include <vector>
+
+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<filter_node>;
+
+ virtual std::vector<std::string> 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<std::string> 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 */