USRP Hardware Driver and USRP Manual  Version: 4.4.0.HEAD-0-g5fac246b
UHD and USRP Manual
uhd::rfnoc::rf_control::power_reference_iface Class Referenceabstract

#include <uhd/rfnoc/rf_control/power_reference_iface.hpp>

Inheritance diagram for uhd::rfnoc::rf_control::power_reference_iface:
uhd::extension::extension uhd::rfnoc::radio_control

Public Types

using sptr = std::shared_ptr< power_reference_iface >
 

Public Member Functions

virtual ~power_reference_iface ()=default
 
virtual bool has_rx_power_reference (const size_t chan=0)=0
 
virtual void set_rx_power_reference (const double power_dbm, const size_t chan=0)=0
 
virtual double get_rx_power_reference (const size_t chan=0)=0
 
virtual std::vector< std::string > get_rx_power_ref_keys (const size_t chan=0)=0
 
virtual meta_range_t get_rx_power_range (const size_t chan)=0
 
virtual bool has_tx_power_reference (const size_t chan=0)=0
 
virtual void set_tx_power_reference (const double power_dbm, const size_t chan=0)=0
 
virtual double get_tx_power_reference (const size_t chan=0)=0
 
virtual std::vector< std::string > get_tx_power_ref_keys (const size_t chan=0)=0
 
virtual meta_range_t get_tx_power_range (const size_t chan)=0
 

Detailed Description

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.

Member Typedef Documentation

◆ sptr

Constructor & Destructor Documentation

◆ ~power_reference_iface()

virtual uhd::rfnoc::rf_control::power_reference_iface::~power_reference_iface ( )
virtualdefault

Member Function Documentation

◆ get_rx_power_range()

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
chanThe channel index

◆ get_rx_power_ref_keys()

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.

◆ get_rx_power_reference()

virtual double uhd::rfnoc::rf_control::power_reference_iface::get_rx_power_reference ( const size_t  chan = 0)
pure virtual

Return the actual reference RX power level.

Note: This functionality is not supported for most devices, and will cause a uhd::not_implemented_error exception to be thrown on devices that do not have this functionality.

For more information on how to use this API, see Power Level Controls.

Parameters
chanThe channel for which this setting is queried
Exceptions
uhd::not_implemented_errorif this functionality does not exist for this device

◆ get_tx_power_range()

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
chanThe channel index

◆ get_tx_power_ref_keys()

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.

◆ get_tx_power_reference()

virtual double uhd::rfnoc::rf_control::power_reference_iface::get_tx_power_reference ( const size_t  chan = 0)
pure virtual

Return the actual reference TX power level.

Note: This functionality is not supported for most devices, and will cause a uhd::not_implemented_error exception to be thrown on devices that do not have this functionality.

For more information on how to use this API, see Power Level Controls.

Parameters
chanThe channel for which this setting is queried
Exceptions
uhd::not_implemented_errorif this functionality does not exist for this device

◆ has_rx_power_reference()

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
chanThe channel for which this feature is queried
Returns
true if this channel has an RX power API available

◆ has_tx_power_reference()

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
chanThe channel for which this feature is queried
Returns
true if this channel has a TX power API available

◆ set_rx_power_reference()

virtual void uhd::rfnoc::rf_control::power_reference_iface::set_rx_power_reference ( const double  power_dbm,
const size_t  chan = 0 
)
pure virtual

Set the reference RX power level for a given channel

Note: This functionality is not supported for most devices, and will cause a uhd::not_implemented_error exception to be thrown on devices that do not have this functionality.

For more information on how to use this API, see Power Level Controls.

Parameters
power_dbmThe reference power level in dBm
chanThe channel for which this setting applies
Exceptions
uhd::not_implemented_errorif this functionality does not exist for this device

◆ set_tx_power_reference()

virtual void uhd::rfnoc::rf_control::power_reference_iface::set_tx_power_reference ( const double  power_dbm,
const size_t  chan = 0 
)
pure virtual

Set the reference TX power level for a given channel

Note: This functionality is not supported for most devices, and will cause a uhd::not_implemented_error exception to be thrown on devices that do not have this functionality.

For more information on how to use this API, see Power Level Controls.

Parameters
power_dbmThe reference power level in dBm
chanThe channel for which this setting applies
Exceptions
uhd::not_implemented_errorif this functionality does not exist for this device

The documentation for this class was generated from the following file: