diff options
author | Josh Blum <josh@joshknows.com> | 2011-06-29 13:23:18 -0700 |
---|---|---|
committer | Josh Blum <josh@joshknows.com> | 2011-06-29 13:23:18 -0700 |
commit | d38757f4656028800e393c91bf3fec1986eb0200 (patch) | |
tree | f4f7b0fe078182b40cf07e6756fb8628feeffd70 /host/include | |
parent | 1ade1f94cb5aaf038d4914fb5cece82f055b8f0e (diff) | |
download | uhd-d38757f4656028800e393c91bf3fec1986eb0200.tar.gz uhd-d38757f4656028800e393c91bf3fec1986eb0200.tar.bz2 uhd-d38757f4656028800e393c91bf3fec1986eb0200.zip |
usrp: deleted a bunch on obsoleted files in usrp directory
Diffstat (limited to 'host/include')
-rw-r--r-- | host/include/uhd/usrp/CMakeLists.txt | 10 | ||||
-rw-r--r-- | host/include/uhd/usrp/codec_props.hpp | 42 | ||||
-rw-r--r-- | host/include/uhd/usrp/dboard_base.hpp | 37 | ||||
-rw-r--r-- | host/include/uhd/usrp/dboard_props.hpp | 43 | ||||
-rw-r--r-- | host/include/uhd/usrp/device_props.hpp | 39 | ||||
-rw-r--r-- | host/include/uhd/usrp/dsp_props.hpp | 50 | ||||
-rw-r--r-- | host/include/uhd/usrp/dsp_utils.hpp | 96 | ||||
-rw-r--r-- | host/include/uhd/usrp/mboard_props.hpp | 56 | ||||
-rw-r--r-- | host/include/uhd/usrp/misc_utils.hpp | 71 | ||||
-rw-r--r-- | host/include/uhd/usrp/subdev_props.hpp | 64 | ||||
-rw-r--r-- | host/include/uhd/usrp/tune_helper.hpp | 78 |
11 files changed, 37 insertions, 549 deletions
diff --git a/host/include/uhd/usrp/CMakeLists.txt b/host/include/uhd/usrp/CMakeLists.txt index e441433fd..ba38a67ea 100644 --- a/host/include/uhd/usrp/CMakeLists.txt +++ b/host/include/uhd/usrp/CMakeLists.txt @@ -17,13 +17,6 @@ INSTALL(FILES - #### props headers ### - codec_props.hpp - dboard_props.hpp - device_props.hpp - dsp_props.hpp - mboard_props.hpp - subdev_props.hpp #### dboard headers ### dboard_base.hpp @@ -33,12 +26,9 @@ INSTALL(FILES dboard_manager.hpp ### utilities ### - dsp_utils.hpp gps_ctrl.hpp mboard_eeprom.hpp - misc_utils.hpp subdev_spec.hpp - tune_helper.hpp ### interfaces ### single_usrp.hpp diff --git a/host/include/uhd/usrp/codec_props.hpp b/host/include/uhd/usrp/codec_props.hpp deleted file mode 100644 index b0a79e3f6..000000000 --- a/host/include/uhd/usrp/codec_props.hpp +++ /dev/null @@ -1,42 +0,0 @@ -// -// Copyright 2010-2011 Ettus Research LLC -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see <http://www.gnu.org/licenses/>. -// - -#ifndef INCLUDED_UHD_USRP_CODEC_PROPS_HPP -#define INCLUDED_UHD_USRP_CODEC_PROPS_HPP - -#include <uhd/utils/props.hpp> - -namespace uhd{ namespace usrp{ - - /*! - * Possible device codec properties: - * A codec is expected to have a rate and gain elements. - * Other properties can be discovered through the others prop. - */ - enum codec_prop_t{ - CODEC_PROP_NAME, //ro, std::string - CODEC_PROP_OTHERS, //ro, prop_names_t - CODEC_PROP_GAIN_I, //rw, double - CODEC_PROP_GAIN_Q , //rw, double - CODEC_PROP_GAIN_RANGE, //ro, gain_range_t - CODEC_PROP_GAIN_NAMES //ro, prop_names_t - }; - - -}} //namespace - -#endif /* INCLUDED_UHD_USRP_CODEC_PROPS_HPP */ diff --git a/host/include/uhd/usrp/dboard_base.hpp b/host/include/uhd/usrp/dboard_base.hpp index 9b75d791f..7e9557a95 100644 --- a/host/include/uhd/usrp/dboard_base.hpp +++ b/host/include/uhd/usrp/dboard_base.hpp @@ -28,6 +28,43 @@ namespace uhd{ namespace usrp{ + /*! + * Possible subdev connection types: + * + * A complex subdevice is physically connected to both channels, + * which may be connected in one of two ways: IQ or QI (swapped). + * + * A real subdevice is only physically connected one channel, + * either only the I channel or only the Q channel. + */ + enum subdev_conn_t{ + SUBDEV_CONN_COMPLEX_IQ = 'C', + SUBDEV_CONN_COMPLEX_QI = 'c', + SUBDEV_CONN_REAL_I = 'R', + SUBDEV_CONN_REAL_Q = 'r' + }; + + /*! + * Possible device subdev properties + */ + enum subdev_prop_t{ + SUBDEV_PROP_NAME, //ro, std::string + SUBDEV_PROP_OTHERS, //ro, prop_names_t + SUBDEV_PROP_SENSOR, //ro, sensor_value_t + SUBDEV_PROP_SENSOR_NAMES, //ro, prop_names_t + SUBDEV_PROP_GAIN, //rw, double + SUBDEV_PROP_GAIN_RANGE, //ro, gain_range_t + SUBDEV_PROP_GAIN_NAMES, //ro, prop_names_t + SUBDEV_PROP_FREQ, //rw, double + SUBDEV_PROP_FREQ_RANGE, //ro, freq_range_t + SUBDEV_PROP_ANTENNA, //rw, std::string + SUBDEV_PROP_ANTENNA_NAMES, //ro, prop_names_t + SUBDEV_PROP_CONNECTION, //ro, subdev_conn_t + SUBDEV_PROP_ENABLED, //rw, bool + SUBDEV_PROP_USE_LO_OFFSET, //ro, bool + SUBDEV_PROP_BANDWIDTH //rw, double + }; + /*! * A daughter board dboard_base class for all dboards. * Only other dboard dboard_base classes should inherit this. diff --git a/host/include/uhd/usrp/dboard_props.hpp b/host/include/uhd/usrp/dboard_props.hpp deleted file mode 100644 index 29211ec8c..000000000 --- a/host/include/uhd/usrp/dboard_props.hpp +++ /dev/null @@ -1,43 +0,0 @@ -// -// Copyright 2010-2011 Ettus Research LLC -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see <http://www.gnu.org/licenses/>. -// - -#ifndef INCLUDED_UHD_USRP_DBOARD_PROPS_HPP -#define INCLUDED_UHD_USRP_DBOARD_PROPS_HPP - -#include <uhd/utils/props.hpp> - -namespace uhd{ namespace usrp{ - - /*! - * Possible device dboard properties: - * A dboard has an id, one or more subdevices, and a codec. - * A dboard is considered to be unidirectional (RX or TX). - */ - enum dboard_prop_t{ - DBOARD_PROP_NAME, //ro, std::string - DBOARD_PROP_SUBDEV, //ro, wax::obj - DBOARD_PROP_SUBDEV_NAMES, //ro, prop_names_t - DBOARD_PROP_DBOARD_EEPROM, //rw, dboard_eeprom_t - DBOARD_PROP_GBOARD_EEPROM, //rw, dboard_eeprom_t - DBOARD_PROP_DBOARD_IFACE, //ro, dboard_iface::sptr - DBOARD_PROP_CODEC, //ro, wax::obj - DBOARD_PROP_GAIN_GROUP //ro, gain_group - }; - -}} //namespace - -#endif /* INCLUDED_UHD_USRP_DBOARD_PROPS_HPP */ diff --git a/host/include/uhd/usrp/device_props.hpp b/host/include/uhd/usrp/device_props.hpp deleted file mode 100644 index 3c8f7e225..000000000 --- a/host/include/uhd/usrp/device_props.hpp +++ /dev/null @@ -1,39 +0,0 @@ -// -// Copyright 2010-2011 Ettus Research LLC -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see <http://www.gnu.org/licenses/>. -// - -#ifndef INCLUDED_UHD_USRP_DEVICE_PROPS_HPP -#define INCLUDED_UHD_USRP_DEVICE_PROPS_HPP - -#include <uhd/utils/props.hpp> - -namespace uhd{ namespace usrp{ - - /*! - * Possible device properties: - * In general, a device will have a single mboard. - * In certain mimo applications, multiple boards - * will be present in the interface for configuration. - */ - enum device_prop_t{ - DEVICE_PROP_NAME, //ro, std::string - DEVICE_PROP_MBOARD, //ro, wax::obj - DEVICE_PROP_MBOARD_NAMES, //ro, prop_names_t - }; - -}} //namespace - -#endif /* INCLUDED_UHD_USRP_DEVICE_PROPS_HPP */ diff --git a/host/include/uhd/usrp/dsp_props.hpp b/host/include/uhd/usrp/dsp_props.hpp deleted file mode 100644 index e68e11deb..000000000 --- a/host/include/uhd/usrp/dsp_props.hpp +++ /dev/null @@ -1,50 +0,0 @@ -// -// Copyright 2010-2011 Ettus Research LLC -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see <http://www.gnu.org/licenses/>. -// - -#ifndef INCLUDED_UHD_USRP_DSP_PROPS_HPP -#define INCLUDED_UHD_USRP_DSP_PROPS_HPP - -#include <uhd/utils/props.hpp> - -namespace uhd{ namespace usrp{ - - /*! - * Possible device dsp properties: - * A dsp is a black box fpga component found between - * the over-the-wire data and the codec pins. - * - * The host rate can be modified to control resampling. - * Resampling can take the form of decimation, interpolation, - * or more complex fractional resampling techniques. - * As usual, read back the host rate after setting it - * to get the actual rate that was set (implementation dependent). - * - * A dsp can also shift the digital stream in frequency. - * Set the shift property and read it back to get actual shift. - */ - enum dsp_prop_t{ - DSP_PROP_NAME, //ro, std::string - DSP_PROP_OTHERS, //ro, prop_names_t - DSP_PROP_STREAM_CMD, //wo, stream_cmd_t - DSP_PROP_FREQ_SHIFT, //rw, double Hz - DSP_PROP_CODEC_RATE, //ro, double Sps - DSP_PROP_HOST_RATE //rw, double Sps - }; - -}} //namespace - -#endif /* INCLUDED_UHD_USRP_DSP_PROPS_HPP */ diff --git a/host/include/uhd/usrp/dsp_utils.hpp b/host/include/uhd/usrp/dsp_utils.hpp deleted file mode 100644 index 5b81ce322..000000000 --- a/host/include/uhd/usrp/dsp_utils.hpp +++ /dev/null @@ -1,96 +0,0 @@ -// -// Copyright 2010 Ettus Research LLC -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see <http://www.gnu.org/licenses/>. -// - -#ifndef INCLUDED_UHD_USRP_DSP_UTILS_HPP -#define INCLUDED_UHD_USRP_DSP_UTILS_HPP - -#include <uhd/config.hpp> -#include <uhd/types/stream_cmd.hpp> -#include <uhd/usrp/subdev_props.hpp> -#include <boost/cstdint.hpp> - -namespace uhd{ namespace usrp{ - -namespace dsp_type1{ - - /*! - * Calculate the rx mux word from properties. - * \param subdev_conn the subdev connection type - * \return the 32-bit rx mux control word - */ - UHD_API boost::uint32_t calc_rx_mux_word(subdev_conn_t subdev_conn); - - /*! - * Calculate the tx mux word from properties. - * \param subdev_conn the subdev connection type - * \return the 32-bit tx mux control word - */ - UHD_API boost::uint32_t calc_tx_mux_word(subdev_conn_t subdev_conn); - - /*! - * Calculate the cordic word from the frequency and clock rate. - * The frequency will be set to the actual (possible) frequency. - * - * \param freq the requested frequency in Hz - * \param codec_rate the dsp codec rate in Hz - * \return the 32-bit cordic control word - */ - UHD_API boost::uint32_t calc_cordic_word_and_update( - double &freq, double codec_rate - ); - - /*! - * Calculate the CIC filter word from the rate. - * Check if requested decim/interp rate is: - * multiple of 4, enable two halfband filters - * multiple of 2, enable one halfband filter - * handle remainder in CIC - * - * \param rate the requested rate in Sps - * \return the 32-bit cic filter control word - */ - UHD_API boost::uint32_t calc_cic_filter_word(unsigned rate); - - /*! - * Calculate the IQ scale factor word from I and Q components. - * \param i the I component of the scalar - * \param q the Q component of the scalar - * \return the 32-bit scale factor control word - */ - UHD_API boost::uint32_t calc_iq_scale_word( - boost::int16_t i, boost::int16_t q - ); - - /*! - * Calculate the IQ scale factor word from the rate. - * \param rate the requested rate in Sps - * \return the 32-bit scale factor control word - */ - UHD_API boost::uint32_t calc_iq_scale_word(unsigned rate); - - /*! - * Calculate the stream command word from the stream command struct. - * \param stream_cmd the requested stream command with mode, flags, timestamp - * \return the 32-bit stream command word - */ - UHD_API boost::uint32_t calc_stream_cmd_word(const stream_cmd_t &stream_cmd); - -} //namespace dsp_type1 - -}} //namespace - -#endif /* INCLUDED_UHD_USRP_DSP_UTILS_HPP */ diff --git a/host/include/uhd/usrp/mboard_props.hpp b/host/include/uhd/usrp/mboard_props.hpp deleted file mode 100644 index a2580954e..000000000 --- a/host/include/uhd/usrp/mboard_props.hpp +++ /dev/null @@ -1,56 +0,0 @@ -// -// Copyright 2010-2011 Ettus Research LLC -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see <http://www.gnu.org/licenses/>. -// - -#ifndef INCLUDED_UHD_USRP_MBOARD_PROPS_HPP -#define INCLUDED_UHD_USRP_MBOARD_PROPS_HPP - -#include <uhd/utils/props.hpp> - -namespace uhd{ namespace usrp{ - - /*! - * Possible device mboard properties: - * The general mboard properties are listed below. - * Custom properties can be identified with a string - * and discovered though the others property. - */ - enum mboard_prop_t{ - MBOARD_PROP_NAME, //ro, std::string - MBOARD_PROP_OTHERS, //ro, prop_names_t - MBOARD_PROP_SENSOR, //ro, sensor_value_t - MBOARD_PROP_SENSOR_NAMES, //ro, prop_names_t - MBOARD_PROP_CLOCK_RATE, //rw, double - MBOARD_PROP_RX_DSP, //ro, wax::obj - MBOARD_PROP_RX_DSP_NAMES, //ro, prop_names_t - MBOARD_PROP_TX_DSP, //ro, wax::obj - MBOARD_PROP_TX_DSP_NAMES, //ro, prop_names_t - MBOARD_PROP_RX_DBOARD, //ro, wax::obj - MBOARD_PROP_RX_DBOARD_NAMES, //ro, prop_names_t - MBOARD_PROP_TX_DBOARD, //ro, wax::obj - MBOARD_PROP_TX_DBOARD_NAMES, //ro, prop_names_t - MBOARD_PROP_RX_SUBDEV_SPEC, //rw, subdev_spec_t - MBOARD_PROP_TX_SUBDEV_SPEC, //rw, subdev_spec_t - MBOARD_PROP_CLOCK_CONFIG, //rw, clock_config_t - MBOARD_PROP_TIME_NOW, //rw, time_spec_t - MBOARD_PROP_TIME_PPS, //wo, time_spec_t - MBOARD_PROP_EEPROM_MAP, //wr, mboard_eeprom_t - MBOARD_PROP_IFACE, //ro, mboard_iface::sptr - }; - -}} //namespace - -#endif /* INCLUDED_UHD_USRP_MBOARD_PROPS_HPP */ diff --git a/host/include/uhd/usrp/misc_utils.hpp b/host/include/uhd/usrp/misc_utils.hpp deleted file mode 100644 index 37860a1a5..000000000 --- a/host/include/uhd/usrp/misc_utils.hpp +++ /dev/null @@ -1,71 +0,0 @@ -// -// Copyright 2010 Ettus Research LLC -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see <http://www.gnu.org/licenses/>. -// - -#ifndef INCLUDED_UHD_USRP_MISC_UTILS_HPP -#define INCLUDED_UHD_USRP_MISC_UTILS_HPP - -#include <uhd/config.hpp> -#include <uhd/wax.hpp> -#include <uhd/usrp/dboard_id.hpp> -#include <uhd/usrp/subdev_spec.hpp> -#include <uhd/utils/gain_group.hpp> - -namespace uhd{ namespace usrp{ - - /*! - * Different policies for gain group prioritization. - */ - enum gain_group_policy_t{ - GAIN_GROUP_POLICY_RX = 'R', - GAIN_GROUP_POLICY_TX = 'T' - }; - - /*! - * Create a gain group that represents the subdevice and its codec. - * \param dboard_id the dboard id for this subdevice - * \param subdev the object with subdevice properties - * \param codec the object with codec properties - * \param gain_group_policy the policy to use - */ - UHD_API gain_group::sptr make_gain_group( - const dboard_id_t &dboard_id, - wax::obj subdev, wax::obj codec, - gain_group_policy_t gain_group_policy - ); - - /*! - * Verify the rx subdevice specification. - * If the subdev spec if empty, automatically fill it. - * \param subdev_spec the subdev spec to verify/fill - * \param mboard the motherboard properties object - * \throw exception when the subdev spec is invalid - */ - UHD_API void verify_rx_subdev_spec(subdev_spec_t &subdev_spec, wax::obj mboard); - - /*! - * Verify the tx subdevice specification. - * If the subdev spec if empty, automatically fill it. - * \param subdev_spec the subdev spec to verify/fill - * \param mboard the motherboard properties object - * \throw exception when the subdev spec is invalid - */ - UHD_API void verify_tx_subdev_spec(subdev_spec_t &subdev_spec, wax::obj mboard); - -}} //namespace - -#endif /* INCLUDED_UHD_USRP_MISC_UTILS_HPP */ - diff --git a/host/include/uhd/usrp/subdev_props.hpp b/host/include/uhd/usrp/subdev_props.hpp deleted file mode 100644 index 40b339703..000000000 --- a/host/include/uhd/usrp/subdev_props.hpp +++ /dev/null @@ -1,64 +0,0 @@ -// -// Copyright 2010-2011 Ettus Research LLC -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see <http://www.gnu.org/licenses/>. -// - -#ifndef INCLUDED_UHD_USRP_SUBDEV_PROPS_HPP -#define INCLUDED_UHD_USRP_SUBDEV_PROPS_HPP - -#include <uhd/utils/props.hpp> - -namespace uhd{ namespace usrp{ - - /*! - * Possible subdev connection types: - * - * A complex subdevice is physically connected to both channels, - * which may be connected in one of two ways: IQ or QI (swapped). - * - * A real subdevice is only physically connected one channel, - * either only the I channel or only the Q channel. - */ - enum subdev_conn_t{ - SUBDEV_CONN_COMPLEX_IQ = 'C', - SUBDEV_CONN_COMPLEX_QI = 'c', - SUBDEV_CONN_REAL_I = 'R', - SUBDEV_CONN_REAL_Q = 'r' - }; - - /*! - * Possible device subdev properties - */ - enum subdev_prop_t{ - SUBDEV_PROP_NAME, //ro, std::string - SUBDEV_PROP_OTHERS, //ro, prop_names_t - SUBDEV_PROP_SENSOR, //ro, sensor_value_t - SUBDEV_PROP_SENSOR_NAMES, //ro, prop_names_t - SUBDEV_PROP_GAIN, //rw, double - SUBDEV_PROP_GAIN_RANGE, //ro, gain_range_t - SUBDEV_PROP_GAIN_NAMES, //ro, prop_names_t - SUBDEV_PROP_FREQ, //rw, double - SUBDEV_PROP_FREQ_RANGE, //ro, freq_range_t - SUBDEV_PROP_ANTENNA, //rw, std::string - SUBDEV_PROP_ANTENNA_NAMES, //ro, prop_names_t - SUBDEV_PROP_CONNECTION, //ro, subdev_conn_t - SUBDEV_PROP_ENABLED, //rw, bool - SUBDEV_PROP_USE_LO_OFFSET, //ro, bool - SUBDEV_PROP_BANDWIDTH //rw, double - }; - -}} //namespace - -#endif /* INCLUDED_UHD_USRP_SUBDEV_PROPS_HPP */ diff --git a/host/include/uhd/usrp/tune_helper.hpp b/host/include/uhd/usrp/tune_helper.hpp deleted file mode 100644 index 0d468a4e2..000000000 --- a/host/include/uhd/usrp/tune_helper.hpp +++ /dev/null @@ -1,78 +0,0 @@ -// -// Copyright 2010-2011 Ettus Research LLC -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see <http://www.gnu.org/licenses/>. -// - -#ifndef INCLUDED_UHD_USRP_TUNE_HELPER_HPP -#define INCLUDED_UHD_USRP_TUNE_HELPER_HPP - -#include <uhd/config.hpp> -#include <uhd/wax.hpp> -#include <uhd/types/tune_request.hpp> -#include <uhd/types/tune_result.hpp> - -namespace uhd{ namespace usrp{ - - /*! - * Tune a rx chain to the desired frequency: - * The IF of the subdevice is set as close as possible to - * the given target frequency + the LO offset (when applicable). - * The ddc cordic is setup to bring the IF down to baseband. - * \param subdev the dboard subdevice object with properties - * \param ddc the mboard dsp object with properties - * \param tune_request tune request instructions - * \return a tune result struct - */ - UHD_API tune_result_t tune_rx_subdev_and_dsp( - wax::obj subdev, wax::obj ddc, const tune_request_t &tune_request - ); - - /*! - * Calculate the overall frequency from the combination of dboard IF and DDC shift. - * \param subdev the dboard subdevice object with properties - * \param ddc the mboard dsp object with properties - * \return the overall tune frequency of the system in Hz - */ - UHD_API double derive_freq_from_rx_subdev_and_dsp( - wax::obj subdev, wax::obj ddc - ); - - /*! - * Tune a tx chain to the desired frequency: - * The IF of the subdevice is set as close as possible to - * the given target frequency + the LO offset (when applicable). - * The duc cordic is setup to bring the baseband up to IF. - * \param subdev the dboard subdevice object with properties - * \param duc the mboard dsp object with properties - * \param tune_request tune request instructions - * \return a tune result struct - */ - UHD_API tune_result_t tune_tx_subdev_and_dsp( - wax::obj subdev, wax::obj duc, const tune_request_t &tune_request - ); - - /*! - * Calculate the overall frequency from the combination of dboard IF and DUC shift. - * \param subdev the dboard subdevice object with properties - * \param duc the mboard dsp object with properties - * \return the overall tune frequency of the system in Hz - */ - UHD_API double derive_freq_from_tx_subdev_and_dsp( - wax::obj subdev, wax::obj duc - ); - -}} - -#endif /* INCLUDED_UHD_USRP_TUNE_HELPER_HPP */ |