fixes in the mac log and cell parsing

master
Francisco Paisana 5 years ago committed by Andre Puschmann
parent 1099e75e7c
commit e824cbd251

@ -149,7 +149,6 @@ private:
srslte::byte_buffer_pool* pool = nullptr; srslte::byte_buffer_pool* pool = nullptr;
// Radio and PHY log are in enb.cc // Radio and PHY log are in enb.cc
srslte::log_filter mac_log;
srslte::log_filter rlc_log; srslte::log_filter rlc_log;
srslte::log_filter pdcp_log; srslte::log_filter pdcp_log;
srslte::log_filter rrc_log; srslte::log_filter rrc_log;

@ -714,7 +714,7 @@ static int parse_cell_list(all_args_t* args, rrc_cfg_t* rrc_cfg, Setting& root)
HANDLEPARSERCODE(parse_required_field(cell_cfg.pci, cellroot, "pci")); HANDLEPARSERCODE(parse_required_field(cell_cfg.pci, cellroot, "pci"));
cell_cfg.pci = cell_cfg.pci % SRSLTE_NUM_PCI; cell_cfg.pci = cell_cfg.pci % SRSLTE_NUM_PCI;
HANDLEPARSERCODE(parse_required_field(cell_cfg.dl_earfcn, cellroot, "dl_earfcn")); HANDLEPARSERCODE(parse_required_field(cell_cfg.dl_earfcn, cellroot, "dl_earfcn"));
cell_cfg.ul_earfcn = cellroot["ul_earfcn"]; // will be derived from DL EARFCN If not set parse_default_field(cell_cfg.ul_earfcn, cellroot, "ul_earfcn", 0u); // will be derived from DL EARFCN If not set
parse_default_field( parse_default_field(
cell_cfg.root_seq_idx, cellroot, "root_seq_idx", rrc_cfg->sibs[1].sib2().rr_cfg_common.prach_cfg.root_seq_idx); cell_cfg.root_seq_idx, cellroot, "root_seq_idx", rrc_cfg->sibs[1].sib2().rr_cfg_common.prach_cfg.root_seq_idx);
parse_default_field(cell_cfg.initial_dl_cqi, cellroot, "initial_dl_cqi", 5u); parse_default_field(cell_cfg.initial_dl_cqi, cellroot, "initial_dl_cqi", 5u);

@ -70,8 +70,11 @@ int enb_stack_lte::init(const stack_args_t& args_, const rrc_cfg_t& rrc_cfg_)
rrc_cfg = rrc_cfg_; rrc_cfg = rrc_cfg_;
// setup logging for each layer // setup logging for each layer
srslte::logmap::set_default_logger(logger); srslte::logmap::register_log(std::unique_ptr<srslte::log>{new log_filter{"MAC ", logger, true}});
mac_log.init("MAC ", logger, true); srslte::log_ref mac_log = srslte::logmap::get("MAC ");
mac_log->set_level(args.log.mac_level);
mac_log->set_hex_limit(args.log.mac_hex_limit);
rlc_log.init("RLC ", logger); rlc_log.init("RLC ", logger);
pdcp_log.init("PDCP", logger); pdcp_log.init("PDCP", logger);
rrc_log.init("RRC ", logger); rrc_log.init("RRC ", logger);
@ -80,7 +83,6 @@ int enb_stack_lte::init(const stack_args_t& args_, const rrc_cfg_t& rrc_cfg_)
stack_log.init("STCK", logger); stack_log.init("STCK", logger);
// Init logs // Init logs
mac_log.set_level(args.log.mac_level);
rlc_log.set_level(args.log.rlc_level); rlc_log.set_level(args.log.rlc_level);
pdcp_log.set_level(args.log.pdcp_level); pdcp_log.set_level(args.log.pdcp_level);
rrc_log.set_level(args.log.rrc_level); rrc_log.set_level(args.log.rrc_level);
@ -88,7 +90,6 @@ int enb_stack_lte::init(const stack_args_t& args_, const rrc_cfg_t& rrc_cfg_)
s1ap_log.set_level(args.log.s1ap_level); s1ap_log.set_level(args.log.s1ap_level);
stack_log.set_level(LOG_LEVEL_INFO); stack_log.set_level(LOG_LEVEL_INFO);
mac_log.set_hex_limit(args.log.mac_hex_limit);
rlc_log.set_hex_limit(args.log.rlc_hex_limit); rlc_log.set_hex_limit(args.log.rlc_hex_limit);
pdcp_log.set_hex_limit(args.log.pdcp_hex_limit); pdcp_log.set_hex_limit(args.log.pdcp_hex_limit);
rrc_log.set_hex_limit(args.log.rrc_hex_limit); rrc_log.set_hex_limit(args.log.rrc_hex_limit);
@ -110,7 +111,7 @@ int enb_stack_lte::init(const stack_args_t& args_, const rrc_cfg_t& rrc_cfg_)
rx_sockets.reset(new srslte::rx_multisocket_handler("ENBSOCKETS", &stack_log)); rx_sockets.reset(new srslte::rx_multisocket_handler("ENBSOCKETS", &stack_log));
// Init all layers // Init all layers
mac.init(args.mac, rrc_cfg.cell_list, phy, &rlc, &rrc, this, &mac_log); mac.init(args.mac, rrc_cfg.cell_list, phy, &rlc, &rrc, this, mac_log.get());
rlc.init(&pdcp, &rrc, &mac, &timers, &rlc_log); rlc.init(&pdcp, &rrc, &mac, &timers, &rlc_log);
pdcp.init(&rlc, &rrc, &gtpu); pdcp.init(&rlc, &rrc, &gtpu);
rrc.init(rrc_cfg, phy, &mac, &rlc, &pdcp, &s1ap, &gtpu, &timers, &rrc_log); rrc.init(rrc_cfg, phy, &mac, &rlc, &pdcp, &s1ap, &gtpu, &timers, &rrc_log);

Loading…
Cancel
Save