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

@ -28,12 +28,12 @@ struct scell_cfg_t {
// Cell to measure for Handover // Cell to measure for Handover
struct meas_cell_cfg_t { struct meas_cell_cfg_t {
uint32_t earfcn; uint32_t earfcn;
uint16_t pci; uint16_t pci;
uint32_t eci; uint32_t eci;
float q_offset; asn1::rrc::q_offset_range_e cell_individual_offset;
uint32_t allowed_meas_bw; uint32_t allowed_meas_bw;
bool direct_forward_path_available; bool direct_forward_path_available;
}; };
// neigh measurement Cell info // neigh measurement Cell info

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

@ -767,13 +767,14 @@ static int parse_meas_cell_list(rrc_meas_cfg_t* meas_cfg, Setting& root)
{ {
meas_cfg->meas_cells.resize(root.getLength()); meas_cfg->meas_cells.resize(root.getLength());
for (uint32_t i = 0; i < meas_cfg->meas_cells.size(); ++i) { for (uint32_t i = 0; i < meas_cfg->meas_cells.size(); ++i) {
auto& cell = meas_cfg->meas_cells[i]; auto& cell = meas_cfg->meas_cells[i];
cell.earfcn = root[i]["dl_earfcn"]; cell.earfcn = root[i]["dl_earfcn"];
cell.pci = (unsigned int)root[i]["pci"] % SRSRAN_NUM_PCI; cell.pci = (unsigned int)root[i]["pci"] % SRSRAN_NUM_PCI;
cell.eci = (unsigned int)root[i]["eci"]; 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.direct_forward_path_available, root[i], "direct_forward_path_available", false);
parse_default_field(cell.allowed_meas_bw, root[i], "allowed_meas_bw", 6u); 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"); srsran_assert(srsran::is_lte_cell_nof_prb(cell.allowed_meas_bw), "Invalid measurement Bandwidth");
} }
return 0; return 0;

@ -84,8 +84,8 @@ std::tuple<bool, meas_obj_t*, cells_to_add_mod_s*> add_cell_enb_cfg(meas_obj_lis
bool inserted_flag = true; bool inserted_flag = true;
cells_to_add_mod_s new_cell; 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; new_cell.pci = cellcfg.pci;
std::pair<meas_obj_t*, meas_cell_t*> ret = find_cell(meas_obj_list, cellcfg.earfcn, cellcfg.pci); std::pair<meas_obj_t*, meas_cell_t*> ret = find_cell(meas_obj_list, cellcfg.earfcn, cellcfg.pci);

@ -31,14 +31,14 @@ namespace srsenb {
*/ */
int test_correct_meascfg_insertion() int test_correct_meascfg_insertion()
{ {
meas_cell_cfg_t cell1 = generate_cell1(), cell2{}, cell3{}, cell4{}; meas_cell_cfg_t cell1 = generate_cell1(), cell2{}, cell3{}, cell4{};
cell2 = cell1; cell2 = cell1;
cell2.pci = 2; cell2.pci = 2;
cell2.eci = 0x19C02; cell2.eci = 0x19C02;
cell3 = cell1; cell3 = cell1;
cell3.earfcn = 2850; cell3.earfcn = 2850;
cell4 = cell1; cell4 = cell1;
cell4.q_offset = 1; cell1.cell_individual_offset = asn1::rrc::q_offset_range_opts::db1;
report_cfg_eutra_s rep1 = generate_rep1(); report_cfg_eutra_s rep1 = generate_rep1();
@ -108,13 +108,13 @@ int test_correct_meascfg_calculation()
meas_cfg_s src_var{}, target_var{}; meas_cfg_s src_var{}, target_var{};
meas_cell_cfg_t cell1{}, cell2{}; meas_cell_cfg_t cell1{}, cell2{};
cell1.earfcn = 3400; cell1.earfcn = 3400;
cell1.pci = 1; cell1.pci = 1;
cell1.q_offset = 0; cell1.cell_individual_offset = asn1::rrc::q_offset_range_opts::db0;
cell1.eci = 0x19C01; cell1.eci = 0x19C01;
cell2 = cell1; cell2 = cell1;
cell2.pci = 2; cell2.pci = 2;
cell2.eci = 0x19C02; cell2.eci = 0x19C02;
report_cfg_eutra_s rep1 = generate_rep1(), rep2{}, rep3{}; report_cfg_eutra_s rep1 = generate_rep1(), rep2{}, rep3{};
rep2 = rep1; rep2 = rep1;
@ -169,8 +169,8 @@ int test_correct_meascfg_calculation()
TESTASSERT(result_meascfg.report_cfg_to_add_mod_list.size() == 0); TESTASSERT(result_meascfg.report_cfg_to_add_mod_list.size() == 0);
// TEST 3: Cell is added to cellsToAddModList if just a field was updated // 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; src_var = target_var;
add_cell_enb_cfg(target_var.meas_obj_to_add_mod_list, cell1); add_cell_enb_cfg(target_var.meas_obj_to_add_mod_list, cell1);
TESTASSERT(compute_diff_meascfg(src_var, target_var, result_meascfg)); TESTASSERT(compute_diff_meascfg(src_var, target_var, result_meascfg));
TESTASSERT(result_meascfg.meas_obj_to_add_mod_list_present); TESTASSERT(result_meascfg.meas_obj_to_add_mod_list_present);

@ -173,10 +173,10 @@ namespace srsenb {
meas_cell_cfg_t generate_cell1() meas_cell_cfg_t generate_cell1()
{ {
meas_cell_cfg_t cell1{}; meas_cell_cfg_t cell1{};
cell1.earfcn = 3400; cell1.earfcn = 3400;
cell1.pci = 1; cell1.pci = 1;
cell1.q_offset = 0; cell1.cell_individual_offset = asn1::rrc::q_offset_range_opts::db0;
cell1.eci = 0x19C01; cell1.eci = 0x19C01;
return cell1; 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) 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 } // namespace srsenb

Loading…
Cancel
Save