diff options
author | Martin Braun <martin.braun@ettus.com> | 2020-02-19 12:38:30 -0800 |
---|---|---|
committer | Aaron Rossetto <aaron.rossetto@ni.com> | 2020-04-17 07:59:50 -0500 |
commit | a63682f981c3d4b828b5454a7d4849d181b9c8b3 (patch) | |
tree | 738f00e989da67eb89aee3978d05c6615be20cc7 /host/lib/rfnoc/radio_control_impl.cpp | |
parent | 1a19bc653ee499545addb2a8718d12069bfd6fcd (diff) | |
download | uhd-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/rfnoc/radio_control_impl.cpp')
-rw-r--r-- | host/lib/rfnoc/radio_control_impl.cpp | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/host/lib/rfnoc/radio_control_impl.cpp b/host/lib/rfnoc/radio_control_impl.cpp index 4f1246e5c..e34a9b430 100644 --- a/host/lib/rfnoc/radio_control_impl.cpp +++ b/host/lib/rfnoc/radio_control_impl.cpp @@ -404,6 +404,28 @@ double radio_control_impl::set_rx_gain( return set_rx_gain(gain, chan); } +bool radio_control_impl::has_rx_power_reference(const size_t) +{ + return false; +} + +bool radio_control_impl::has_tx_power_reference(const size_t) +{ + return false; +} + +void radio_control_impl::set_rx_power_reference(const double, const size_t) +{ + throw uhd::not_implemented_error( + "set_rx_power_reference() is not supported on this radio!"); +} + +void radio_control_impl::set_tx_power_reference(const double, const size_t) +{ + throw uhd::not_implemented_error( + "set_tx_power_reference() is not supported on this radio!"); +} + void radio_control_impl::set_rx_agc(const bool, const size_t) { throw uhd::not_implemented_error("set_rx_agc() is not supported on this radio!"); @@ -575,6 +597,20 @@ uhd::meta_range_t radio_control_impl::get_rx_bandwidth_range(size_t chan) const return result; } +double radio_control_impl::get_rx_power_reference(const size_t) +{ + throw uhd::not_implemented_error( + "get_rx_power_reference() is not supported on this radio!"); + return 0.0; +} + +double radio_control_impl::get_tx_power_reference(const size_t) +{ + throw uhd::not_implemented_error( + "get_tx_power_reference() is not supported on this radio!"); + return 0.0; +} + /****************************************************************************** * LO Default API *****************************************************************************/ |