Commit 3e8636ce authored by Robert Schmidt's avatar Robert Schmidt

Test gNB-DU config update: cell to add/delete

parent adbbbaea
......@@ -1022,7 +1022,6 @@ F1AP_F1AP_PDU_t *encode_f1ap_du_configuration_update(const f1ap_gnb_du_configura
/* mandatory */
/* c2. Served_Cells_To_Add */
if (msg->num_cells_to_add > 0) {
AssertFatal(false, "code for adding cells not tested\n");
asn1cSequenceAdd(out->protocolIEs.list, F1AP_GNBDUConfigurationUpdateIEs_t, ie2);
ie2->id = F1AP_ProtocolIE_ID_id_Served_Cells_To_Add_List;
ie2->criticality = F1AP_Criticality_reject;
......@@ -1080,7 +1079,6 @@ F1AP_F1AP_PDU_t *encode_f1ap_du_configuration_update(const f1ap_gnb_du_configura
ie4->id = F1AP_ProtocolIE_ID_id_Served_Cells_To_Delete_List;
ie4->criticality = F1AP_Criticality_reject;
ie4->value.present = F1AP_GNBDUConfigurationUpdateIEs__value_PR_Served_Cells_To_Delete_List;
AssertFatal(msg->num_cells_to_delete == 0, "code for deleting cells not tested\n");
for (int i = 0; i < msg->num_cells_to_delete; i++) {
asn1cSequenceAdd(ie4->value.choice.Served_Cells_To_Delete_List.list,
F1AP_Served_Cells_To_Delete_ItemIEs_t,
......@@ -1134,8 +1132,8 @@ bool decode_f1ap_du_configuration_update(const F1AP_F1AP_PDU_t *pdu, f1ap_gnb_du
} break;
case F1AP_ProtocolIE_ID_id_Served_Cells_To_Add_List: {
/* Served Cells To Add List */
AssertError(out->num_cells_to_add > 0, return false, "at least 1 cell to add shall to be present");
out->num_cells_to_add = ie->value.choice.Served_Cells_To_Add_List.list.count;
AssertError(out->num_cells_to_add > 0, return false, "at least 1 cell to add shall to be present");
for (int i = 0; i < out->num_cells_to_add; i++) {
F1AP_Served_Cells_To_Add_Item_t *served_cells_item =
&((F1AP_Served_Cells_To_Add_ItemIEs_t *)ie->value.choice.Served_Cells_To_Add_List.list.array[i])
......
......@@ -420,16 +420,38 @@ static void test_f1ap_du_configuration_update(void)
.plmn.mnc_digit_length = 3,
.tac = tac,
};
char *mtc2_data = "mtc2";
uint8_t *mtc2 = (void*)strdup(mtc2_data);
int mtc2_len = strlen(mtc2_data);
f1ap_served_cell_info_t info2 = {
.mode = F1AP_MODE_FDD,
.fdd.ul_freqinfo.arfcn = 640000,
.fdd.ul_freqinfo.band = 78,
.fdd.dl_freqinfo.arfcn = 600000,
.fdd.dl_freqinfo.band = 78,
.fdd.ul_tbw.nrb = 66,
.fdd.ul_tbw.scs = 1,
.fdd.dl_tbw.nrb = 66,
.fdd.dl_tbw.scs = 1,
.measurement_timing_config_len = mtc2_len,
.measurement_timing_config = mtc2,
.nr_cellid = 123456,
.plmn.mcc = 2,
.plmn.mnc = 2,
.plmn.mnc_digit_length = 2,
};
/* create message */
f1ap_gnb_du_configuration_update_t orig = {
.transaction_id = 2,
.num_cells_to_add = 1,
.cell_to_add[0].info = info2,
.num_cells_to_modify = 1,
.cell_to_modify[0].info = info,
.cell_to_modify[0].old_nr_cellid = 1235UL,
.cell_to_modify[0].old_plmn.mcc = 208,
.cell_to_modify[0].old_plmn.mnc = 88,
.cell_to_modify[0].old_plmn.mnc_digit_length = 2,
.num_cells_to_delete = 0,
.num_cells_to_delete = 1,
.cell_to_delete[0].nr_cellid = 1234UL,
.cell_to_delete[0].plmn.mcc = 1,
.cell_to_delete[0].plmn.mnc = 1,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment