aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/usrp
diff options
context:
space:
mode:
Diffstat (limited to 'host/lib/usrp')
-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 90cb20ce3..c84b2ba44 100644
--- a/host/lib/usrp/x300/x300_radio_ctrl_impl.cpp
+++ b/host/lib/usrp/x300/x300_radio_ctrl_impl.cpp
@@ -228,6 +228,20 @@ double x300_radio_ctrl_impl::get_rx_frequency(const size_t chan)
).get();
}
+double x300_radio_ctrl_impl::set_rx_bandwidth(const double bandwidth, const size_t chan)
+{
+ return _tree->access<double>(
+ fs_path("dboards" / _radio_slot / "rx_frontends" / _rx_fe_map.at(chan).db_fe_name / "bandwidth" / "value")
+ ).set(bandwidth).get();
+}
+
+double x300_radio_ctrl_impl::get_rx_bandwidth(const size_t chan)
+{
+ return _tree->access<double>(
+ fs_path("dboards" / _radio_slot / "rx_frontends" / _rx_fe_map.at(chan).db_fe_name / "bandwidth" / "value")
+ ).get();
+}
+
double x300_radio_ctrl_impl::set_tx_gain(const double gain, const size_t chan)
{
//TODO: This is extremely hacky!
diff --git a/host/lib/usrp/x300/x300_radio_ctrl_impl.hpp b/host/lib/usrp/x300/x300_radio_ctrl_impl.hpp
index 6e17778bd..80cd94215 100644
--- a/host/lib/usrp/x300/x300_radio_ctrl_impl.hpp
+++ b/host/lib/usrp/x300/x300_radio_ctrl_impl.hpp
@@ -56,8 +56,10 @@ public:
double set_tx_frequency(const double freq, const size_t chan);
double set_rx_frequency(const double freq, const size_t chan);
+ double set_rx_bandwidth(const double bandwidth, const size_t chan);
double get_tx_frequency(const size_t chan);
double get_rx_frequency(const size_t chan);
+ double get_rx_bandwidth(const size_t chan);
double set_tx_gain(const double gain, const size_t chan);
double set_rx_gain(const double gain, const size_t chan);