From 2ed94af7726e0f22e765950618ae87bb507e773a Mon Sep 17 00:00:00 2001 From: Martin Braun Date: Mon, 10 Jun 2019 23:15:22 -0700 Subject: uhd: Remove deprecated objects and methods This removes the following symbols: - otw_type_t - clock_config_t - Any functions that use those symbols - Non-standard args from examples (e.g., --total-time is deprecated in favour of --duration) --- host/lib/CMakeLists.txt | 1 - host/lib/deprecated.cpp | 81 -------------------------------------- host/lib/usrp/b100/b100_impl.hpp | 1 - host/lib/usrp/b200/b200_impl.hpp | 1 - host/lib/usrp/multi_usrp.cpp | 23 ----------- host/lib/usrp/usrp1/usrp1_impl.hpp | 2 - host/lib/usrp/usrp2/usrp2_impl.hpp | 1 - 7 files changed, 110 deletions(-) delete mode 100644 host/lib/deprecated.cpp (limited to 'host/lib') 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 -#include -#include -#include -#include -#include - -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 get_tid_size_table(void){ - std::vector table(128, 0); - table[size_t(io_type_t::COMPLEX_FLOAT64)] = sizeof(std::complex); - table[size_t(io_type_t::COMPLEX_FLOAT32)] = sizeof(std::complex); - table[size_t(io_type_t::COMPLEX_INT16)] = sizeof(std::complex); - table[size_t(io_type_t::COMPLEX_INT8)] = sizeof(std::complex); - return table; -} - -static const std::vector 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 - -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 #include #include -#include #include #include #include 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 #include #include -#include #include #include #include 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 #include #include -#include -#include #include #include #include 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 #include #include -#include #include #include #include -- cgit v1.2.3