diff options
-rw-r--r-- | host/lib/usrp/x300/x300_radio_ctrl_impl.cpp | 14 | ||||
-rw-r--r-- | host/lib/usrp/x300/x300_radio_ctrl_impl.hpp | 2 |
2 files changed, 16 insertions, 0 deletions
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<std::string>( + 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<std::string>( @@ -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<std::string>( + 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<double>( 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); |