Interface for reference power API commands
This interface contains all methods related to the reference power API, and is usually only accessed directly via the radio_control class.
virtual meta_range_t uhd::rfnoc::rf_control::power_reference_iface::get_rx_power_range |
( |
const size_t |
chan | ) |
|
|
pure virtual |
Return the available RX power range given the current configuration
This will return the range of available power levels given the current frequency, gain profile, antenna, and whatever other settings may affect the available power ranges. Note that the available power range may change frequently, so don't assume an immutable range.
- Parameters
-
virtual std::vector< std::string > uhd::rfnoc::rf_control::power_reference_iface::get_rx_power_ref_keys |
( |
const size_t |
chan = 0 | ) |
|
|
pure virtual |
Return the keys by which the power calibration data is referenced for this channel.
The first entry is the key, the second the serial. These are the same arguments that can be used for uhd::usrp::cal::database::read_cal_data() and friends. See also Serial number and key.
Note that the key can change at runtime, e.g., when the antenna port is switched.
The difference between this and has_rx_power_reference() is that the latter requires both device support as well as calibration data, whereas this function will never throw, and will always return a non-empty vector if device support is there, even if the device does not have calbration data loaded.
- Returns
- an empty vector if no power calibration is supported, or a vector of length 2 with key and serial if it does.
virtual meta_range_t uhd::rfnoc::rf_control::power_reference_iface::get_tx_power_range |
( |
const size_t |
chan | ) |
|
|
pure virtual |
Return the available TX power range given the current configuration
This will return the range of available power levels given the current frequency, gain profile, antenna, and whatever other settings may affect the available power ranges. Note that the available power range may change frequently, so don't assume an immutable range.
- Parameters
-
virtual std::vector< std::string > uhd::rfnoc::rf_control::power_reference_iface::get_tx_power_ref_keys |
( |
const size_t |
chan = 0 | ) |
|
|
pure virtual |
Return the keys by which the power calibration data is referenced for this channel.
The first entry is the key, the second the serial. These are the same arguments that can be used for uhd::usrp::cal::database::read_cal_data() and friends. See also Serial number and key.
Note that the key can change at runtime, e.g., when the antenna port is switched.
The difference between this and has_tx_power_reference() is that the latter requires both device support as well as calibration data, whereas this function will never throw, and will always return a non-empty vector if device support is there, even if the device does not have calbration data loaded.
- Returns
- an empty vector if no power calibration is supported, or a vector of length 2 with key and serial if it does.
virtual bool uhd::rfnoc::rf_control::power_reference_iface::has_rx_power_reference |
( |
const size_t |
chan = 0 | ) |
|
|
pure virtual |
Return true if this channel has a reference power API enabled
Many devices either don't have a built-in reference power API, or they require calibration data for it to work. This means that it is not clear, even when the device type is known, if a device supports setting a power reference level. Use this method to query the availability of set_rx_power_reference() and get_rx_power_reference(), which will throw a uhd::not_implemented_error or uhd::runtime_error if they cannot be used.
See Power Level Controls for more information, or query the specific device's manual page to see if a power API is available, and how to enable it.
- Parameters
-
chan | The channel for which this feature is queried |
- Returns
- true if this channel has an RX power API available
virtual bool uhd::rfnoc::rf_control::power_reference_iface::has_tx_power_reference |
( |
const size_t |
chan = 0 | ) |
|
|
pure virtual |
Return true if this channel has a reference power API enabled
Many devices either don't have a built-in reference power API, or they require calibration data for it to work. This means that it is not clear, even when the device type is known, if a device supports setting a power reference level. Use this method to query the availability of set_tx_power_reference() and get_tx_power_reference(), which will throw a uhd::not_implemented_error or uhd::runtime_error if they cannot be used.
See Power Level Controls for more information, or query the specific device's manual page to see if a power API is available, and how to enable it.
- Parameters
-
chan | The channel for which this feature is queried |
- Returns
- true if this channel has a TX power API available