aboutsummaryrefslogtreecommitdiffstats
path: root/host
diff options
context:
space:
mode:
authorMark Meserve <mark.meserve@ni.com>2018-11-26 14:48:15 -0600
committerMartin Braun <martin.braun@ettus.com>2018-11-26 18:02:17 -0800
commit7a22e715c9329f0e3eb687759a958d3aee592d57 (patch)
tree54b50ea4a7c6cee209ade9e7a405ac834753b226 /host
parent0b93b32b60fa37e8dfb4638a6f781ffca93df0ad (diff)
downloaduhd-7a22e715c9329f0e3eb687759a958d3aee592d57.tar.gz
uhd-7a22e715c9329f0e3eb687759a958d3aee592d57.tar.bz2
uhd-7a22e715c9329f0e3eb687759a958d3aee592d57.zip
x3xx: implement rfnoc get antenna functions
Diffstat (limited to 'host')
-rw-r--r--host/lib/usrp/x300/x300_radio_ctrl_impl.cpp14
-rw-r--r--host/lib/usrp/x300/x300_radio_ctrl_impl.hpp2
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);