From db4cc7124040f6911053d0cf7798368d0ed1a761 Mon Sep 17 00:00:00 2001 From: Andre Puschmann Date: Fri, 20 Sep 2019 12:54:30 +0200 Subject: [PATCH] minor changes to TTCN3 dut to make reading logs easier --- srsue/test/ttcn3/hdr/ttcn3_syssim.h | 18 +++++++++--------- srsue/test/ttcn3/hdr/ttcn3_ue.h | 13 +++++-------- srsue/test/ttcn3/src/lte_ttcn3_phy.cc | 6 +++--- srsue/test/ttcn3/src/ttcn3_dut.cc | 2 ++ 4 files changed, 19 insertions(+), 20 deletions(-) diff --git a/srsue/test/ttcn3/hdr/ttcn3_syssim.h b/srsue/test/ttcn3/hdr/ttcn3_syssim.h index d6b55d447..ea98ba904 100644 --- a/srsue/test/ttcn3/hdr/ttcn3_syssim.h +++ b/srsue/test/ttcn3/hdr/ttcn3_syssim.h @@ -71,14 +71,14 @@ public: } // init and configure logging - log.init("SYS-SIM", logger); - ut_log.init("UT ", logger); - sys_log.init("SYS ", logger); - ip_sock_log.init("IP_SOCK", logger); - ip_ctrl_log.init("IP_CTRL", logger); - srb_log.init("SRB ", logger); - ss_mac_log.init("SS-MAC ", logger); - ss_rlc_log.init("SS-RLC ", logger); + log.init("SS ", logger); + ut_log.init("UT ", logger); + sys_log.init("SYS ", logger); + ip_sock_log.init("IP_S", logger); + ip_ctrl_log.init("IP_C", logger); + srb_log.init("SRB ", logger); + ss_mac_log.init("SS-MAC", logger); + ss_rlc_log.init("SS-RLC", logger); ss_pdcp_log.init("SS-PDCP", logger); log.set_level(args.log.all_level); @@ -596,7 +596,7 @@ public: // Check if we need to provide a UL grant as well } } else { - log.error("Not handling RNTI=%d\n", dl_rnti); + log.debug("Not handling RNTI=%d\n", dl_rnti); } usleep(1000); diff --git a/srsue/test/ttcn3/hdr/ttcn3_ue.h b/srsue/test/ttcn3/hdr/ttcn3_ue.h index 3dec9c5da..2510794df 100644 --- a/srsue/test/ttcn3/hdr/ttcn3_ue.h +++ b/srsue/test/ttcn3/hdr/ttcn3_ue.h @@ -29,7 +29,7 @@ class ttcn3_ue : public phy_interface_syssim, public gw_interface_stack { public: - ttcn3_ue() : run_id(0), logger(nullptr) {} + ttcn3_ue() {} virtual ~ttcn3_ue() {} @@ -40,11 +40,12 @@ public: // Init UE log log.init("UE ", logger); 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 args.stack.nas.force_imsi_attach = true; - args.stack.nas.eia = "0,1,2"; - args.stack.nas.eea = "0,1,2"; + args.stack.nas.eia = "1,2,3"; + args.stack.nas.eea = "0,1,2,3"; // Configure default parameters args.stack.usim.algo = "xor"; @@ -64,7 +65,6 @@ public: args.rf.type = "none"; args.stack.type = "lte"; args.phy.type = "lte_ttcn3"; - args.phy.log.phy_level = "debug"; // Instantiate layers and stack together our UE if (args.stack.type == "lte") { @@ -141,10 +141,7 @@ private: srslte::logger* logger = nullptr; srslte::log_filter log; // Own logger for UE - all_args_t args; - srslte::byte_buffer_pool* pool = nullptr; - - uint32_t run_id; + all_args_t args = {}; }; #endif // SRSUE_TTCN3_UE_H \ No newline at end of file diff --git a/srsue/test/ttcn3/src/lte_ttcn3_phy.cc b/srsue/test/ttcn3/src/lte_ttcn3_phy.cc index 1321b9d70..a0f63e52c 100644 --- a/srsue/test/ttcn3/src/lte_ttcn3_phy.cc +++ b/srsue/test/ttcn3/src/lte_ttcn3_phy.cc @@ -48,7 +48,7 @@ int lte_ttcn3_phy::init(const phy_args_t& args_, stack_interface_phy_lte* stack_ // ue_phy_base interface 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); return SRSLTE_SUCCESS; @@ -356,10 +356,10 @@ void lte_ttcn3_phy::run_tti() for (auto& cell : cells) { if (cell.info.id == pcell.info.id) { 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(); } 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(); } break; // make sure to call stack only once diff --git a/srsue/test/ttcn3/src/ttcn3_dut.cc b/srsue/test/ttcn3/src/ttcn3_dut.cc index 4f73a3664..e05ae522d 100644 --- a/srsue/test/ttcn3/src/ttcn3_dut.cc +++ b/srsue/test/ttcn3/src/ttcn3_dut.cc @@ -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_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.rlc_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.gw_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.rlc_hex_limit = args->log_hex_level; all_args.stack.log.pdcp_hex_limit = args->log_hex_level;