lte,enb,rrc: parse cellIndividualOffset in rr.conf and propagate it to measConfig sent to UE

master
Francisco 3 years ago committed by Francisco Paisana
parent 65a2b35f09
commit c6226b0d94

@ -31,7 +31,7 @@ struct meas_cell_cfg_t {
uint32_t earfcn;
uint16_t pci;
uint32_t eci;
float q_offset;
asn1::rrc::q_offset_range_e cell_individual_offset;
uint32_t allowed_meas_bw;
bool direct_forward_path_available;
};

@ -84,6 +84,7 @@ cell_list =
pci = 2;
//direct_forward_path_available = false;
//allowed_meas_bw = 6;
//cell_individual_offset = 0;
}
);

@ -771,9 +771,10 @@ static int parse_meas_cell_list(rrc_meas_cfg_t* meas_cfg, Setting& root)
cell.earfcn = root[i]["dl_earfcn"];
cell.pci = (unsigned int)root[i]["pci"] % SRSRAN_NUM_PCI;
cell.eci = (unsigned int)root[i]["eci"];
cell.q_offset = 0; // LIBLTE_RRC_Q_OFFSET_RANGE_DB_0; // TODO
parse_default_field(cell.direct_forward_path_available, root[i], "direct_forward_path_available", false);
parse_default_field(cell.allowed_meas_bw, root[i], "allowed_meas_bw", 6u);
asn1_parsers::default_number_to_enum(
cell.cell_individual_offset, root[i], "cell_individual_offset", asn1::rrc::q_offset_range_opts::db0);
srsran_assert(srsran::is_lte_cell_nof_prb(cell.allowed_meas_bw), "Invalid measurement Bandwidth");
}
return 0;

@ -84,7 +84,7 @@ std::tuple<bool, meas_obj_t*, cells_to_add_mod_s*> add_cell_enb_cfg(meas_obj_lis
bool inserted_flag = true;
cells_to_add_mod_s new_cell;
asn1::number_to_enum(new_cell.cell_individual_offset, (uint8_t)cellcfg.q_offset);
new_cell.cell_individual_offset = cellcfg.cell_individual_offset;
new_cell.pci = cellcfg.pci;
std::pair<meas_obj_t*, meas_cell_t*> ret = find_cell(meas_obj_list, cellcfg.earfcn, cellcfg.pci);

@ -38,7 +38,7 @@ int test_correct_meascfg_insertion()
cell3 = cell1;
cell3.earfcn = 2850;
cell4 = cell1;
cell4.q_offset = 1;
cell1.cell_individual_offset = asn1::rrc::q_offset_range_opts::db1;
report_cfg_eutra_s rep1 = generate_rep1();
@ -110,7 +110,7 @@ int test_correct_meascfg_calculation()
meas_cell_cfg_t cell1{}, cell2{};
cell1.earfcn = 3400;
cell1.pci = 1;
cell1.q_offset = 0;
cell1.cell_individual_offset = asn1::rrc::q_offset_range_opts::db0;
cell1.eci = 0x19C01;
cell2 = cell1;
cell2.pci = 2;
@ -169,7 +169,7 @@ int test_correct_meascfg_calculation()
TESTASSERT(result_meascfg.report_cfg_to_add_mod_list.size() == 0);
// TEST 3: Cell is added to cellsToAddModList if just a field was updated
cell1.q_offset = 5;
cell1.cell_individual_offset = asn1::rrc::q_offset_range_opts::db5;
src_var = target_var;
add_cell_enb_cfg(target_var.meas_obj_to_add_mod_list, cell1);
TESTASSERT(compute_diff_meascfg(src_var, target_var, result_meascfg));

@ -175,7 +175,7 @@ meas_cell_cfg_t generate_cell1()
meas_cell_cfg_t cell1{};
cell1.earfcn = 3400;
cell1.pci = 1;
cell1.q_offset = 0;
cell1.cell_individual_offset = asn1::rrc::q_offset_range_opts::db0;
cell1.eci = 0x19C01;
return cell1;
}
@ -198,7 +198,7 @@ report_cfg_eutra_s generate_rep1()
bool is_cell_cfg_equal(const meas_cell_cfg_t& cfg, const cells_to_add_mod_s& cell)
{
return cfg.pci == cell.pci and cell.cell_individual_offset.to_number() == (int8_t)round(cfg.q_offset);
return cfg.pci == cell.pci and cell.cell_individual_offset == cell.cell_individual_offset;
}
} // namespace srsenb

Loading…
Cancel
Save