updated rrc mobility test

master
Francisco Paisana 5 years ago
parent 97d20ca579
commit 1899c468d3

@ -135,10 +135,10 @@ void rrc::ue::mac_controller::handle_con_reconf(const asn1::rrc::rrc_conn_recfg_
if (conn_recfg.mob_ctrl_info_present) { if (conn_recfg.mob_ctrl_info_present) {
// Handover Command // Handover Command
handle_con_reconf_with_mobility(); handle_con_reconf_with_mobility();
} else {
// First Reconf Message
mac->ue_cfg(rrc_ue->rnti, &current_sched_ue_cfg);
} }
// Apply changes to MAC scheduler
mac->ue_cfg(rrc_ue->rnti, &current_sched_ue_cfg);
mac->phy_config_enabled(rrc_ue->rnti, false); mac->phy_config_enabled(rrc_ue->rnti, false);
} }
@ -170,15 +170,12 @@ void rrc::ue::mac_controller::handle_con_reconf_with_mobility()
{ {
// Temporarily freeze DL+UL grants for all DRBs. // Temporarily freeze DL+UL grants for all DRBs.
for (const drb_to_add_mod_s& drb : rrc_ue->bearer_list.get_established_drbs()) { for (const drb_to_add_mod_s& drb : rrc_ue->bearer_list.get_established_drbs()) {
mac->bearer_ue_rem(rrc_ue->rnti, drb.drb_id + 2); current_sched_ue_cfg.ue_bearers[drb.lc_ch_id].direction = sched_interface::ue_bearer_cfg_t::IDLE;
} }
// Temporarily freeze UL grants for SRBs. DL is required to send HO Cmd // Temporarily freeze UL grants for SRBs. DL is required to send HO Cmd
sched_interface::ue_bearer_cfg_t bcfg;
for (uint32_t srb_id = 0; srb_id < 3; ++srb_id) { for (uint32_t srb_id = 0; srb_id < 3; ++srb_id) {
bcfg = current_sched_ue_cfg.ue_bearers[srb_id]; current_sched_ue_cfg.ue_bearers[srb_id].direction = sched_interface::ue_bearer_cfg_t::DL;
bcfg.direction = sched_interface::ue_bearer_cfg_t::DL;
mac->bearer_ue_cfg(rrc_ue->rnti, srb_id, &bcfg);
} }
} }

@ -294,7 +294,7 @@ struct mobility_tester {
test_dummies::mac_mobility_dummy mac; test_dummies::mac_mobility_dummy mac;
test_dummies::rlc_mobility_dummy rlc; test_dummies::rlc_mobility_dummy rlc;
test_dummies::pdcp_mobility_dummy pdcp; test_dummies::pdcp_mobility_dummy pdcp;
phy_dummy phy; test_dummies::phy_mobility_dummy phy;
test_dummies::s1ap_mobility_dummy s1ap; test_dummies::s1ap_mobility_dummy s1ap;
gtpu_dummy gtpu; gtpu_dummy gtpu;
@ -509,6 +509,8 @@ int test_intraenb_mobility(mobility_test_params test_params)
tester.rrc.upd_user(tester.rnti + 1, tester.rnti); tester.rrc.upd_user(tester.rnti + 1, tester.rnti);
TESTASSERT(tester.rlc.ue_db[tester.rnti].reest_sdu_counter == 0); TESTASSERT(tester.rlc.ue_db[tester.rnti].reest_sdu_counter == 0);
TESTASSERT(tester.pdcp.last_sdu.sdu == nullptr); TESTASSERT(tester.pdcp.last_sdu.sdu == nullptr);
TESTASSERT(tester.phy.last_cfg.size() == 1 and tester.mac.ue_db[tester.rnti].supported_cc_list.size() == 1);
TESTASSERT(tester.phy.last_cfg[0].enb_cc_idx == tester.mac.ue_db[tester.rnti].supported_cc_list[0].enb_cc_idx);
/* Test Case: The UE receives a duplicate C-RNTI CE. Nothing should happen */ /* Test Case: The UE receives a duplicate C-RNTI CE. Nothing should happen */
if (test_params.fail_at == mobility_test_params::test_event::duplicate_crnti_ce) { if (test_params.fail_at == mobility_test_params::test_event::duplicate_crnti_ce) {

@ -157,9 +157,21 @@ public:
ue_db[rnti] = *cfg; ue_db[rnti] = *cfg;
return 0; return 0;
} }
int ue_set_crnti(uint16_t temp_crnti, uint16_t crnti, sched_interface::ue_cfg_t* cfg) override
{
ue_db[crnti] = *cfg;
return 0;
}
std::map<uint16_t, sched_interface::ue_cfg_t> ue_db; std::map<uint16_t, sched_interface::ue_cfg_t> ue_db;
}; };
class phy_mobility_dummy : public phy_dummy
{
public:
void set_config(uint16_t rnti, const phy_rrc_cfg_list_t& dedicated_list) override { last_cfg = dedicated_list; }
phy_rrc_cfg_list_t last_cfg;
};
} // namespace test_dummies } // namespace test_dummies
namespace test_helpers { namespace test_helpers {

Loading…
Cancel
Save