ue: remove stack type parameter

for the moment we always use the LTE stack (also for NSA mode).
For SA we likely pick a smarter approach to pick the stack type, i.e.
using the ARFCN specified in the config.
master
Andre Puschmann 3 years ago
parent b134781d36
commit 26cc6d7886

@ -56,7 +56,6 @@ typedef struct {
} stack_log_args_t;
typedef struct {
std::string type;
pkt_trace_args_t pkt_trace;
stack_log_args_t log;
usim_args_t usim;

@ -67,7 +67,6 @@ static int parse_args(all_args_t* args, int argc, char* argv[])
common.add_options()
("ue.radio", bpo::value<string>(&args->rf.type)->default_value("multi"), "Type of the radio [multi]")
("ue.phy", bpo::value<string>(&args->phy.type)->default_value("lte"), "Type of the PHY [lte]")
("ue.stack", bpo::value<string>(&args->stack.type)->default_value("lte"), "Type of the upper stack [lte, nr]")
("rf.srate", bpo::value<double>(&args->rf.srate_hz)->default_value(0.0), "Force Tx and Rx sampling rate in Hz")
("rf.freq_offset", bpo::value<float>(&args->rf.freq_offset)->default_value(0), "(optional) Frequency offset")

@ -50,11 +50,9 @@ int ttcn3_ue::init(all_args_t args, syssim_interface_phy* syssim_, const std::st
args.phy.dl_earfcn = "3400";
args.rf.type = "none";
args.stack.type = "lte";
args.phy.type = "lte_ttcn3";
// Instantiate layers and stack together our UE
if (args.stack.type == "lte") {
stack = std::unique_ptr<ue_stack_lte>(new ue_stack_lte);
if (!stack) {
srsran::console("Error creating LTE stack instance.\n");
@ -66,10 +64,6 @@ int ttcn3_ue::init(all_args_t args, syssim_interface_phy* syssim_, const std::st
srsran::console("Error creating LTE PHY instance.\n");
return SRSRAN_ERROR;
}
} else {
srsran::console("Invalid stack type %s. Supported values are [lte].\n", args.stack.type.c_str());
return SRSRAN_ERROR;
}
// init layers
if (phy->init(args.phy, stack.get(), syssim_)) {

@ -54,7 +54,6 @@ int ue::init(const all_args_t& args_)
}
// Instantiate layers and stack together our UE
if (args.stack.type == "lte") {
std::unique_ptr<ue_stack_lte> lte_stack(new ue_stack_lte);
if (!lte_stack) {
srsran::console("Error creating LTE stack instance.\n");
@ -119,43 +118,6 @@ int ue::init(const all_args_t& args_)
gw_inst = std::move(gw_ptr);
phy = std::move(lte_phy);
radio = std::move(lte_radio);
} else if (args.stack.type == "nr") {
logger.info("Initializing NR stack");
std::unique_ptr<srsue::ue_stack_nr> nr_stack(new srsue::ue_stack_nr());
std::unique_ptr<srsran::radio_null> nr_radio(new srsran::radio_null);
std::unique_ptr<srsue::ue_phy_base> nr_phy;
std::unique_ptr<gw> gw_ptr(new gw(srslog::fetch_basic_logger("GW")));
// Init layers
if (nr_radio->init(args.rf, nullptr)) {
srsran::console("Error initializing radio.\n");
return SRSRAN_ERROR;
}
if (nr_phy->init(args.phy)) {
srsran::console("Error initializing PHY.\n");
return SRSRAN_ERROR;
}
if (nr_stack->init(args.stack)) {
srsran::console("Error initializing stack.\n");
return SRSRAN_ERROR;
}
if (gw_ptr->init(args.gw, nr_stack.get())) {
srsran::console("Error initializing GW.\n");
return SRSRAN_ERROR;
}
// move ownership
stack = std::move(nr_stack);
gw_inst = std::move(gw_ptr);
phy = std::move(nr_phy);
radio = std::move(nr_radio);
} else {
srsran::console("Invalid stack type %s. Supported values are [lte].\n", args.stack.type.c_str());
ret = SRSRAN_ERROR;
}
if (phy) {
srsran::console("Waiting PHY to initialize ... ");

Loading…
Cancel
Save