fix measObj addition in srsenb. Now the enb considers both scells and meas_cells in the rr.conf

This commit is contained in:
Francisco Paisana 2020-10-06 13:22:56 +01:00
parent 5e95fd4a43
commit 0f51d70aac
3 changed files with 20 additions and 15 deletions

View File

@ -83,9 +83,9 @@ private:
};
// Helper methods
std::vector<const cell_info_common*> get_available_intraenb_cells(const cell_info_common_list& list,
uint32_t pcell_enb_cc_idx);
std::vector<uint32_t> get_available_intraenb_earfcns(const cell_info_common_list& list, uint32_t pcell_enb_cc_idx);
std::vector<const cell_info_common*> get_cfg_intraenb_scells(const cell_info_common_list& list,
uint32_t pcell_enb_cc_idx);
std::vector<uint32_t> get_cfg_intraenb_measobj_earfcns(const cell_info_common_list& list, uint32_t pcell_enb_cc_idx);
/** Class used to store all the resources specific to a UE's cell */
struct cell_ctxt_dedicated {

View File

@ -95,25 +95,30 @@ const cell_info_common* cell_info_common_list::get_pci(uint32_t pci) const
return it == cell_list.end() ? nullptr : it->get();
}
std::vector<const cell_info_common*> get_available_intraenb_cells(const cell_info_common_list& list,
uint32_t pcell_enb_cc_idx)
std::vector<const cell_info_common*> get_cfg_intraenb_scells(const cell_info_common_list& list,
uint32_t pcell_enb_cc_idx)
{
const cell_info_common* pcell = list.get_cc_idx(pcell_enb_cc_idx);
std::vector<const cell_info_common*> cells(pcell->cell_cfg.scell_list.size() + 1);
cells[0] = pcell;
std::vector<const cell_info_common*> cells(pcell->cell_cfg.scell_list.size());
for (uint32_t i = 0; i < pcell->cell_cfg.scell_list.size(); ++i) {
uint32_t cell_id = pcell->cell_cfg.scell_list[i].cell_id;
cells[i + 1] = list.get_cell_id(cell_id);
cells[i] = list.get_cell_id(cell_id);
}
return cells;
}
std::vector<uint32_t> get_available_intraenb_earfcns(const cell_info_common_list& list, uint32_t pcell_enb_cc_idx)
std::vector<uint32_t> get_cfg_intraenb_measobj_earfcns(const cell_info_common_list& list, uint32_t pcell_enb_cc_idx)
{
std::vector<const cell_info_common*> cells = get_available_intraenb_cells(list, pcell_enb_cc_idx);
std::vector<uint32_t> earfcns(cells.size());
for (uint32_t i = 0; i < cells.size(); ++i) {
earfcns[i] = cells[i]->cell_cfg.dl_earfcn;
std::vector<const cell_info_common*> scells = get_cfg_intraenb_scells(list, pcell_enb_cc_idx);
const cell_info_common* pcell = list.get_cc_idx(pcell_enb_cc_idx);
std::vector<uint32_t> earfcns{};
earfcns.reserve(1 + scells.size() + pcell->cell_cfg.meas_cfg.meas_cells.size());
earfcns.push_back(pcell->cell_cfg.dl_earfcn);
for (auto& scell : scells) {
earfcns.push_back(scell->cell_cfg.dl_earfcn);
}
for (auto meas_cell : pcell->cell_cfg.meas_cfg.meas_cells) {
earfcns.push_back(meas_cell.earfcn);
}
// sort by earfcn
std::sort(earfcns.begin(), earfcns.end());

View File

@ -577,7 +577,7 @@ bool rrc::ue::rrc_mobility::fill_conn_recfg_no_ho_cmd(asn1::rrc::rrc_conn_recfg_
// Check if there has been any update in ue_var_meas based on UE current cell list
cell_ctxt_dedicated* pcell = rrc_ue->cell_ded_list.get_ue_cc_idx(UE_PCELL_CC_IDX);
uint32_t src_earfcn = pcell->get_dl_earfcn();
auto target_earfcns = get_available_intraenb_earfcns(*rrc_enb->cell_common_list, pcell->cell_common->enb_cc_idx);
auto target_earfcns = get_cfg_intraenb_measobj_earfcns(*rrc_enb->cell_common_list, pcell->cell_common->enb_cc_idx);
conn_recfg->meas_cfg_present = update_ue_var_meas_cfg(src_earfcn, target_earfcns, &conn_recfg->meas_cfg);
return conn_recfg->meas_cfg_present;
}
@ -909,7 +909,7 @@ void rrc::ue::rrc_mobility::fill_mobility_reconf_common(asn1::rrc::dl_dcch_msg_s
ant_info.ue_tx_ant_sel.set(setup_e::release);
// Add MeasConfig of target cell
auto target_earfcns = get_available_intraenb_earfcns(*rrc_enb->cell_common_list, target_cell.enb_cc_idx);
auto target_earfcns = get_cfg_intraenb_measobj_earfcns(*rrc_enb->cell_common_list, target_cell.enb_cc_idx);
recfg_r8.meas_cfg_present = update_ue_var_meas_cfg(src_dl_earfcn, target_earfcns, &recfg_r8.meas_cfg);
// Add SCells