From a61ff0b0fc76ffdb66dbd836242f6c5fb6df461d Mon Sep 17 00:00:00 2001 From: Xavier Arteaga Date: Tue, 3 Mar 2020 17:27:04 +0100 Subject: [PATCH] SRSENB cleanup phy common --- srsenb/hdr/phy/phy_common.h | 7 +------ srsenb/hdr/phy/txrx.h | 7 +++---- srsenb/src/phy/phy.cc | 6 +----- srsenb/src/phy/phy_common.cc | 11 ----------- srsenb/src/phy/txrx.cc | 1 - 5 files changed, 5 insertions(+), 27 deletions(-) diff --git a/srsenb/hdr/phy/phy_common.h b/srsenb/hdr/phy/phy_common.h index a4a20fff0..c40bc969e 100644 --- a/srsenb/hdr/phy/phy_common.h +++ b/srsenb/hdr/phy/phy_common.h @@ -43,9 +43,7 @@ namespace srsenb { class phy_common { public: - explicit phy_common(uint32_t nof_workers); - - void set_nof_workers(uint32_t nof_workers); + phy_common() = default; bool init(const phy_cell_cfg_list_t& cell_list_, srslte::radio_interface_phy* radio_handler, stack_interface_phy_lte* mac); @@ -158,9 +156,6 @@ public: private: phy_cell_cfg_list_t cell_list; - uint32_t nof_workers = 0; - uint32_t max_workers = 0; - bool have_mtch_stop = false; pthread_mutex_t mtch_mutex = {}; pthread_cond_t mtch_cvar = {}; diff --git a/srsenb/hdr/phy/txrx.h b/srsenb/hdr/phy/txrx.h index 62c305ffb..4a57fc126 100644 --- a/srsenb/hdr/phy/txrx.h +++ b/srsenb/hdr/phy/txrx.h @@ -27,14 +27,13 @@ #include "srslte/common/log.h" #include "srslte/common/thread_pool.h" #include "srslte/common/threads.h" +#include "srslte/config.h" #include "srslte/phy/channel/channel.h" #include "srslte/radio/radio.h" namespace srsenb { -typedef _Complex float cf_t; - -class txrx : public srslte::thread +class txrx final : public srslte::thread { public: txrx(); @@ -47,7 +46,7 @@ public: void stop(); private: - void run_thread() final; + void run_thread() override; srslte::radio_interface_phy* radio_h = nullptr; srslte::log* log_h = nullptr; diff --git a/srsenb/src/phy/phy.cc b/srsenb/src/phy/phy.cc index d3aa4625d..f15b7d8ab 100644 --- a/srsenb/src/phy/phy.cc +++ b/srsenb/src/phy/phy.cc @@ -50,11 +50,7 @@ using namespace asn1::rrc; namespace srsenb { phy::phy(srslte::logger* logger_) : - logger(logger_), - workers_pool(MAX_WORKERS), - workers(MAX_WORKERS), - workers_common(MAX_WORKERS), - nof_workers(0) + logger(logger_), workers_pool(MAX_WORKERS), workers(MAX_WORKERS), workers_common(), nof_workers(0) { } diff --git a/srsenb/src/phy/phy_common.cc b/srsenb/src/phy/phy_common.cc index 8fc76ddb7..5d1e1e398 100644 --- a/srsenb/src/phy/phy_common.cc +++ b/srsenb/src/phy/phy_common.cc @@ -46,17 +46,6 @@ using namespace asn1::rrc; namespace srsenb { -phy_common::phy_common(uint32_t max_workers_) : cell_list(), ue_db() -{ - params.max_prach_offset_us = 20; - max_workers = max_workers_; -} - -void phy_common::set_nof_workers(uint32_t nof_workers_) -{ - nof_workers = nof_workers_; -} - void phy_common::reset() { for (auto& q : dl_grants) { diff --git a/srsenb/src/phy/txrx.cc b/srsenb/src/phy/txrx.cc index 056044ef4..e994501fe 100644 --- a/srsenb/src/phy/txrx.cc +++ b/srsenb/src/phy/txrx.cc @@ -66,7 +66,6 @@ bool txrx::init(srslte::radio_interface_phy* radio_h_, running = true; nof_workers = workers_pool->get_nof_workers(); - worker_com->set_nof_workers(nof_workers); // Instantiate UL channel emulator if (worker_com->params.ul_channel_args.enable) {