From 928459408e75368270ac607f546ecf6d0227f69e Mon Sep 17 00:00:00 2001 From: Francisco Paisana Date: Thu, 2 Jul 2020 19:27:12 +0100 Subject: [PATCH] fix cell meas sorting issue --- srsue/hdr/stack/rrc/rrc_cell.h | 5 +++-- srsue/src/stack/rrc/rrc.cc | 2 +- srsue/src/stack/rrc/rrc_cell.cc | 4 ++-- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/srsue/hdr/stack/rrc/rrc_cell.h b/srsue/hdr/stack/rrc/rrc_cell.h index c17d74e20..b849804e2 100644 --- a/srsue/hdr/stack/rrc/rrc_cell.h +++ b/srsue/hdr/stack/rrc/rrc_cell.h @@ -138,9 +138,8 @@ public: const static int MAX_NEIGHBOUR_CELLS = 8; typedef std::unique_ptr unique_cell_t; - bool add_neighbour_cell_unsorted(const rrc_interface_phy_lte::phy_meas_t& meas); + bool add_neighbour_cell(const rrc_interface_phy_lte::phy_meas_t& meas); bool add_neighbour_cell(unique_cell_t cell); - bool add_neighbour_cell_unsorted(unique_cell_t cell); void rem_last_neighbour(); unique_cell_t remove_neighbour_cell(uint32_t earfcn, uint32_t pci); void clean_neighbours(); @@ -162,6 +161,8 @@ public: iterator end() { return neighbour_cells.end(); } private: + bool add_neighbour_cell_unsorted(unique_cell_t cell); + srslte::log_ref log_h{"RRC"}; unique_cell_t serving_cell; diff --git a/srsue/src/stack/rrc/rrc.cc b/srsue/src/stack/rrc/rrc.cc index fa364c84f..406a45149 100644 --- a/srsue/src/stack/rrc/rrc.cc +++ b/srsue/src/stack/rrc/rrc.cc @@ -385,7 +385,7 @@ void rrc::process_new_cell_meas(const std::vector& meas) c->set_cfo(m.cfo_hz); } else { // or just set initial value - neighbour_added |= neighbour_cells.add_neighbour_cell_unsorted(m); + neighbour_added |= neighbour_cells.add_neighbour_cell(m); } if (m.earfcn == 0) { diff --git a/srsue/src/stack/rrc/rrc_cell.cc b/srsue/src/stack/rrc/rrc_cell.cc index ff1fb970d..cdb27ac21 100644 --- a/srsue/src/stack/rrc/rrc_cell.cc +++ b/srsue/src/stack/rrc/rrc_cell.cc @@ -167,7 +167,7 @@ const cell_t* cell_list::get_neighbour_cell_handle(uint32_t earfcn, uint32_t pci } // If only neighbour PCI is provided, copy full cell from serving cell -bool cell_list::add_neighbour_cell_unsorted(const rrc_interface_phy_lte::phy_meas_t& meas) +bool cell_list::add_neighbour_cell(const rrc_interface_phy_lte::phy_meas_t& meas) { phy_interface_rrc_lte::phy_cell_t phy_cell = {}; phy_cell.earfcn = meas.earfcn; @@ -176,7 +176,7 @@ bool cell_list::add_neighbour_cell_unsorted(const rrc_interface_phy_lte::phy_mea c.get()->set_rsrp(meas.rsrp); c.get()->set_rsrq(meas.rsrq); c.get()->set_cfo(meas.cfo_hz); - return add_neighbour_cell_unsorted(std::move(c)); + return add_neighbour_cell(std::move(c)); } bool cell_list::add_neighbour_cell(unique_cell_t new_cell)