Refactor (gNB Config): look up neighbour-list nr_cellid by name with gpd
Outer gNB neighbour_list entries now only declare the serving cell nr_cellid. The code resolves that field with gpd instead of a fixed column index. Changes: - gnb_paramdef.h: remove unused NEIGHBOUR_CELL_PHYSICAL_ID from GNB_NEIGHBOUR_LIST_PARAM_LIST (keep NRCELLID only). - gnb_config.c: in fill_neighbour_cell_configuration, set nr_cell_id from gpd
This commit is contained in:
@@ -2086,7 +2086,8 @@ static void fill_neighbour_cell_configuration(const uint8_t gnb_idx, gNB_RRC_INS
|
||||
seq_arr_init(rrc->neighbour_cell_configuration, sizeof(neighbour_cell_configuration_t));
|
||||
|
||||
for (int elm = 0; elm < nlist.numelt; ++elm) {
|
||||
neighbour_cell_configuration_t cell = {.nr_cell_id = *nlist.paramarray[elm][0].u64ptr};
|
||||
neighbour_cell_configuration_t cell = {0};
|
||||
cell.nr_cell_id = *gpd(nlist.paramarray[elm], sizeofArray(nparams), GNB_CONFIG_STRING_NRCELLID)->u64ptr;
|
||||
snprintf(path, sizeof(path), "%s.[%i].%s.[%i]", GNB_CONFIG_STRING_GNB_LIST, gnb_idx, GNB_CONFIG_STRING_NEIGHBOUR_LIST, elm);
|
||||
GET_PARAMS_LIST(ncell_list, ncell_params, GNBNEIGHBOURCELLPARAMS_DESC, GNB_CONFIG_STRING_NEIGHBOUR_CELL_LIST, path);
|
||||
if (ncell_list.numelt < 1)
|
||||
|
||||
@@ -289,7 +289,6 @@ typedef enum {
|
||||
#define GNB_NEIGHBOUR_LIST_PARAM_LIST { \
|
||||
/* optname helpstr paramflags XXXptr def val type numelt */ \
|
||||
{GNB_CONFIG_STRING_NRCELLID, "cell nrCell Id which has neighbours", PARAMFLAG_MANDATORY, .u64ptr=NULL, .defint64val=0, TYPE_UINT64, 0}, \
|
||||
{GNB_CONFIG_STRING_NEIGHBOUR_CELL_PHYSICAL_ID, "neighbour cell physical id", PARAMFLAG_MANDATORY, .uptr=NULL, .defuintval=0, TYPE_UINT, 0}, \
|
||||
}
|
||||
// clang-format on
|
||||
#define GNB_CONFIG_STRING_NEIGHBOUR_CELL_LIST "neighbour_cell_configuration"
|
||||
|
||||
Reference in New Issue
Block a user