From 8c182d75e7adc20ff12cbc1065debd8dd4f2ef9d Mon Sep 17 00:00:00 2001 From: Josh Blum Date: Mon, 3 Oct 2011 11:35:16 -0700 Subject: uhd: removed unsed interfaces, deprecated otw and io type --- host/lib/deprecated.cpp | 50 ++++++++++++++++++++++++++++++++++++++++++++++++ host/lib/types/types.cpp | 47 --------------------------------------------- 2 files changed, 50 insertions(+), 47 deletions(-) (limited to 'host/lib') diff --git a/host/lib/deprecated.cpp b/host/lib/deprecated.cpp index eeaba03cb..dd4cc02ad 100644 --- a/host/lib/deprecated.cpp +++ b/host/lib/deprecated.cpp @@ -153,3 +153,53 @@ void wax::obj::get(const obj &, obj &){ void wax::obj::set(const obj &, const obj &){ throw uhd::type_error("Cannot call set on wax obj base class"); } + +#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 */ +} diff --git a/host/lib/types/types.cpp b/host/lib/types/types.cpp index 7c65d2997..1a3e7e860 100644 --- a/host/lib/types/types.cpp +++ b/host/lib/types/types.cpp @@ -17,12 +17,6 @@ #include #include -#include -#include -#include -#include -#include -#include using namespace uhd; @@ -48,44 +42,3 @@ tx_metadata_t::tx_metadata_t(void): { /* NOP */ } - -/*********************************************************************** - * 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 */ -} -- cgit v1.2.3