From 5e6828c3a081060764f926a6ee138cfc2edb2c90 Mon Sep 17 00:00:00 2001 From: Xavier Arteaga Date: Mon, 23 Mar 2020 17:17:59 +0100 Subject: [PATCH] SRSUE: fix add/mod meas object --- srsue/src/stack/rrc/rrc_meas.cc | 4 ++++ srsue/test/upper/rrc_meas_test.cc | 15 ++++++++++++--- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/srsue/src/stack/rrc/rrc_meas.cc b/srsue/src/stack/rrc/rrc_meas.cc index fc0614832..dff76d364 100644 --- a/srsue/src/stack/rrc/rrc_meas.cc +++ b/srsue/src/stack/rrc/rrc_meas.cc @@ -791,6 +791,10 @@ void rrc::rrc_meas::var_meas_cfg::measObject_addmod(const meas_obj_to_add_mod_li // if an entry with the matching measObjectId exists in the measObjectList within the VarMeasConfig if (entry_exists) { + // Update carrier frequency0 + local_obj.carrier_freq = cfg_obj.carrier_freq; + local_obj.allowed_meas_bw = cfg_obj.allowed_meas_bw; + // Combine the new cells with the existing ones and remove the cells indicated in config { // Remove cells diff --git a/srsue/test/upper/rrc_meas_test.cc b/srsue/test/upper/rrc_meas_test.cc index f71779de4..55a76099b 100644 --- a/srsue/test/upper/rrc_meas_test.cc +++ b/srsue/test/upper/rrc_meas_test.cc @@ -384,7 +384,7 @@ int meas_obj_test() obj = {}; obj.meas_obj_id = 1 + i; obj.meas_obj.set_meas_obj_eutra(); - obj.meas_obj.meas_obj_eutra().carrier_freq = 1 + i; + obj.meas_obj.meas_obj_eutra().carrier_freq = 100 + i; obj.meas_obj.meas_obj_eutra().allowed_meas_bw.value = allowed_meas_bw_opts::mbw6; if (i == 1) { // 2nd object has cells, 1st one doesn't for (int j = 1; j <= 4; j++) { @@ -403,8 +403,8 @@ int meas_obj_test() TESTASSERT(rrctest.send_meas_cfg(rrc_conn_recfg)); // Test we configure 1 frequency with no cells TESTASSERT(rrctest.phytest.meas_nof_freqs() == 1); - TESTASSERT(rrctest.phytest.meas_freq_started(1)); - TESTASSERT(rrctest.phytest.meas_nof_cells(1) == 0); + TESTASSERT(rrctest.phytest.meas_freq_started(100)); + TESTASSERT(rrctest.phytest.meas_nof_cells(100) == 0); log1.info("Test5: Add existing objects and measId. Now add measId for 2nd cell\n"); meas_cfg = {}; @@ -414,6 +414,15 @@ int meas_obj_test() m.meas_id = 3; meas_cfg.meas_id_to_add_mod_list.push_back(m); meas_cfg.meas_id_to_add_mod_list_present = true; + for (int i = 0; i < 2; i++) { + obj = {}; + obj.meas_obj_id = 1 + i; + obj.meas_obj.set_meas_obj_eutra(); + obj.meas_obj.meas_obj_eutra().carrier_freq = 1 + i; + obj.meas_obj.meas_obj_eutra().allowed_meas_bw.value = allowed_meas_bw_opts::mbw15; + meas_cfg.meas_obj_to_add_mod_list.push_back(obj); + } + meas_cfg.meas_obj_to_add_mod_list_present = true; rrctest.phytest.reset_test(); TESTASSERT(rrctest.send_meas_cfg(rrc_conn_recfg));