summaryrefslogtreecommitdiff
path: root/gr-uhd/include
diff options
context:
space:
mode:
authorJosh Blum2011-10-24 11:31:59 -0700
committerJosh Blum2011-11-07 18:56:28 -0800
commit9058109de812a5a8c45a180131531b5ad10a9d7a (patch)
tree32c5e382a2671d166eb614285cb37d6d57142dc1 /gr-uhd/include
parent8e60469acd6be356c64bfb27f58b393f3dd361cf (diff)
downloadgnuradio-9058109de812a5a8c45a180131531b5ad10a9d7a.tar.gz
gnuradio-9058109de812a5a8c45a180131531b5ad10a9d7a.tar.bz2
gnuradio-9058109de812a5a8c45a180131531b5ad10a9d7a.zip
uhd: added set for RX/TX iq balance and dc offset
Diffstat (limited to 'gr-uhd/include')
-rw-r--r--gr-uhd/include/gr_uhd_usrp_sink.h39
-rw-r--r--gr-uhd/include/gr_uhd_usrp_source.h54
2 files changed, 81 insertions, 12 deletions
diff --git a/gr-uhd/include/gr_uhd_usrp_sink.h b/gr-uhd/include/gr_uhd_usrp_sink.h
index 8c1056a79..ea703faa8 100644
--- a/gr-uhd/include/gr_uhd_usrp_sink.h
+++ b/gr-uhd/include/gr_uhd_usrp_sink.h
@@ -118,7 +118,7 @@ class GR_UHD_API uhd_usrp_sink : virtual public gr_sync_block{
public:
/*!
- * Set the subdevice specification.
+ * Set the frontend specification.
* \param spec the subdev spec markup string
* \param mboard the motherboard index 0 to M-1
*/
@@ -253,26 +253,53 @@ public:
virtual std::vector<std::string> get_antennas(size_t chan = 0) = 0;
/*!
- * Set the subdevice bandpass filter.
+ * Set the bandpass filter on the RF frontend.
* \param chan the channel index 0 to N-1
* \param bandwidth the filter bandwidth in Hz
*/
virtual void set_bandwidth(double bandwidth, size_t chan = 0) = 0;
/*!
- * Get a daughterboard sensor value.
+ * Set a constant DC offset value.
+ * The value is complex to control both I and Q.
+ * \param offset the dc offset (1.0 is full-scale)
+ * \param chan the channel index 0 to N-1
+ */
+ virtual void set_dc_offset(const std::complex<double> &offset, size_t chan = 0) = 0;
+
+ /*!
+ * Set the RX frontend IQ imbalance correction.
+ * Use this to adjust the magnitude and phase of I and Q.
+ *
+ * \param correction the complex correction (1.0 is full-scale)
+ * \param chan the channel index 0 to N-1
+ */
+ virtual void set_iq_balance(const std::complex<double> &correction, size_t chan = 0) = 0;
+
+ /*!
+ * Get an RF frontend sensor value.
* \param name the name of the sensor
* \param chan the channel index 0 to N-1
* \return a sensor value object
*/
- virtual uhd::sensor_value_t get_dboard_sensor(const std::string &name, size_t chan = 0) = 0;
+ virtual uhd::sensor_value_t get_sensor(const std::string &name, size_t chan = 0) = 0;
/*!
- * Get a list of possible daughterboard sensor names.
+ * Get a list of possible RF frontend sensor names.
* \param chan the channel index 0 to N-1
* \return a vector of sensor names
*/
- virtual std::vector<std::string> get_dboard_sensor_names(size_t chan = 0) = 0;
+ virtual std::vector<std::string> get_sensor_names(size_t chan = 0) = 0;
+
+ //! DEPRECATED use get_sensor
+ uhd::sensor_value_t get_dboard_sensor(const std::string &name, size_t chan = 0){
+ return this->get_sensor(name, chan);
+ }
+
+ //! DEPRECATED use get_sensor_names
+ std::vector<std::string> get_dboard_sensor_names(size_t chan = 0){
+ return this->get_sensor_names(chan);
+ }
/*!
* Get a motherboard sensor value.
diff --git a/gr-uhd/include/gr_uhd_usrp_source.h b/gr-uhd/include/gr_uhd_usrp_source.h
index 7a861e315..5830487bc 100644
--- a/gr-uhd/include/gr_uhd_usrp_source.h
+++ b/gr-uhd/include/gr_uhd_usrp_source.h
@@ -110,7 +110,7 @@ class GR_UHD_API uhd_usrp_source : virtual public gr_sync_block{
public:
/*!
- * Set the subdevice specification.
+ * Set the frontend specification.
* \param spec the subdev spec markup string
* \param mboard the motherboard index 0 to M-1
*/
@@ -245,26 +245,68 @@ public:
virtual std::vector<std::string> get_antennas(size_t chan = 0) = 0;
/*!
- * Set the subdevice bandpass filter.
+ * Set the bandpass filter on the RF frontend.
* \param bandwidth the filter bandwidth in Hz
* \param chan the channel index 0 to N-1
*/
virtual void set_bandwidth(double bandwidth, size_t chan = 0) = 0;
/*!
- * Get a daughterboard sensor value.
+ * Enable/disable the automatic DC offset correction.
+ * The automatic correction subtracts out the long-run average.
+ *
+ * When disabled, the averaging option operation is halted.
+ * Once halted, the average value will be held constant
+ * until the user re-enables the automatic correction
+ * or overrides the value by manually setting the offset.
+ *
+ * \param enb true to enable automatic DC offset correction
+ * \param chan the channel index 0 to N-1
+ */
+ virtual void set_dc_offset(const bool enb, size_t chan = 0) = 0;
+
+ /*!
+ * Set a constant DC offset value.
+ * The value is complex to control both I and Q.
+ * Only set this when automatic correction is disabled.
+ * \param offset the dc offset (1.0 is full-scale)
+ * \param chan the channel index 0 to N-1
+ */
+ virtual void set_dc_offset(const std::complex<double> &offset, size_t chan = 0) = 0;
+
+ /*!
+ * Set the RX frontend IQ imbalance correction.
+ * Use this to adjust the magnitude and phase of I and Q.
+ *
+ * \param correction the complex correction value
+ * \param chan the channel index 0 to N-1
+ */
+ virtual void set_iq_balance(const std::complex<double> &correction, size_t chan = 0) = 0;
+
+ /*!
+ * Get a RF frontend sensor value.
* \param name the name of the sensor
* \param chan the channel index 0 to N-1
* \return a sensor value object
*/
- virtual uhd::sensor_value_t get_dboard_sensor(const std::string &name, size_t chan = 0) = 0;
+ virtual uhd::sensor_value_t get_sensor(const std::string &name, size_t chan = 0) = 0;
/*!
- * Get a list of possible daughterboard sensor names.
+ * Get a list of possible RF frontend sensor names.
* \param chan the channel index 0 to N-1
* \return a vector of sensor names
*/
- virtual std::vector<std::string> get_dboard_sensor_names(size_t chan = 0) = 0;
+ virtual std::vector<std::string> get_sensor_names(size_t chan = 0) = 0;
+
+ //! DEPRECATED use get_sensor
+ uhd::sensor_value_t get_dboard_sensor(const std::string &name, size_t chan = 0){
+ return this->get_sensor(name, chan);
+ }
+
+ //! DEPRECATED use get_sensor_names
+ std::vector<std::string> get_dboard_sensor_names(size_t chan = 0){
+ return this->get_sensor_names(chan);
+ }
/*!
* Get a motherboard sensor value.