aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/usrp/multi_usrp_rfnoc.cpp
diff options
context:
space:
mode:
authorMartin Braun <martin.braun@ettus.com>2020-08-06 20:55:35 +0200
committerAaron Rossetto <aaron.rossetto@ni.com>2020-08-17 16:22:35 -0500
commitb9f9ca2d0fd43f2a55e4ed5301070585cbb1be3c (patch)
tree9f5d41f396b5721b153b659f115fc1ebf71096e9 /host/lib/usrp/multi_usrp_rfnoc.cpp
parent34729381733f22b36d34d8d451b80de5b0e83203 (diff)
downloaduhd-b9f9ca2d0fd43f2a55e4ed5301070585cbb1be3c.tar.gz
uhd-b9f9ca2d0fd43f2a55e4ed5301070585cbb1be3c.tar.bz2
uhd-b9f9ca2d0fd43f2a55e4ed5301070585cbb1be3c.zip
uhd: Add APIs for getting the available power range
The previously added APIs for getting/setting power reference levels was missing an option to read back the currently available power levels (minimum and maximum power levels). This adds getters for TX and RX power ranges to multi_usrp and radio_control. The power API is thus now more similar to the gain API, which always had getters for gain ranges.
Diffstat (limited to 'host/lib/usrp/multi_usrp_rfnoc.cpp')
-rw-r--r--host/lib/usrp/multi_usrp_rfnoc.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/host/lib/usrp/multi_usrp_rfnoc.cpp b/host/lib/usrp/multi_usrp_rfnoc.cpp
index 26932ef30..659d879e8 100644
--- a/host/lib/usrp/multi_usrp_rfnoc.cpp
+++ b/host/lib/usrp/multi_usrp_rfnoc.cpp
@@ -1484,6 +1484,12 @@ public:
return rx_chain.radio->get_rx_power_reference(rx_chain.block_chan);
}
+ meta_range_t get_rx_power_range(const size_t chan)
+ {
+ auto& rx_chain = _get_rx_chan(chan);
+ return rx_chain.radio->get_rx_power_range(rx_chain.block_chan);
+ }
+
void set_rx_antenna(const std::string& ant, size_t chan = 0)
{
MUX_RX_API_CALL(set_rx_antenna, ant);
@@ -1955,6 +1961,12 @@ public:
return tx_chain.radio->get_tx_power_reference(tx_chain.block_chan);
}
+ meta_range_t get_tx_power_range(const size_t chan)
+ {
+ auto& tx_chain = _get_tx_chan(chan);
+ return tx_chain.radio->get_tx_power_range(tx_chain.block_chan);
+ }
+
void set_tx_antenna(const std::string& ant, size_t chan = 0)
{
MUX_TX_API_CALL(set_tx_antenna, ant);