#include <uhd/rfnoc/rf_control/nameless_gain_mixin.hpp>
Public Types | |
using | name_selector = std::function< std::string(const uhd::direction_t trx, const size_t chan)> |
Public Types inherited from uhd::rfnoc::rf_control::core_iface | |
using | sptr = std::shared_ptr< core_iface > |
Public Member Functions | |
nameless_gain_mixin (name_selector name_selector) | |
virtual | ~nameless_gain_mixin ()=default |
double | set_tx_gain (const double gain, const size_t chan) override |
double | get_tx_gain (const size_t chan) override |
double | set_rx_gain (const double gain, const size_t chan) override |
double | get_rx_gain (const size_t chan) override |
gain_range_t | get_tx_gain_range (const size_t chan) const override |
gain_range_t | get_rx_gain_range (const size_t chan) const override |
Public Member Functions inherited from uhd::rfnoc::rf_control::core_iface | |
virtual | ~core_iface ()=default |
virtual std::string | get_tx_antenna (const size_t chan) const =0 |
virtual std::vector< std::string > | get_tx_antennas (const size_t chan) const =0 |
virtual void | set_tx_antenna (const std::string &ant, const size_t chan)=0 |
virtual std::string | get_rx_antenna (const size_t chan) const =0 |
virtual std::vector< std::string > | get_rx_antennas (const size_t chan) const =0 |
virtual void | set_rx_antenna (const std::string &ant, const size_t chan)=0 |
virtual double | get_tx_frequency (const size_t chan)=0 |
virtual double | set_tx_frequency (const double freq, size_t chan)=0 |
virtual void | set_tx_tune_args (const uhd::device_addr_t &args, const size_t chan)=0 |
virtual uhd::freq_range_t | get_tx_frequency_range (const size_t chan) const =0 |
virtual double | get_rx_frequency (const size_t chan)=0 |
virtual double | set_rx_frequency (const double freq, const size_t chan)=0 |
virtual void | set_rx_tune_args (const uhd::device_addr_t &args, const size_t chan)=0 |
virtual uhd::freq_range_t | get_rx_frequency_range (const size_t chan) const =0 |
virtual std::vector< std::string > | get_tx_gain_names (const size_t chan) const =0 |
virtual uhd::gain_range_t | get_tx_gain_range (const std::string &name, const size_t chan) const =0 |
virtual double | get_tx_gain (const std::string &name, const size_t chan)=0 |
virtual double | set_tx_gain (const double gain, const std::string &name, const size_t chan)=0 |
virtual std::vector< std::string > | get_rx_gain_names (const size_t chan) const =0 |
virtual uhd::gain_range_t | get_rx_gain_range (const std::string &name, const size_t chan) const =0 |
virtual double | get_rx_gain (const std::string &name, const size_t chan)=0 |
virtual double | set_rx_gain (const double gain, const std::string &name, const size_t chan)=0 |
virtual void | set_rx_agc (const bool enable, const size_t chan)=0 |
virtual meta_range_t | get_tx_bandwidth_range (size_t chan) const =0 |
virtual double | get_tx_bandwidth (const size_t chan)=0 |
virtual double | set_tx_bandwidth (const double bandwidth, const size_t chan)=0 |
virtual meta_range_t | get_rx_bandwidth_range (size_t chan) const =0 |
virtual double | get_rx_bandwidth (const size_t chan)=0 |
virtual double | set_rx_bandwidth (const double bandwidth, const size_t chan)=0 |
virtual std::vector< std::string > | get_rx_lo_names (const size_t chan) const =0 |
virtual std::vector< std::string > | get_rx_lo_sources (const std::string &name, const size_t chan) const =0 |
virtual freq_range_t | get_rx_lo_freq_range (const std::string &name, const size_t chan) const =0 |
virtual void | set_rx_lo_source (const std::string &src, const std::string &name, const size_t chan)=0 |
virtual const std::string | get_rx_lo_source (const std::string &name, const size_t chan)=0 |
virtual void | set_rx_lo_export_enabled (bool enabled, const std::string &name, const size_t chan)=0 |
virtual bool | get_rx_lo_export_enabled (const std::string &name, const size_t chan)=0 |
virtual double | set_rx_lo_freq (double freq, const std::string &name, const size_t chan)=0 |
virtual double | get_rx_lo_freq (const std::string &name, const size_t chan)=0 |
virtual std::vector< std::string > | get_tx_lo_names (const size_t chan) const =0 |
virtual std::vector< std::string > | get_tx_lo_sources (const std::string &name, const size_t chan) const =0 |
virtual freq_range_t | get_tx_lo_freq_range (const std::string &name, const size_t chan)=0 |
virtual void | set_tx_lo_source (const std::string &src, const std::string &name, const size_t chan)=0 |
virtual const std::string | get_tx_lo_source (const std::string &name, const size_t chan)=0 |
virtual void | set_tx_lo_export_enabled (const bool enabled, const std::string &name, const size_t chan)=0 |
virtual bool | get_tx_lo_export_enabled (const std::string &name, const size_t chan)=0 |
virtual double | set_tx_lo_freq (const double freq, const std::string &name, const size_t chan)=0 |
virtual double | get_tx_lo_freq (const std::string &name, const size_t chan)=0 |
Partially implements core_iface for the gain functions which take no name parameter
using uhd::rfnoc::rf_control::nameless_gain_mixin::name_selector = std::function<std::string(const uhd::direction_t trx, const size_t chan)> |
uhd::rfnoc::rf_control::nameless_gain_mixin::nameless_gain_mixin | ( | name_selector | name_selector | ) |
Sets the name selector for the mixin. The closure receives the direction of the call and the channel, and returns the gain to use for the call. The name selector may simply return a string, or may do a more complex algorithm.
|
virtualdefault |
|
overridevirtual |
Return the overall receive gain on channel chan
Implements uhd::rfnoc::rf_control::core_iface.
|
overridevirtual |
Return a range of valid RX gains
Implements uhd::rfnoc::rf_control::core_iface.
|
overridevirtual |
Return the overall transmit gain on channel chan
Implements uhd::rfnoc::rf_control::core_iface.
|
overridevirtual |
Return a range of valid TX gains
Implements uhd::rfnoc::rf_control::core_iface.
|
overridevirtual |
Set the overall receive gain on channel chan
This function will attempt to set the gain as close as possible, and return a coerced value of the actual gain value.
Implements uhd::rfnoc::rf_control::core_iface.
|
overridevirtual |
Set the transmit gain on channel chan
This function will attempt to set the gain as close as possible, and return a coerced value of the actual gain value.
This method will set the overall gain. To set a specific gain, use set_tx_gain(const double, const std::string&, const size_t).
Implements uhd::rfnoc::rf_control::core_iface.