minor changes to TTCN3 dut to make reading logs easier

master
Andre Puschmann 5 years ago
parent f9a668861a
commit db4cc71240

@ -71,14 +71,14 @@ public:
} }
// init and configure logging // init and configure logging
log.init("SYS-SIM", logger); log.init("SS ", logger);
ut_log.init("UT ", logger); ut_log.init("UT ", logger);
sys_log.init("SYS ", logger); sys_log.init("SYS ", logger);
ip_sock_log.init("IP_SOCK", logger); ip_sock_log.init("IP_S", logger);
ip_ctrl_log.init("IP_CTRL", logger); ip_ctrl_log.init("IP_C", logger);
srb_log.init("SRB ", logger); srb_log.init("SRB ", logger);
ss_mac_log.init("SS-MAC ", logger); ss_mac_log.init("SS-MAC", logger);
ss_rlc_log.init("SS-RLC ", logger); ss_rlc_log.init("SS-RLC", logger);
ss_pdcp_log.init("SS-PDCP", logger); ss_pdcp_log.init("SS-PDCP", logger);
log.set_level(args.log.all_level); log.set_level(args.log.all_level);
@ -596,7 +596,7 @@ public:
// Check if we need to provide a UL grant as well // Check if we need to provide a UL grant as well
} }
} else { } else {
log.error("Not handling RNTI=%d\n", dl_rnti); log.debug("Not handling RNTI=%d\n", dl_rnti);
} }
usleep(1000); usleep(1000);

@ -29,7 +29,7 @@
class ttcn3_ue : public phy_interface_syssim, public gw_interface_stack class ttcn3_ue : public phy_interface_syssim, public gw_interface_stack
{ {
public: public:
ttcn3_ue() : run_id(0), logger(nullptr) {} ttcn3_ue() {}
virtual ~ttcn3_ue() {} virtual ~ttcn3_ue() {}
@ -40,11 +40,12 @@ public:
// Init UE log // Init UE log
log.init("UE ", logger); log.init("UE ", logger);
log.set_level(srslte::LOG_LEVEL_INFO); log.set_level(srslte::LOG_LEVEL_INFO);
log.info("Built in %s mode using %s.\n", srslte_get_build_mode(), srslte_get_build_info());
// Patch args // Patch args
args.stack.nas.force_imsi_attach = true; args.stack.nas.force_imsi_attach = true;
args.stack.nas.eia = "0,1,2"; args.stack.nas.eia = "1,2,3";
args.stack.nas.eea = "0,1,2"; args.stack.nas.eea = "0,1,2,3";
// Configure default parameters // Configure default parameters
args.stack.usim.algo = "xor"; args.stack.usim.algo = "xor";
@ -64,7 +65,6 @@ public:
args.rf.type = "none"; args.rf.type = "none";
args.stack.type = "lte"; args.stack.type = "lte";
args.phy.type = "lte_ttcn3"; args.phy.type = "lte_ttcn3";
args.phy.log.phy_level = "debug";
// Instantiate layers and stack together our UE // Instantiate layers and stack together our UE
if (args.stack.type == "lte") { if (args.stack.type == "lte") {
@ -141,10 +141,7 @@ private:
srslte::logger* logger = nullptr; srslte::logger* logger = nullptr;
srslte::log_filter log; // Own logger for UE srslte::log_filter log; // Own logger for UE
all_args_t args; all_args_t args = {};
srslte::byte_buffer_pool* pool = nullptr;
uint32_t run_id;
}; };
#endif // SRSUE_TTCN3_UE_H #endif // SRSUE_TTCN3_UE_H

@ -48,7 +48,7 @@ int lte_ttcn3_phy::init(const phy_args_t& args_, stack_interface_phy_lte* stack_
// ue_phy_base interface // ue_phy_base interface
int lte_ttcn3_phy::init(const phy_args_t& args_) int lte_ttcn3_phy::init(const phy_args_t& args_)
{ {
log.init("PHY ", logger); log.init("PHY ", logger);
log.set_level(args_.log.phy_level); log.set_level(args_.log.phy_level);
return SRSLTE_SUCCESS; return SRSLTE_SUCCESS;
@ -356,10 +356,10 @@ void lte_ttcn3_phy::run_tti()
for (auto& cell : cells) { for (auto& cell : cells) {
if (cell.info.id == pcell.info.id) { if (cell.info.id == pcell.info.id) {
if (cell.power >= MIN_IN_SYNC_POWER) { if (cell.power >= MIN_IN_SYNC_POWER) {
log.info("PCell id=%d power=%.2f -> sync\n", pcell.info.id, cell.power); log.debug("PCell id=%d power=%.2f -> sync\n", pcell.info.id, cell.power);
stack->in_sync(); stack->in_sync();
} else { } else {
log.info("PCell id=%d power=%.2f -> out of sync\n", pcell.info.id, cell.power); log.debug("PCell id=%d power=%.2f -> out of sync\n", pcell.info.id, cell.power);
stack->out_of_sync(); stack->out_of_sync();
} }
break; // make sure to call stack only once break; // make sure to call stack only once

@ -97,6 +97,7 @@ all_args_t parse_args(ttcn3_dut_args_t* args, int argc, char* argv[])
all_args.log.all_level = args->log_level; all_args.log.all_level = args->log_level;
all_args.log.all_hex_limit = args->log_hex_level; all_args.log.all_hex_limit = args->log_hex_level;
all_args.phy.log.phy_level = args->log_level;
all_args.stack.log.mac_level = args->log_level; all_args.stack.log.mac_level = args->log_level;
all_args.stack.log.rlc_level = args->log_level; all_args.stack.log.rlc_level = args->log_level;
all_args.stack.log.pdcp_level = args->log_level; all_args.stack.log.pdcp_level = args->log_level;
@ -104,6 +105,7 @@ all_args_t parse_args(ttcn3_dut_args_t* args, int argc, char* argv[])
all_args.stack.log.nas_level = args->log_level; all_args.stack.log.nas_level = args->log_level;
all_args.stack.log.gw_level = args->log_level; all_args.stack.log.gw_level = args->log_level;
all_args.stack.log.usim_level = args->log_level; all_args.stack.log.usim_level = args->log_level;
all_args.phy.log.phy_hex_limit = args->log_hex_level;
all_args.stack.log.mac_hex_limit = args->log_hex_level; all_args.stack.log.mac_hex_limit = args->log_hex_level;
all_args.stack.log.rlc_hex_limit = args->log_hex_level; all_args.stack.log.rlc_hex_limit = args->log_hex_level;
all_args.stack.log.pdcp_hex_limit = args->log_hex_level; all_args.stack.log.pdcp_hex_limit = args->log_hex_level;

Loading…
Cancel
Save