diff options
| -rw-r--r-- | host/examples/benchmark_rate.cpp | 17 | ||||
| -rw-r--r-- | host/examples/rx_samples_to_file.cpp | 1 | ||||
| -rw-r--r-- | host/examples/tx_samples_from_file.cpp | 2 | ||||
| -rw-r--r-- | host/include/uhd/CMakeLists.txt | 1 | ||||
| -rw-r--r-- | host/include/uhd/deprecated.hpp | 67 | ||||
| -rw-r--r-- | host/include/uhd/device.hpp | 1 | ||||
| -rw-r--r-- | host/include/uhd/types/CMakeLists.txt | 2 | ||||
| -rw-r--r-- | host/include/uhd/types/clock_config.hpp | 57 | ||||
| -rw-r--r-- | host/include/uhd/types/otw_type.hpp | 2 | ||||
| -rw-r--r-- | host/include/uhd/usrp/multi_usrp.hpp | 12 | ||||
| -rw-r--r-- | host/lib/CMakeLists.txt | 1 | ||||
| -rw-r--r-- | host/lib/deprecated.cpp | 81 | ||||
| -rw-r--r-- | host/lib/usrp/b100/b100_impl.hpp | 1 | ||||
| -rw-r--r-- | host/lib/usrp/b200/b200_impl.hpp | 1 | ||||
| -rw-r--r-- | host/lib/usrp/multi_usrp.cpp | 23 | ||||
| -rw-r--r-- | host/lib/usrp/usrp1/usrp1_impl.hpp | 2 | ||||
| -rw-r--r-- | host/lib/usrp/usrp2/usrp2_impl.hpp | 1 | ||||
| -rwxr-xr-x | host/tests/devtest/multi_usrp_test.py | 1 | 
18 files changed, 1 insertions, 272 deletions
diff --git a/host/examples/benchmark_rate.cpp b/host/examples/benchmark_rate.cpp index 539958ede..dd67ebf3c 100644 --- a/host/examples/benchmark_rate.cpp +++ b/host/examples/benchmark_rate.cpp @@ -300,7 +300,7 @@ int UHD_SAFE_MAIN(int argc, char* argv[])      double rx_rate, tx_rate;      std::string rx_otw, tx_otw;      std::string rx_cpu, tx_cpu; -    std::string mode, ref, pps; +    std::string ref, pps;      std::string channel_list, rx_channel_list, tx_channel_list;      bool random_nsamps = false;      std::atomic<bool> burst_timer_elapsed(false); @@ -323,7 +323,6 @@ int UHD_SAFE_MAIN(int argc, char* argv[])          ("tx_cpu", po::value<std::string>(&tx_cpu)->default_value("fc32"), "specify the host/cpu sample mode for TX")          ("ref", po::value<std::string>(&ref), "clock reference (internal, external, mimo, gpsdo)")          ("pps", po::value<std::string>(&pps), "PPS source (internal, external, mimo, gpsdo)") -        ("mode", po::value<std::string>(&mode), "DEPRECATED - use \"ref\" and \"pps\" instead (none, mimo)")          ("random", "Run with random values of samples in send() and recv() to stress-test the I/O.")          ("channels", po::value<std::string>(&channel_list)->default_value("0"), "which channel(s) to use (specify \"0\", \"1\", \"0,1\", etc)")          ("rx_channels", po::value<std::string>(&rx_channel_list), "which RX channel(s) to use (specify \"0\", \"1\", \"0,1\", etc)") @@ -359,20 +358,6 @@ int UHD_SAFE_MAIN(int argc, char* argv[])          random_nsamps = true;      } -    if (vm.count("mode")) { -        if (vm.count("pps") or vm.count("ref")) { -            std::cout << "ERROR: The \"mode\" parameter cannot be used with the \"ref\" " -                         "and \"pps\" parameters.\n" -                      << std::endl; -            return -1; -        } else if (mode == "mimo") { -            ref = pps = "mimo"; -            std::cout << "The use of the \"mode\" parameter is deprecated.  Please use " -                         "\"ref\" and \"pps\" parameters instead\n" -                      << std::endl; -        } -    } -      // create a usrp device      std::cout << std::endl;      uhd::device_addrs_t device_addrs = uhd::device::find(args, uhd::device::USRP); diff --git a/host/examples/rx_samples_to_file.cpp b/host/examples/rx_samples_to_file.cpp index 3a0fe5b5e..235a9b97b 100644 --- a/host/examples/rx_samples_to_file.cpp +++ b/host/examples/rx_samples_to_file.cpp @@ -230,7 +230,6 @@ int UHD_SAFE_MAIN(int argc, char* argv[])          ("type", po::value<std::string>(&type)->default_value("short"), "sample type: double, float, or short")          ("nsamps", po::value<size_t>(&total_num_samps)->default_value(0), "total number of samples to receive")          ("duration", po::value<double>(&total_time)->default_value(0), "total number of seconds to receive") -        ("time", po::value<double>(&total_time), "(DEPRECATED) will go away soon! Use --duration instead")          ("spb", po::value<size_t>(&spb)->default_value(10000), "samples per buffer")          ("rate", po::value<double>(&rate)->default_value(1e6), "rate of incoming samples")          ("freq", po::value<double>(&freq)->default_value(0.0), "RF center frequency in Hz") diff --git a/host/examples/tx_samples_from_file.cpp b/host/examples/tx_samples_from_file.cpp index 7493718d2..89e961b38 100644 --- a/host/examples/tx_samples_from_file.cpp +++ b/host/examples/tx_samples_from_file.cpp @@ -70,8 +70,6 @@ int UHD_SAFE_MAIN(int argc, char* argv[])          ("freq", po::value<double>(&freq), "RF center frequency in Hz")          ("lo-offset", po::value<double>(&lo_offset)->default_value(0.0),              "Offset for frontend LO in Hz (optional)") -        ("lo_off", po::value<double>(&lo_offset), -            "(DEPRECATED) will go away soon! Use --lo-offset instead")          ("gain", po::value<double>(&gain), "gain for the RF chain")          ("ant", po::value<std::string>(&ant), "antenna selection")          ("subdev", po::value<std::string>(&subdev), "subdevice specification") diff --git a/host/include/uhd/CMakeLists.txt b/host/include/uhd/CMakeLists.txt index 6a103fa18..5bb736567 100644 --- a/host/include/uhd/CMakeLists.txt +++ b/host/include/uhd/CMakeLists.txt @@ -21,7 +21,6 @@ UHD_INSTALL(FILES      build_info.hpp      config.hpp      convert.hpp -    deprecated.hpp      device.hpp      exception.hpp      property_tree.ipp diff --git a/host/include/uhd/deprecated.hpp b/host/include/uhd/deprecated.hpp deleted file mode 100644 index 0eeefecee..000000000 --- a/host/include/uhd/deprecated.hpp +++ /dev/null @@ -1,67 +0,0 @@ -//---------------------------------------------------------------------- -//-- deprecated interfaces below, to be removed when the API is changed -//---------------------------------------------------------------------- - -// -// Copyright 2010 Ettus Research LLC -// Copyright 2018 Ettus Research, a National Instruments Company -// -// SPDX-License-Identifier: GPL-3.0-or-later -// - -#ifndef INCLUDED_UHD_TYPES_OTW_TYPE_HPP -#    define INCLUDED_UHD_TYPES_OTW_TYPE_HPP - -#    include <uhd/config.hpp> -#    include <cstddef> - -namespace uhd { - -/*! - * Description for over-the-wire integers: - * The DSP units in the FPGA deal with signed 16-bit integers. - * The width and shift define the translation between OTW and DSP, - * defined by the following relation: otw_int = dsp_int >> shift - * - * Note: possible combinations of width, shift, and byteorder - * depend on the internals of the FPGA. Not all are supported! - */ -struct UHD_API otw_type_t -{ -    /*! -     * Width of an over-the-wire integer in bits. -     */ -    size_t width; // in bits - -    /*! -     * Shift of an over-the-wire integer in bits. -     * otw_int = dsp_int >> shift -     * dsp_int = otw_int << shift -     */ -    size_t shift; // in bits - -    /*! -     * Constants for byte order (borrowed from numpy's dtype) -     */ -    enum /*bo_t*/ { -        BO_NATIVE         = int('='), -        BO_LITTLE_ENDIAN  = int('<'), -        BO_BIG_ENDIAN     = int('>'), -        BO_NOT_APPLICABLE = int('|') -    } byteorder; - -    /*! -     * Get the sample size of this otw type. -     * \return the size of a sample in bytes -     */ -    size_t get_sample_size(void) const; - -    otw_type_t(void); -}; - -} // namespace uhd - -#endif /* INCLUDED_UHD_TYPES_OTW_TYPE_HPP */ - -#include <uhd/types/clock_config.hpp> //wish it was in here -#include <uhd/types/io_type.hpp> //wish it was in here diff --git a/host/include/uhd/device.hpp b/host/include/uhd/device.hpp index d2bf4785c..44f74b210 100644 --- a/host/include/uhd/device.hpp +++ b/host/include/uhd/device.hpp @@ -9,7 +9,6 @@  #define INCLUDED_UHD_DEVICE_HPP  #include <uhd/config.hpp> -#include <uhd/deprecated.hpp>  #include <uhd/property_tree.hpp>  #include <uhd/stream.hpp>  #include <uhd/types/device_addr.hpp> diff --git a/host/include/uhd/types/CMakeLists.txt b/host/include/uhd/types/CMakeLists.txt index 40163cb7c..a0eccc3f0 100644 --- a/host/include/uhd/types/CMakeLists.txt +++ b/host/include/uhd/types/CMakeLists.txt @@ -8,7 +8,6 @@  UHD_INSTALL(FILES      byte_vector.hpp -    clock_config.hpp      device_addr.hpp      dict.ipp      dict.hpp @@ -17,7 +16,6 @@ UHD_INSTALL(FILES      io_type.hpp      mac_addr.hpp      metadata.hpp -    otw_type.hpp      ranges.hpp      ref_vector.hpp      sensors.hpp diff --git a/host/include/uhd/types/clock_config.hpp b/host/include/uhd/types/clock_config.hpp deleted file mode 100644 index 30a754f54..000000000 --- a/host/include/uhd/types/clock_config.hpp +++ /dev/null @@ -1,57 +0,0 @@ -// -// Copyright 2010-2011 Ettus Research LLC -// Copyright 2018 Ettus Research, a National Instruments Company -// -// SPDX-License-Identifier: GPL-3.0-or-later -// - -#ifndef INCLUDED_UHD_TYPES_CLOCK_CONFIG_HPP -#define INCLUDED_UHD_TYPES_CLOCK_CONFIG_HPP - -#include <uhd/config.hpp> - -namespace uhd { - -/*! - * The DEPRECATED Clock configuration settings: - * The source for the 10MHz reference clock. - * The source and polarity for the PPS clock. - * - * Deprecated in favor of set time/clock source calls. - * Its still in this file for the sake of gr-uhd swig. - * - * Use the convenience functions external() and internal(), - * unless you have a special purpose and cannot use them. - */ -struct UHD_API clock_config_t -{ -    //------ simple usage --------// - -    //! A convenience function to create an external clock configuration -    static clock_config_t external(void); - -    //! A convenience function to create an internal clock configuration -    static clock_config_t internal(void); - -    //------ advanced usage --------// -    enum ref_source_t { -        REF_AUTO = int('a'), // automatic (device specific) -        REF_INT  = int('i'), // internal reference -        REF_SMA  = int('s'), // external sma port -        REF_MIMO = int('m') // reference from mimo cable -    } ref_source; -    enum pps_source_t { -        PPS_INT  = int('i'), // there is no internal -        PPS_SMA  = int('s'), // external sma port -        PPS_MIMO = int('m') // time sync from mimo cable -    } pps_source; -    enum pps_polarity_t { -        PPS_NEG = int('n'), // negative edge -        PPS_POS = int('p') // positive edge -    } pps_polarity; -    clock_config_t(void); -}; - -} // namespace uhd - -#endif /* INCLUDED_UHD_TYPES_CLOCK_CONFIG_HPP */ diff --git a/host/include/uhd/types/otw_type.hpp b/host/include/uhd/types/otw_type.hpp deleted file mode 100644 index ff761cc55..000000000 --- a/host/include/uhd/types/otw_type.hpp +++ /dev/null @@ -1,2 +0,0 @@ -// The OTW type API has been deprecated in favor of the streamer interface -#include <uhd/deprecated.hpp> diff --git a/host/include/uhd/usrp/multi_usrp.hpp b/host/include/uhd/usrp/multi_usrp.hpp index 6ea711be2..b7710e036 100644 --- a/host/include/uhd/usrp/multi_usrp.hpp +++ b/host/include/uhd/usrp/multi_usrp.hpp @@ -25,7 +25,6 @@  #define UHD_USRP_MULTI_USRP_TX_LO_CONFIG_API  #include <uhd/config.hpp> -#include <uhd/deprecated.hpp>  #include <uhd/device.hpp>  #include <uhd/types/filters.hpp>  #include <uhd/types/ranges.hpp> @@ -337,17 +336,6 @@ public:      virtual void issue_stream_cmd(          const stream_cmd_t& stream_cmd, size_t chan = ALL_CHANS) = 0; -    /*! -     * Set the clock configuration for the usrp device. -     * DEPRECATED in favor of set time and clock source calls. -     * This tells the usrp how to get a 10MHz reference and PPS clock. -     * See the documentation for clock_config_t for more info. -     * \param clock_config the clock configuration to set -     * \param mboard which motherboard to set the config -     */ -    virtual void set_clock_config( -        const clock_config_t& clock_config, size_t mboard = ALL_MBOARDS) = 0; -      /*!  Set the time source for the USRP device       *       * This sets the method of time synchronization, typically a pulse per diff --git a/host/lib/CMakeLists.txt b/host/lib/CMakeLists.txt index 2ca216341..d15c8b264 100644 --- a/host/lib/CMakeLists.txt +++ b/host/lib/CMakeLists.txt @@ -115,7 +115,6 @@ configure_file(  ########################################################################  LIBUHD_APPEND_SOURCES(      ${CMAKE_CURRENT_BINARY_DIR}/build_info.cpp -    ${CMAKE_CURRENT_SOURCE_DIR}/deprecated.cpp      ${CMAKE_CURRENT_SOURCE_DIR}/device.cpp      ${CMAKE_CURRENT_SOURCE_DIR}/device3.cpp      ${CMAKE_CURRENT_SOURCE_DIR}/image_loader.cpp diff --git a/host/lib/deprecated.cpp b/host/lib/deprecated.cpp deleted file mode 100644 index 839f7a3e8..000000000 --- a/host/lib/deprecated.cpp +++ /dev/null @@ -1,81 +0,0 @@ -//---------------------------------------------------------------------- -//-- deprecated interfaces below, to be removed when the API is changed -//---------------------------------------------------------------------- - -#include <uhd/types/otw_type.hpp> -#include <uhd/types/io_type.hpp> -#include <stdint.h> -#include <stdexcept> -#include <complex> -#include <vector> - -using namespace uhd; - -/*********************************************************************** - * otw type - **********************************************************************/ -size_t otw_type_t::get_sample_size(void) const{ -    return (this->width * 2) / 8; -} - -otw_type_t::otw_type_t(void): -    width(0), -    shift(0), -    byteorder(BO_NATIVE) -{ -    /* NOP */ -} - -/*********************************************************************** - * io type - **********************************************************************/ -static std::vector<size_t> get_tid_size_table(void){ -    std::vector<size_t> table(128, 0); -    table[size_t(io_type_t::COMPLEX_FLOAT64)] = sizeof(std::complex<double>); -    table[size_t(io_type_t::COMPLEX_FLOAT32)] = sizeof(std::complex<float>); -    table[size_t(io_type_t::COMPLEX_INT16)]   = sizeof(std::complex<int16_t>); -    table[size_t(io_type_t::COMPLEX_INT8)]    = sizeof(std::complex<int8_t>); -    return table; -} - -static const std::vector<size_t> tid_size_table(get_tid_size_table()); - -io_type_t::io_type_t(tid_t tid): -    size(tid_size_table[size_t(tid) & 0x7f]), tid(tid) -{ -    /* NOP */ -} - -io_type_t::io_type_t(size_t size): -    size(size), tid(CUSTOM_TYPE) -{ -    /* NOP */ -} - -#include <uhd/types/clock_config.hpp> - -using namespace uhd; - -clock_config_t clock_config_t::external(void){ -    clock_config_t clock_config; -    clock_config.ref_source = clock_config_t::REF_SMA; -    clock_config.pps_source = clock_config_t::PPS_SMA; -    clock_config.pps_polarity = clock_config_t::PPS_POS; -    return clock_config; -} - -clock_config_t clock_config_t::internal(void){ -    clock_config_t clock_config; -    clock_config.ref_source = clock_config_t::REF_INT; -    clock_config.pps_source = clock_config_t::PPS_SMA; -    clock_config.pps_polarity = clock_config_t::PPS_POS; -    return clock_config; -} - -clock_config_t::clock_config_t(void): -    ref_source(REF_INT), -    pps_source(PPS_SMA), -    pps_polarity(PPS_POS) -{ -    /* NOP */ -} diff --git a/host/lib/usrp/b100/b100_impl.hpp b/host/lib/usrp/b100/b100_impl.hpp index a0bfcb8ef..492db5740 100644 --- a/host/lib/usrp/b100/b100_impl.hpp +++ b/host/lib/usrp/b100/b100_impl.hpp @@ -15,7 +15,6 @@  #include <uhd/property_tree.hpp>  #include <uhd/types/dict.hpp>  #include <uhd/types/sensors.hpp> -#include <uhd/types/clock_config.hpp>  #include <uhd/types/stream_cmd.hpp>  #include <uhd/usrp/mboard_eeprom.hpp>  #include <uhd/usrp/subdev_spec.hpp> diff --git a/host/lib/usrp/b200/b200_impl.hpp b/host/lib/usrp/b200/b200_impl.hpp index 95fbe6ad2..6e777d4d6 100644 --- a/host/lib/usrp/b200/b200_impl.hpp +++ b/host/lib/usrp/b200/b200_impl.hpp @@ -17,7 +17,6 @@  #include <uhd/utils/tasks.hpp>  #include <uhd/types/dict.hpp>  #include <uhd/types/sensors.hpp> -#include <uhd/types/clock_config.hpp>  #include <uhd/types/stream_cmd.hpp>  #include <uhd/usrp/mboard_eeprom.hpp>  #include <uhd/usrp/subdev_spec.hpp> diff --git a/host/lib/usrp/multi_usrp.cpp b/host/lib/usrp/multi_usrp.cpp index df36110cc..19d710349 100644 --- a/host/lib/usrp/multi_usrp.cpp +++ b/host/lib/usrp/multi_usrp.cpp @@ -697,29 +697,6 @@ public:          }      } -    void set_clock_config(const clock_config_t &clock_config, size_t mboard){ -        //set the reference source... -        std::string clock_source; -        switch(clock_config.ref_source){ -        case clock_config_t::REF_INT: clock_source = "internal"; break; -        case clock_config_t::REF_SMA: clock_source = "external"; break; -        case clock_config_t::REF_MIMO: clock_source = "mimo"; break; -        default: clock_source = "unknown"; -        } -        this->set_clock_source(clock_source, mboard); - -        //set the time source -        std::string time_source; -        switch(clock_config.pps_source){ -        case clock_config_t::PPS_INT: time_source = "internal"; break; -        case clock_config_t::PPS_SMA: time_source = "external"; break; -        case clock_config_t::PPS_MIMO: time_source = "mimo"; break; -        default: time_source = "unknown"; -        } -        if (time_source == "external" and clock_config.pps_polarity == clock_config_t::PPS_NEG) time_source = "_external_"; -        this->set_time_source(time_source, mboard); -    } -      void set_time_source(const std::string &source, const size_t mboard){          if (mboard != ALL_MBOARDS){              const auto time_source_path = diff --git a/host/lib/usrp/usrp1/usrp1_impl.hpp b/host/lib/usrp/usrp1/usrp1_impl.hpp index e26fa44d0..1cf8362e1 100644 --- a/host/lib/usrp/usrp1/usrp1_impl.hpp +++ b/host/lib/usrp/usrp1/usrp1_impl.hpp @@ -12,8 +12,6 @@  #include <uhd/property_tree.hpp>  #include <uhd/utils/pimpl.hpp>  #include <uhd/types/dict.hpp> -#include <uhd/types/otw_type.hpp> -#include <uhd/types/clock_config.hpp>  #include <uhd/types/stream_cmd.hpp>  #include <uhd/usrp/dboard_id.hpp>  #include <uhd/usrp/mboard_eeprom.hpp> diff --git a/host/lib/usrp/usrp2/usrp2_impl.hpp b/host/lib/usrp/usrp2/usrp2_impl.hpp index 0e164e537..4c86ca7c8 100644 --- a/host/lib/usrp/usrp2/usrp2_impl.hpp +++ b/host/lib/usrp/usrp2/usrp2_impl.hpp @@ -25,7 +25,6 @@  #include <uhd/utils/pimpl.hpp>  #include <uhd/types/dict.hpp>  #include <uhd/types/stream_cmd.hpp> -#include <uhd/types/clock_config.hpp>  #include <uhd/usrp/dboard_eeprom.hpp>  #include <uhd/transport/vrt_if_packet.hpp>  #include <uhd/transport/udp_simple.hpp> diff --git a/host/tests/devtest/multi_usrp_test.py b/host/tests/devtest/multi_usrp_test.py index d18ec1f67..04baf904e 100755 --- a/host/tests/devtest/multi_usrp_test.py +++ b/host/tests/devtest/multi_usrp_test.py @@ -567,7 +567,6 @@ def run_api_test(usrp):                      'set_tx_lo_export_enabled',  # Not supported w/all devices.                      'set_time_source_out',  # Not supported on all devices.                      'get_register_info',  # Requires path to register -                    'set_clock_config',  # Requires clock_config_t input                      'get_rx_stream', 'get_tx_stream',  # Require stream_args_t                      # Need register path, but enumerate_registers returns None                      'read_register', 'write_register',  | 
