aboutsummaryrefslogtreecommitdiffstats
path: root/host/include
diff options
context:
space:
mode:
authorTrung N Tran <trung.tran@ettus.com>2018-01-09 17:52:48 -0800
committerMartin Braun <martin.braun@ettus.com>2018-01-12 16:26:03 -0800
commit5e265ad175658ab6ac784aa298d0e760d8380b68 (patch)
tree7033c64057a1055102862aa6eca1aa1a2264fc1c /host/include
parent00402669d08b206f3b0367f5f4e3383d25e7944b (diff)
downloaduhd-5e265ad175658ab6ac784aa298d0e760d8380b68.tar.gz
uhd-5e265ad175658ab6ac784aa298d0e760d8380b68.tar.bz2
uhd-5e265ad175658ab6ac784aa298d0e760d8380b68.zip
usrp: add multiusrp api for gain profile.
Diffstat (limited to 'host/include')
-rw-r--r--host/include/uhd/usrp/multi_usrp.hpp56
1 files changed, 56 insertions, 0 deletions
diff --git a/host/include/uhd/usrp/multi_usrp.hpp b/host/include/uhd/usrp/multi_usrp.hpp
index c1fa26cbc..5d47bee84 100644
--- a/host/include/uhd/usrp/multi_usrp.hpp
+++ b/host/include/uhd/usrp/multi_usrp.hpp
@@ -791,6 +791,34 @@ public:
*/
virtual void set_rx_gain(double gain, const std::string &name, size_t chan = 0) = 0;
+ /*! Get a list of possible RX gain profile options
+ *
+ * Example: On the TwinRX, this will return "low-noise", "low-distortion" or "default".
+ * These names can be used in gain-profile related API called.
+ * An empty return value doesn't mean there are no profile options, it means that
+ * this radio does not have any gain profiles implemented, and typically means
+ * there is only one default profile of set gain
+ *
+ * \param chan the channel index 0 to N-1
+ * \return a vector of strings for possible gain profile options, or an empty list of
+ * this doesn't apply.
+ */
+ virtual std::vector<std::string> get_rx_gain_profile_names(const size_t chan = 0) = 0;
+
+ /*!
+ * Set the RX gain profile.
+ * \param profile the profile string option
+ * \param chan the channel index 0 to N-1
+ */
+ virtual void set_rx_gain_profile(const std::string& profile, const size_t chan = 0) = 0;
+
+ /*!
+ * Get the RX gain profile.
+ * \param chan the channel index 0 to N-1
+ * \return a string of current RX gain profile of corresponding channel.
+ */
+ virtual std::string get_rx_gain_profile(const size_t chan = 0) = 0;
+
//! A convenience wrapper for setting overall RX gain
void set_rx_gain(double gain, size_t chan = 0){
return this->set_rx_gain(gain, ALL_GAINS, chan);
@@ -1077,6 +1105,34 @@ public:
*/
virtual void set_tx_gain(double gain, const std::string &name, size_t chan = 0) = 0;
+ /*! Get a list of possible TX gain profile options
+ *
+ * Example: On the N310, this will return "manual" or "default".
+ * These names can be used in gain related API called.
+ * An empty return value doesn't mean there are no profile options, it means that
+ * this radio does not have any gain profiles implemented, and typically means
+ * there is only one default profile of set gain
+ *
+ * \param chan the channel index 0 to N-1
+ * \return a vector of strings for possible gain profile options, or an empty list of
+ * this doesn't apply.
+ */
+ virtual std::vector<std::string> get_tx_gain_profile_names(const size_t chan = 0) = 0;
+
+ /*!
+ * Set the TX gain profile.
+ * \param profile the profile string option
+ * \param chan the channel index 0 to N-1
+ */
+ virtual void set_tx_gain_profile(const std::string& profile, const size_t chan = 0) = 0;
+
+ /*!
+ * Get the TX gain profile.
+ * \param chan the channel index 0 to N-1
+ * \return a string of current TX gain profile of corresponding channel.
+ */
+ virtual std::string get_tx_gain_profile(const size_t chan = 0) = 0;
+
//! A convenience wrapper for setting overall TX gain
void set_tx_gain(double gain, size_t chan = 0){
return this->set_tx_gain(gain, ALL_GAINS, chan);