aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/usrp/multi_usrp_rfnoc.cpp
diff options
context:
space:
mode:
authorMartin Braun <martin.braun@ettus.com>2020-02-19 12:38:30 -0800
committerAaron Rossetto <aaron.rossetto@ni.com>2020-04-17 07:59:50 -0500
commita63682f981c3d4b828b5454a7d4849d181b9c8b3 (patch)
tree738f00e989da67eb89aee3978d05c6615be20cc7 /host/lib/usrp/multi_usrp_rfnoc.cpp
parent1a19bc653ee499545addb2a8718d12069bfd6fcd (diff)
downloaduhd-a63682f981c3d4b828b5454a7d4849d181b9c8b3.tar.gz
uhd-a63682f981c3d4b828b5454a7d4849d181b9c8b3.tar.bz2
uhd-a63682f981c3d4b828b5454a7d4849d181b9c8b3.zip
uhd: Add reference power level API to multi_usrp and radio_control
This adds the following API calls: - multi_usrp::has_{rx,tx}_power_reference() - multi_usrp::set_{rx,tx}_power_reference() - multi_usrp::get_{rx,tx}_power_reference() - radio_control::has_{rx,tx}_power_reference() - radio_control::set_{rx,tx}_power_reference() - radio_control::get_{rx,tx}_power_reference() It also adds a manual page explaining the philosophy of the API. Note that this does not actually add this feature to any device implementation. Calling the new API calls will thus result in `uhd::not_implemented_error` exceptions being thrown. This commit is to lock down the API and ABI.
Diffstat (limited to 'host/lib/usrp/multi_usrp_rfnoc.cpp')
-rw-r--r--host/lib/usrp/multi_usrp_rfnoc.cpp36
1 files changed, 36 insertions, 0 deletions
diff --git a/host/lib/usrp/multi_usrp_rfnoc.cpp b/host/lib/usrp/multi_usrp_rfnoc.cpp
index 14b5fd50b..a62fe3f8e 100644
--- a/host/lib/usrp/multi_usrp_rfnoc.cpp
+++ b/host/lib/usrp/multi_usrp_rfnoc.cpp
@@ -1396,6 +1396,24 @@ public:
return rx_chain.radio->get_rx_gain_names(rx_chain.block_chan);
}
+ bool has_rx_power_reference(const size_t chan)
+ {
+ auto& rx_chain = _get_rx_chan(chan);
+ return rx_chain.radio->has_rx_power_reference(rx_chain.block_chan);
+ }
+
+ void set_rx_power_reference(const double power_dbm, const size_t chan)
+ {
+ auto& rx_chain = _get_rx_chan(chan);
+ rx_chain.radio->set_rx_power_reference(power_dbm, rx_chain.block_chan);
+ }
+
+ double get_rx_power_reference(const size_t chan)
+ {
+ auto& rx_chain = _get_rx_chan(chan);
+ return rx_chain.radio->get_rx_power_reference(rx_chain.block_chan);
+ }
+
void set_rx_antenna(const std::string& ant, size_t chan)
{
auto& rx_chain = _get_rx_chan(chan);
@@ -1836,6 +1854,24 @@ public:
return tx_chain.radio->get_tx_gain_names(tx_chain.block_chan);
}
+ bool has_tx_power_reference(const size_t chan)
+ {
+ auto& tx_chain = _get_tx_chan(chan);
+ return tx_chain.radio->has_rx_power_reference(tx_chain.block_chan);
+ }
+
+ void set_tx_power_reference(const double power_dbm, const size_t chan)
+ {
+ auto& tx_chain = _get_tx_chan(chan);
+ tx_chain.radio->set_tx_power_reference(power_dbm, tx_chain.block_chan);
+ }
+
+ double get_tx_power_reference(const size_t chan)
+ {
+ auto& tx_chain = _get_tx_chan(chan);
+ return tx_chain.radio->get_tx_power_reference(tx_chain.block_chan);
+ }
+
void set_tx_antenna(const std::string& ant, size_t chan)
{
auto tx_chain = _get_tx_chan(chan);