Rename nr_neighbour_gnb_configuration_t to nr_neighbour_cell_t for clarity

This commit is contained in:
Guido Casati
2025-06-10 10:47:11 +02:00
parent a06457bab6
commit 03b6e32fdb
4 changed files with 10 additions and 10 deletions
+2 -2
View File
@@ -1934,9 +1934,9 @@ static void fill_neighbour_cell_configuration(uint8_t gnb_idx, gNB_RRC_INST *rrc
continue; continue;
cell.neighbour_cells = malloc_or_fail(sizeof(seq_arr_t)); cell.neighbour_cells = malloc_or_fail(sizeof(seq_arr_t));
seq_arr_init(cell.neighbour_cells, sizeof(nr_neighbour_gnb_configuration_t)); seq_arr_init(cell.neighbour_cells, sizeof(nr_neighbour_cell_t));
for (int l = 0; l < NeighbourCellParamList.numelt; ++l) { for (int l = 0; l < NeighbourCellParamList.numelt; ++l) {
nr_neighbour_gnb_configuration_t neighbourCell = {0}; nr_neighbour_cell_t neighbourCell = {0};
neighbourCell.gNB_ID = *(NeighbourCellParamList.paramarray[l][GNB_CONFIG_N_CELL_GNB_ID_IDX].uptr); neighbourCell.gNB_ID = *(NeighbourCellParamList.paramarray[l][GNB_CONFIG_N_CELL_GNB_ID_IDX].uptr);
neighbourCell.nrcell_id = (uint64_t) * (NeighbourCellParamList.paramarray[l][GNB_CONFIG_N_CELL_NR_CELLID_IDX].u64ptr); neighbourCell.nrcell_id = (uint64_t) * (NeighbourCellParamList.paramarray[l][GNB_CONFIG_N_CELL_NR_CELLID_IDX].u64ptr);
neighbourCell.physicalCellId = *NeighbourCellParamList.paramarray[l][GNB_CONFIG_N_CELL_PHYSICAL_ID_IDX].uptr; neighbourCell.physicalCellId = *NeighbourCellParamList.paramarray[l][GNB_CONFIG_N_CELL_PHYSICAL_ID_IDX].uptr;
+1 -1
View File
@@ -301,7 +301,7 @@ typedef struct {
plmn_identity_t plmn; plmn_identity_t plmn;
uint32_t tac; uint32_t tac;
bool isIntraFrequencyNeighbour; bool isIntraFrequencyNeighbour;
} nr_neighbour_gnb_configuration_t; } nr_neighbour_cell_t;
typedef struct neighbour_cell_configuration_s { typedef struct neighbour_cell_configuration_s {
uint64_t nr_cell_id; uint64_t nr_cell_id;
+5 -5
View File
@@ -150,18 +150,18 @@ const neighbour_cell_configuration_t *get_neighbour_cell_config(const gNB_RRC_IN
static bool eq_pci(const void *vval, const void *vit) static bool eq_pci(const void *vval, const void *vit)
{ {
const int *pci = (const int *)vval; const int *pci = (const int *)vval;
const nr_neighbour_gnb_configuration_t *neighbour = (const nr_neighbour_gnb_configuration_t *)vit; const nr_neighbour_cell_t *neighbour = (const nr_neighbour_cell_t *)vit;
return neighbour->physicalCellId == *pci; return neighbour->physicalCellId == *pci;
} }
const nr_neighbour_gnb_configuration_t *get_neighbour_gnb_by_pci(const neighbour_cell_configuration_t *cell, int pci) const nr_neighbour_cell_t *get_neighbour_cell_by_pci(const neighbour_cell_configuration_t *cell, int pci)
{ {
seq_arr_t *head = cell->neighbour_cells; seq_arr_t *head = cell->neighbour_cells;
DevAssert(head != NULL); DevAssert(head != NULL);
LOG_D(NR_RRC, "Number of neighbour cells: %ld\n", head->size); LOG_D(NR_RRC, "Number of neighbour cells: %ld\n", head->size);
elm_arr_t e = find_if(head, &pci, eq_pci); elm_arr_t e = find_if(head, &pci, eq_pci);
if (e.found) { if (e.found) {
const nr_neighbour_gnb_configuration_t *neighbour = (const nr_neighbour_gnb_configuration_t *)e.it; const nr_neighbour_cell_t *neighbour = (const nr_neighbour_cell_t *)e.it;
LOG_D(NR_RRC, "Found matching neighbour cell with PCI %d and Cell ID %ld\n", neighbour->physicalCellId, neighbour->nrcell_id); LOG_D(NR_RRC, "Found matching neighbour cell with PCI %d and Cell ID %ld\n", neighbour->physicalCellId, neighbour->nrcell_id);
return neighbour; return neighbour;
} }
@@ -593,7 +593,7 @@ nr_rrc_reconfig_param_t get_RRCReconfiguration_params(gNB_RRC_INST *rrc, gNB_RRC
LOG_D(NR_RRC, "HO LOG: Preparing A3 Event Measurement Configuration!\n"); LOG_D(NR_RRC, "HO LOG: Preparing A3 Event Measurement Configuration!\n");
bool is_default_a3_added = false; bool is_default_a3_added = false;
for (int i = 0; i < neighbour_cells->size; i++) { for (int i = 0; i < neighbour_cells->size; i++) {
nr_neighbour_gnb_configuration_t *neighbourCell = (nr_neighbour_gnb_configuration_t *)seq_arr_at(neighbour_cells, i); nr_neighbour_cell_t *neighbourCell = (nr_neighbour_cell_t *)seq_arr_at(neighbour_cells, i);
if (!neighbourCell->isIntraFrequencyNeighbour) if (!neighbourCell->isIntraFrequencyNeighbour)
continue; continue;
seq_arr_push_back(pci_seq, &neighbourCell->physicalCellId, sizeof(int)); seq_arr_push_back(pci_seq, &neighbourCell->physicalCellId, sizeof(int));
@@ -1401,7 +1401,7 @@ static void process_Event_Based_Measurement_Report(gNB_RRC_INST *rrc,
const f1ap_served_cell_info_t *neigh_cell = get_cell_information_by_phycellId(neighbour_pci); const f1ap_served_cell_info_t *neigh_cell = get_cell_information_by_phycellId(neighbour_pci);
const f1ap_served_cell_info_t *serving_cell = get_cell_information_by_phycellId(scell_pci); const f1ap_served_cell_info_t *serving_cell = get_cell_information_by_phycellId(scell_pci);
const neighbour_cell_configuration_t *cell = get_neighbour_cell_config(rrc, serving_cell->nr_cellid); const neighbour_cell_configuration_t *cell = get_neighbour_cell_config(rrc, serving_cell->nr_cellid);
const nr_neighbour_gnb_configuration_t *neighbour = get_neighbour_gnb_by_pci(cell, neighbour_pci); const nr_neighbour_cell_t *neighbour = get_neighbour_cell_by_pci(cell, neighbour_pci);
// CU does not have f1 connection with neighbour cell context. So check does serving cell has this phyCellId as a // CU does not have f1 connection with neighbour cell context. So check does serving cell has this phyCellId as a
// neighbour. // neighbour.
if (!neigh_cell && neighbour) { if (!neigh_cell && neighbour) {
+2 -2
View File
@@ -202,7 +202,7 @@ const struct f1ap_served_cell_info_t *get_cell_information_by_phycellId(int phyC
static void is_intra_frequency_neighbour(void *ssb_arfcn, void *neighbour_cell) static void is_intra_frequency_neighbour(void *ssb_arfcn, void *neighbour_cell)
{ {
uint32_t *ssb_arfcn_ptr = (uint32_t *)ssb_arfcn; uint32_t *ssb_arfcn_ptr = (uint32_t *)ssb_arfcn;
nr_neighbour_gnb_configuration_t *neighbour_cell_ptr = (nr_neighbour_gnb_configuration_t *)neighbour_cell; nr_neighbour_cell_t *neighbour_cell_ptr = (nr_neighbour_cell_t *)neighbour_cell;
if (*ssb_arfcn_ptr == neighbour_cell_ptr->absoluteFrequencySSB) { if (*ssb_arfcn_ptr == neighbour_cell_ptr->absoluteFrequencySSB) {
LOG_D(NR_RRC, "HO LOG: found intra frequency neighbour %lu!\n", neighbour_cell_ptr->nrcell_id); LOG_D(NR_RRC, "HO LOG: found intra frequency neighbour %lu!\n", neighbour_cell_ptr->nrcell_id);
@@ -237,7 +237,7 @@ static bool valid_du_in_neighbour_configs(const seq_arr_t *neighbour_cell_config
for (int c = 0; c < neighbour_cell_configuration->size; c++) { for (int c = 0; c < neighbour_cell_configuration->size; c++) {
const neighbour_cell_configuration_t *neighbour_config = seq_arr_at(neighbour_cell_configuration, c); const neighbour_cell_configuration_t *neighbour_config = seq_arr_at(neighbour_cell_configuration, c);
for (int ni = 0; ni < neighbour_config->neighbour_cells->size; ni++) { for (int ni = 0; ni < neighbour_config->neighbour_cells->size; ni++) {
const nr_neighbour_gnb_configuration_t *nc = seq_arr_at(neighbour_config->neighbour_cells, ni); const nr_neighbour_cell_t *nc = seq_arr_at(neighbour_config->neighbour_cells, ni);
if (nc->nrcell_id != cell->nr_cellid) if (nc->nrcell_id != cell->nr_cellid)
continue; continue;
// current cell is in the nc config, check that config matches // current cell is in the nc config, check that config matches