From 7a22e715c9329f0e3eb687759a958d3aee592d57 Mon Sep 17 00:00:00 2001 From: Mark Meserve Date: Mon, 26 Nov 2018 14:48:15 -0600 Subject: x3xx: implement rfnoc get antenna functions --- host/lib/usrp/x300/x300_radio_ctrl_impl.cpp | 14 ++++++++++++++ host/lib/usrp/x300/x300_radio_ctrl_impl.hpp | 2 ++ 2 files changed, 16 insertions(+) (limited to 'host/lib/usrp') diff --git a/host/lib/usrp/x300/x300_radio_ctrl_impl.cpp b/host/lib/usrp/x300/x300_radio_ctrl_impl.cpp index c81036962..d0aadc55a 100644 --- a/host/lib/usrp/x300/x300_radio_ctrl_impl.cpp +++ b/host/lib/usrp/x300/x300_radio_ctrl_impl.cpp @@ -219,6 +219,13 @@ void x300_radio_ctrl_impl::set_tx_antenna(const std::string &ant, const size_t c ).set(ant); } +std::string x300_radio_ctrl_impl::get_tx_antenna(const size_t chan) +{ + return _tree->access( + fs_path("dboards" / _radio_slot / "tx_frontends" / _tx_fe_map.at(chan).db_fe_name / "antenna" / "value") + ).get(); +} + void x300_radio_ctrl_impl::set_rx_antenna(const std::string &ant, const size_t chan) { _tree->access( @@ -226,6 +233,13 @@ void x300_radio_ctrl_impl::set_rx_antenna(const std::string &ant, const size_t c ).set(ant); } +std::string x300_radio_ctrl_impl::get_rx_antenna(const size_t chan) +{ + return _tree->access( + fs_path("dboards" / _radio_slot / "rx_frontends" / _rx_fe_map.at(chan).db_fe_name / "antenna" / "value") + ).get(); +} + double x300_radio_ctrl_impl::set_tx_frequency(const double freq, const size_t chan) { return _tree->access( diff --git a/host/lib/usrp/x300/x300_radio_ctrl_impl.hpp b/host/lib/usrp/x300/x300_radio_ctrl_impl.hpp index 967ed5772..ced32f626 100644 --- a/host/lib/usrp/x300/x300_radio_ctrl_impl.hpp +++ b/host/lib/usrp/x300/x300_radio_ctrl_impl.hpp @@ -43,6 +43,8 @@ public: void set_tx_antenna(const std::string &ant, const size_t chan); void set_rx_antenna(const std::string &ant, const size_t chan); + std::string get_tx_antenna(const size_t chan); + std::string get_rx_antenna(const size_t chan); double set_tx_frequency(const double freq, const size_t chan); double set_rx_frequency(const double freq, const size_t chan); -- cgit v1.2.3