aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/include/uhdlib/rfnoc
diff options
context:
space:
mode:
authorLars Amsel <lars.amsel@ni.com>2021-06-04 08:27:50 +0200
committerAaron Rossetto <aaron.rossetto@ni.com>2021-06-10 12:01:53 -0500
commit2a575bf9b5a4942f60e979161764b9e942699e1e (patch)
tree2f0535625c30025559ebd7494a4b9e7122550a73 /host/lib/include/uhdlib/rfnoc
parente17916220cc955fa219ae37f607626ba88c4afe3 (diff)
downloaduhd-2a575bf9b5a4942f60e979161764b9e942699e1e.tar.gz
uhd-2a575bf9b5a4942f60e979161764b9e942699e1e.tar.bz2
uhd-2a575bf9b5a4942f60e979161764b9e942699e1e.zip
uhd: Add support for the USRP X410
Co-authored-by: Lars Amsel <lars.amsel@ni.com> Co-authored-by: Michael Auchter <michael.auchter@ni.com> Co-authored-by: Martin Braun <martin.braun@ettus.com> Co-authored-by: Paul Butler <paul.butler@ni.com> Co-authored-by: Cristina Fuentes <cristina.fuentes-curiel@ni.com> Co-authored-by: Humberto Jimenez <humberto.jimenez@ni.com> Co-authored-by: Virendra Kakade <virendra.kakade@ni.com> Co-authored-by: Lane Kolbly <lane.kolbly@ni.com> Co-authored-by: Max Köhler <max.koehler@ni.com> Co-authored-by: Andrew Lynch <andrew.lynch@ni.com> Co-authored-by: Grant Meyerhoff <grant.meyerhoff@ni.com> Co-authored-by: Ciro Nishiguchi <ciro.nishiguchi@ni.com> Co-authored-by: Thomas Vogel <thomas.vogel@ni.com>
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