aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/include/uhdlib/rfnoc
diff options
context:
space:
mode:
Diffstat (limited to 'host/lib/include/uhdlib/rfnoc')
-rw-r--r--host/lib/include/uhdlib/rfnoc/rf_control/dboard_iface.hpp8
-rw-r--r--host/lib/include/uhdlib/rfnoc/rf_control/gain_profile_iface.hpp21
2 files changed, 29 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
index 1651a1580..b7759098a 100644
--- a/host/lib/include/uhdlib/rfnoc/rf_control/dboard_iface.hpp
+++ b/host/lib/include/uhdlib/rfnoc/rf_control/dboard_iface.hpp
@@ -7,6 +7,9 @@
#pragma once
#include <uhd/rfnoc/rf_control/core_iface.hpp>
+#include <uhd/types/direction.hpp>
+#include <uhd/types/time_spec.hpp>
+#include <uhd/types/eeprom.hpp>
#include <uhdlib/rfnoc/rf_control/gain_profile_iface.hpp>
#include <uhdlib/usrp/common/pwr_cal_mgr.hpp>
#include <memory>
@@ -36,6 +39,11 @@ public:
virtual std::vector<uhd::usrp::pwr_cal_mgr::sptr>& get_pwr_mgr(
uhd::direction_t trx) = 0;
+
+ virtual uhd::eeprom_map_t get_db_eeprom() = 0;
+
+ //! See radio_control::set_command_time()
+ virtual void set_command_time(uhd::time_spec_t time, const size_t chan) = 0;
};
}}} // namespace uhd::rfnoc::rf_control
diff --git a/host/lib/include/uhdlib/rfnoc/rf_control/gain_profile_iface.hpp b/host/lib/include/uhdlib/rfnoc/rf_control/gain_profile_iface.hpp
index f93a42936..c65b6bd25 100644
--- a/host/lib/include/uhdlib/rfnoc/rf_control/gain_profile_iface.hpp
+++ b/host/lib/include/uhdlib/rfnoc/rf_control/gain_profile_iface.hpp
@@ -6,6 +6,7 @@
#pragma once
+#include <functional>
#include <memory>
#include <string>
#include <vector>
@@ -22,6 +23,8 @@ class gain_profile_iface
{
public:
using sptr = std::shared_ptr<gain_profile_iface>;
+ using subscriber_type =
+ std::function<void(const std::string& profile, const size_t chan)>;
virtual ~gain_profile_iface() = default;
@@ -36,6 +39,13 @@ public:
/*! Return the gain profile
*/
virtual std::string get_gain_profile(const size_t chan) const = 0;
+
+ /*! Register a subscriber to a property tree node
+ *
+ * This is useful for all those cases where the gain profile is also a
+ * property in the tree, and setting it here requires also updating the tree.
+ */
+ virtual void add_subscriber(subscriber_type&& sub) = 0;
};
/*! "Default" implementation for gain_profile_iface
@@ -52,9 +62,11 @@ public:
void set_gain_profile(const std::string& profile, const size_t chan) override;
std::string get_gain_profile(const size_t chan) const override;
+ void add_subscriber(subscriber_type&& sub) override;
private:
static const std::string DEFAULT_GAIN_PROFILE;
+ subscriber_type _sub = nullptr;
};
/*! "Enumerated" implementation for gain_profile_iface
@@ -77,10 +89,19 @@ public:
std::vector<std::string> get_gain_profile_names(const size_t) const override;
+ /*! Register a subscriber to a property tree node
+ *
+ * This is useful for all those cases where the gain profile is also a
+ * property in the tree, and setting it here requires also updating the tree.
+ */
+ void add_subscriber(subscriber_type&& sub) override;
+
private:
std::vector<std::string> _possible_profiles;
std::vector<std::string> _gain_profile;
+
+ subscriber_type _sub = nullptr;
};
}}} // namespace uhd::rfnoc::rf_control