mirror of https://github.com/PentHertz/srsLTE.git
fix nr activation guards
This commit is contained in:
parent
29e126a583
commit
d7138b7752
|
@ -20,7 +20,7 @@
|
|||
*/
|
||||
|
||||
#include "srslte/upper/pdcp.h"
|
||||
#ifdef ENABLE_5GNR
|
||||
#ifdef HAVE_5GNR
|
||||
#include "srslte/upper/pdcp_entity_nr.h"
|
||||
#endif
|
||||
|
||||
|
@ -109,7 +109,7 @@ void pdcp::add_bearer(uint32_t lcid, pdcp_config_t cfg)
|
|||
if (cfg.sn_len == srslte::PDCP_SN_LEN_18) {
|
||||
// create NR entity for 18bit SN length
|
||||
|
||||
#ifdef ENABLE_5GNR
|
||||
#ifdef HAVE_5GNR
|
||||
entity.reset(new pdcp_entity_nr{rlc, rrc, gw, task_executor, pdcp_log, lcid, cfg});
|
||||
#else
|
||||
pdcp_log->error("Invalid PDCP configuration.\n");
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
#include "srsenb/src/enb_cfg_parser.h"
|
||||
#include "srslte/build_info.h"
|
||||
#include "srslte/radio/radio_null.h"
|
||||
#ifdef ENABLE_5GNR
|
||||
#ifdef HAVE_5GNR
|
||||
#include "srsenb/hdr/phy/vnf_phy_nr.h"
|
||||
#include "srsenb/hdr/stack/gnb_stack_nr.h"
|
||||
#endif
|
||||
|
@ -113,7 +113,7 @@ int enb::init(const all_args_t& args_, srslte::logger* logger_)
|
|||
radio = std::move(lte_radio);
|
||||
|
||||
} else if (args.stack.type == "nr") {
|
||||
#ifdef ENABLE_5GNR
|
||||
#ifdef HAVE_5GNR
|
||||
std::unique_ptr<srsenb::gnb_stack_nr> nr_stack(new srsenb::gnb_stack_nr(logger));
|
||||
std::unique_ptr<srslte::radio_null> nr_radio(new srslte::radio_null(logger));
|
||||
std::unique_ptr<srsenb::vnf_phy_nr> nr_phy(new srsenb::vnf_phy_nr(logger));
|
||||
|
@ -146,7 +146,8 @@ int enb::init(const all_args_t& args_, srslte::logger* logger_)
|
|||
phy = std::move(nr_phy);
|
||||
radio = std::move(nr_radio);
|
||||
#else
|
||||
log->error("5G NR stack not compiled. Please, activate CMAKE ENABLE_5GNR flag.\n");
|
||||
log->console("ERROR: 5G NR stack not compiled. Please, activate CMAKE HAVE_5GNR flag.\n");
|
||||
log->error("5G NR stack not compiled. Please, activate CMAKE HAVE_5GNR flag.\n");
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
|
@ -70,7 +70,7 @@ 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]")
|
||||
("ue.stack", bpo::value<string>(&args->stack.type)->default_value("lte"), "Type of the upper stack [lte, nr]")
|
||||
|
||||
("rf.dl_earfcn", bpo::value<string>(&args->phy.dl_earfcn)->default_value("3400"), "Downlink EARFCN list")
|
||||
("rf.ul_earfcn", bpo::value<string>(&args->phy.ul_earfcn), "Uplink EARFCN list. Optional.")
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
#include "srslte/srslte.h"
|
||||
#include "srsue/hdr/phy/phy.h"
|
||||
#include "srsue/hdr/stack/ue_stack_lte.h"
|
||||
#ifdef ENABLE_5GNR
|
||||
#ifdef HAVE_5GNR
|
||||
#include "srsue/hdr/phy/vnf_phy_nr.h"
|
||||
#include "srsue/hdr/stack/ue_stack_nr.h"
|
||||
#endif
|
||||
|
@ -122,7 +122,8 @@ int ue::init(const all_args_t& args_, srslte::logger* logger_)
|
|||
phy = std::move(lte_phy);
|
||||
radio = std::move(lte_radio);
|
||||
} else if (args.stack.type == "nr") {
|
||||
#ifdef ENABLE_5GNR
|
||||
log.info("Initializing NR stack.\n");
|
||||
#ifdef HAVE_5GNR
|
||||
std::unique_ptr<srsue::ue_stack_nr> nr_stack(new srsue::ue_stack_nr(logger));
|
||||
std::unique_ptr<srslte::radio_null> nr_radio(new srslte::radio_null(logger));
|
||||
std::unique_ptr<srsue::vnf_phy_nr> nr_phy(new srsue::vnf_phy_nr(logger));
|
||||
|
@ -155,7 +156,8 @@ int ue::init(const all_args_t& args_, srslte::logger* logger_)
|
|||
phy = std::move(nr_phy);
|
||||
radio = std::move(nr_radio);
|
||||
#else
|
||||
log.error("5G NR stack not compiled. Please, activate CMAKE ENABLE_5GNR flag.\n");
|
||||
log.console("ERROR: 5G NR stack not compiled. Please, activate CMAKE HAVE_5GNR flag.\n");
|
||||
log.error("5G NR stack not compiled. Please, activate CMAKE HAVE_5GNR flag.\n");
|
||||
#endif
|
||||
} else {
|
||||
log.console("Invalid stack type %s. Supported values are [lte].\n", args.stack.type.c_str());
|
||||
|
|
Loading…
Reference in New Issue