aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorDimitri Stolnikov <horiz0n@gmx.net>2012-07-18 21:24:57 +0200
committerDimitri Stolnikov <horiz0n@gmx.net>2012-07-18 21:24:57 +0200
commit86ec5d3b7383b31a493ac0a122386abb56be5bb4 (patch)
tree2b8128722228ae8dab4d54677613d08e6c4450f0 /include
parent0b5f48eb078cb5fedd4c675c30f9d966dd677abc (diff)
add if gain setter API for rtl-sdr
and OsmoSDR devices Observations lead to an useful gain range from 15 to 30dB, a value of 24dB is used by default.
Diffstat (limited to 'include')
-rw-r--r--include/osmosdr/osmosdr_source_c.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/osmosdr/osmosdr_source_c.h b/include/osmosdr/osmosdr_source_c.h
index 425902d..55a9a0f 100644
--- a/include/osmosdr/osmosdr_source_c.h
+++ b/include/osmosdr/osmosdr_source_c.h
@@ -198,6 +198,16 @@ public:
virtual double get_gain( const std::string & name, size_t chan = 0 ) = 0;
/*!
+ * Set the IF gain for the underlying radio hardware.
+ * This function will automatically distribute the desired gain value over
+ * available IF gain stages in an appropriate way and return the actual value.
+ * \param gain the gain in dB
+ * \param chan the channel index 0 to N-1
+ * \return the actual gain in dB
+ */
+ virtual double set_if_gain( double gain, size_t chan = 0 ) = 0;
+
+ /*!
* Get the available antennas of the underlying radio hardware.
* \param chan the channel index 0 to N-1
* \return a vector of strings containing the names of available antennas