aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/include/uhdlib/rfnoc/rf_control/dboard_iface.hpp
diff options
context:
space:
mode:
authorLane Kolbly <lane.kolbly@ni.com>2020-06-18 17:46:06 -0500
committerAaron Rossetto <aaron.rossetto@ni.com>2021-01-11 12:26:00 -0600
commit12673d9290319d2453fedd806ddf248d3d5586e3 (patch)
tree811016297552c5358129aecb5953a0c143229e86 /host/lib/include/uhdlib/rfnoc/rf_control/dboard_iface.hpp
parentc9b35e3b7107ab82c0e3978b7cbfd76ba98e2407 (diff)
downloaduhd-12673d9290319d2453fedd806ddf248d3d5586e3.tar.gz
uhd-12673d9290319d2453fedd806ddf248d3d5586e3.tar.bz2
uhd-12673d9290319d2453fedd806ddf248d3d5586e3.zip
uhd: Split radio_control into rf_control interfaces
These rf_control interfaces allow easier implementation of radio controls as well as allowing easier sharing of code for implementing e.g. gain_profile.
Diffstat (limited to 'host/lib/include/uhdlib/rfnoc/rf_control/dboard_iface.hpp')
-rw-r--r--host/lib/include/uhdlib/rfnoc/rf_control/dboard_iface.hpp41
1 files changed, 41 insertions, 0 deletions
diff --git a/host/lib/include/uhdlib/rfnoc/rf_control/dboard_iface.hpp b/host/lib/include/uhdlib/rfnoc/rf_control/dboard_iface.hpp
new file mode 100644
index 000000000..1651a1580
--- /dev/null
+++ b/host/lib/include/uhdlib/rfnoc/rf_control/dboard_iface.hpp
@@ -0,0 +1,41 @@
+//
+// Copyright 2020 Ettus Research, a National Instruments Brand
+//
+// SPDX-License-Identifier: GPL-3.0-or-later
+//
+
+#pragma once
+
+#include <uhd/rfnoc/rf_control/core_iface.hpp>
+#include <uhdlib/rfnoc/rf_control/gain_profile_iface.hpp>
+#include <uhdlib/usrp/common/pwr_cal_mgr.hpp>
+#include <memory>
+
+namespace uhd { namespace rfnoc { namespace rf_control {
+
+/*! Interface that daughterboards expose to the motherboard radio_control
+ *
+ * This interface contains everything required for a daughterboard to implement
+ * all the methods required for radio_control. For the most part, this class
+ * just includes accessors to objects which implement the required functionality.
+ * This class also directly implements core_iface for the remainder.
+ */
+class dboard_iface : public core_iface
+{
+public:
+ using sptr = std::shared_ptr<dboard_iface>;
+
+ virtual ~dboard_iface() = default;
+
+ virtual gain_profile_iface::sptr get_tx_gain_profile_api() = 0;
+ virtual gain_profile_iface::sptr get_rx_gain_profile_api() = 0;
+
+ virtual size_t get_chan_from_dboard_fe(
+ const std::string&, uhd::direction_t) const = 0;
+ virtual std::string get_dboard_fe_from_chan(size_t chan, uhd::direction_t) const = 0;
+
+ virtual std::vector<uhd::usrp::pwr_cal_mgr::sptr>& get_pwr_mgr(
+ uhd::direction_t trx) = 0;
+};
+
+}}} // namespace uhd::rfnoc::rf_control