mirror of https://github.com/PentHertz/srsLTE.git
SRSENB cleanup phy common
This commit is contained in:
parent
cac2ee33b6
commit
a61ff0b0fc
|
@ -43,9 +43,7 @@ namespace srsenb {
|
||||||
class phy_common
|
class phy_common
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
explicit phy_common(uint32_t nof_workers);
|
phy_common() = default;
|
||||||
|
|
||||||
void set_nof_workers(uint32_t nof_workers);
|
|
||||||
|
|
||||||
bool
|
bool
|
||||||
init(const phy_cell_cfg_list_t& cell_list_, srslte::radio_interface_phy* radio_handler, stack_interface_phy_lte* mac);
|
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:
|
private:
|
||||||
phy_cell_cfg_list_t cell_list;
|
phy_cell_cfg_list_t cell_list;
|
||||||
|
|
||||||
uint32_t nof_workers = 0;
|
|
||||||
uint32_t max_workers = 0;
|
|
||||||
|
|
||||||
bool have_mtch_stop = false;
|
bool have_mtch_stop = false;
|
||||||
pthread_mutex_t mtch_mutex = {};
|
pthread_mutex_t mtch_mutex = {};
|
||||||
pthread_cond_t mtch_cvar = {};
|
pthread_cond_t mtch_cvar = {};
|
||||||
|
|
|
@ -27,14 +27,13 @@
|
||||||
#include "srslte/common/log.h"
|
#include "srslte/common/log.h"
|
||||||
#include "srslte/common/thread_pool.h"
|
#include "srslte/common/thread_pool.h"
|
||||||
#include "srslte/common/threads.h"
|
#include "srslte/common/threads.h"
|
||||||
|
#include "srslte/config.h"
|
||||||
#include "srslte/phy/channel/channel.h"
|
#include "srslte/phy/channel/channel.h"
|
||||||
#include "srslte/radio/radio.h"
|
#include "srslte/radio/radio.h"
|
||||||
|
|
||||||
namespace srsenb {
|
namespace srsenb {
|
||||||
|
|
||||||
typedef _Complex float cf_t;
|
class txrx final : public srslte::thread
|
||||||
|
|
||||||
class txrx : public srslte::thread
|
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
txrx();
|
txrx();
|
||||||
|
@ -47,7 +46,7 @@ public:
|
||||||
void stop();
|
void stop();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void run_thread() final;
|
void run_thread() override;
|
||||||
|
|
||||||
srslte::radio_interface_phy* radio_h = nullptr;
|
srslte::radio_interface_phy* radio_h = nullptr;
|
||||||
srslte::log* log_h = nullptr;
|
srslte::log* log_h = nullptr;
|
||||||
|
|
|
@ -50,11 +50,7 @@ using namespace asn1::rrc;
|
||||||
namespace srsenb {
|
namespace srsenb {
|
||||||
|
|
||||||
phy::phy(srslte::logger* logger_) :
|
phy::phy(srslte::logger* logger_) :
|
||||||
logger(logger_),
|
logger(logger_), workers_pool(MAX_WORKERS), workers(MAX_WORKERS), workers_common(), nof_workers(0)
|
||||||
workers_pool(MAX_WORKERS),
|
|
||||||
workers(MAX_WORKERS),
|
|
||||||
workers_common(MAX_WORKERS),
|
|
||||||
nof_workers(0)
|
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -46,17 +46,6 @@ using namespace asn1::rrc;
|
||||||
|
|
||||||
namespace srsenb {
|
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()
|
void phy_common::reset()
|
||||||
{
|
{
|
||||||
for (auto& q : dl_grants) {
|
for (auto& q : dl_grants) {
|
||||||
|
|
|
@ -66,7 +66,6 @@ bool txrx::init(srslte::radio_interface_phy* radio_h_,
|
||||||
running = true;
|
running = true;
|
||||||
|
|
||||||
nof_workers = workers_pool->get_nof_workers();
|
nof_workers = workers_pool->get_nof_workers();
|
||||||
worker_com->set_nof_workers(nof_workers);
|
|
||||||
|
|
||||||
// Instantiate UL channel emulator
|
// Instantiate UL channel emulator
|
||||||
if (worker_com->params.ul_channel_args.enable) {
|
if (worker_com->params.ul_channel_args.enable) {
|
||||||
|
|
Loading…
Reference in New Issue