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

Refactor F1 Setup Req: TAC is optional

parent d8276eed
...@@ -93,7 +93,7 @@ typedef struct f1ap_plmn_t { ...@@ -93,7 +93,7 @@ typedef struct f1ap_plmn_t {
typedef struct cellIDs_s { typedef struct cellIDs_s {
// Served Cell Information // Served Cell Information
/* Tracking area code */ /* Tracking area code */
uint32_t tac; uint32_t *tac;
// NR CGI // NR CGI
f1ap_plmn_t plmn; f1ap_plmn_t plmn;
......
...@@ -122,8 +122,10 @@ int CU_handle_F1_SETUP_REQUEST(instance_t instance, ...@@ -122,8 +122,10 @@ int CU_handle_F1_SETUP_REQUEST(instance_t instance,
F1AP_Served_Cell_Information_t *servedCellInformation= &served_cells_item->served_Cell_Information; F1AP_Served_Cell_Information_t *servedCellInformation= &served_cells_item->served_Cell_Information;
/* tac */ /* tac */
if (servedCellInformation->fiveGS_TAC) { if (servedCellInformation->fiveGS_TAC) {
OCTET_STRING_TO_INT16(servedCellInformation->fiveGS_TAC, req->cell[i].tac); req->cell[i].tac = malloc(sizeof(*req->cell[i].tac));
LOG_D(F1AP, "req->tac[%d] %d \n", i, req->cell[i].tac); AssertFatal(req->cell[i].tac != NULL, "out of memory\n");
OCTET_STRING_TO_INT16(servedCellInformation->fiveGS_TAC, *req->cell[i].tac);
LOG_D(F1AP, "req->tac[%d] %d \n", i, *req->cell[i].tac);
} }
/* - nRCGI */ /* - nRCGI */
......
...@@ -157,9 +157,11 @@ int DU_send_F1_SETUP_REQUEST(instance_t instance, f1ap_setup_req_t *setup_req) ...@@ -157,9 +157,11 @@ int DU_send_F1_SETUP_REQUEST(instance_t instance, f1ap_setup_req_t *setup_req)
/* - nRPCI */ /* - nRPCI */
served_cell_information->nRPCI = cell->nr_pci; // int 0..1007 served_cell_information->nRPCI = cell->nr_pci; // int 0..1007
/* - fiveGS_TAC */ /* - fiveGS_TAC */
uint32_t tac=htonl(cell->tac); if (cell->tac != NULL) {
asn1cCalloc(served_cell_information->fiveGS_TAC, netOrder); uint32_t tac=htonl(*cell->tac);
OCTET_STRING_fromBuf(netOrder, ((char *)&tac)+1, 3); asn1cCalloc(served_cell_information->fiveGS_TAC, netOrder);
OCTET_STRING_fromBuf(netOrder, ((char *)&tac)+1, 3);
}
/* - Configured_EPS_TAC */ /* - Configured_EPS_TAC */
if(0) { if(0) {
...@@ -597,9 +599,11 @@ int DU_send_gNB_DU_CONFIGURATION_UPDATE(instance_t instance, ...@@ -597,9 +599,11 @@ int DU_send_gNB_DU_CONFIGURATION_UPDATE(instance_t instance,
cellIDs_t *cell = &f1ap_setup_req->cell[j]; cellIDs_t *cell = &f1ap_setup_req->cell[j];
served_cell_information->nRPCI = cell->nr_pci; // int 0..1007 served_cell_information->nRPCI = cell->nr_pci; // int 0..1007
/* - fiveGS_TAC */ /* - fiveGS_TAC */
uint32_t tac=htonl(cell->tac); if (cell->tac != NULL) {
served_cell_information->fiveGS_TAC=(F1AP_FiveGS_TAC_t *) calloc(1,sizeof(F1AP_FiveGS_TAC_t *)); uint32_t tac = htonl(*cell->tac);
OCTET_STRING_fromBuf(served_cell_information->fiveGS_TAC, ((char *)&tac)+1, 3); served_cell_information->fiveGS_TAC = calloc(1, sizeof(*served_cell_information->fiveGS_TAC));
OCTET_STRING_fromBuf(served_cell_information->fiveGS_TAC, ((char *)&tac)+1, 3);
}
/* - Configured_EPS_TAC */ /* - Configured_EPS_TAC */
if(1) { if(1) {
......
...@@ -1942,7 +1942,9 @@ int RCconfig_NR_DU_F1(MessageDef *msg_p, uint32_t i) { ...@@ -1942,7 +1942,9 @@ int RCconfig_NR_DU_F1(MessageDef *msg_p, uint32_t i) {
f1Setup->num_cells_available++; f1Setup->num_cells_available++;
f1Setup->gNB_DU_id = *(GNBParamList.paramarray[k][GNB_GNB_ID_IDX].uptr); f1Setup->gNB_DU_id = *(GNBParamList.paramarray[k][GNB_GNB_ID_IDX].uptr);
f1Setup->gNB_DU_name = strdup(*(GNBParamList.paramarray[k][GNB_GNB_NAME_IDX].strptr)); f1Setup->gNB_DU_name = strdup(*(GNBParamList.paramarray[k][GNB_GNB_NAME_IDX].strptr));
f1Setup->cell[k].tac = *GNBParamList.paramarray[k][GNB_TRACKING_AREA_CODE_IDX].uptr; f1Setup->cell[k].tac = malloc(sizeof(*f1Setup->cell[k].tac));
AssertFatal(f1Setup->cell[k].tac != NULL, "out of memory\n");
*f1Setup->cell[k].tac = *GNBParamList.paramarray[k][GNB_TRACKING_AREA_CODE_IDX].uptr;
f1Setup->cell[k].plmn.mcc = *PLMNParamList.paramarray[k][GNB_MOBILE_COUNTRY_CODE_IDX].uptr; f1Setup->cell[k].plmn.mcc = *PLMNParamList.paramarray[k][GNB_MOBILE_COUNTRY_CODE_IDX].uptr;
f1Setup->cell[k].plmn.mnc = *PLMNParamList.paramarray[k][GNB_MOBILE_NETWORK_CODE_IDX].uptr; f1Setup->cell[k].plmn.mnc = *PLMNParamList.paramarray[k][GNB_MOBILE_NETWORK_CODE_IDX].uptr;
f1Setup->cell[k].plmn.mnc_digit_length = *PLMNParamList.paramarray[k][GNB_MNC_DIGIT_LENGTH].u8ptr; f1Setup->cell[k].plmn.mnc_digit_length = *PLMNParamList.paramarray[k][GNB_MNC_DIGIT_LENGTH].u8ptr;
...@@ -1956,7 +1958,7 @@ int RCconfig_NR_DU_F1(MessageDef *msg_p, uint32_t i) { ...@@ -1956,7 +1958,7 @@ int RCconfig_NR_DU_F1(MessageDef *msg_p, uint32_t i) {
k, k,
f1Setup->gNB_DU_id, f1Setup->gNB_DU_id,
f1Setup->gNB_DU_name, f1Setup->gNB_DU_name,
f1Setup->cell[k].tac, *f1Setup->cell[k].tac,
f1Setup->cell[k].plmn.mcc, f1Setup->cell[k].plmn.mcc,
f1Setup->cell[k].plmn.mnc, f1Setup->cell[k].plmn.mnc,
f1Setup->cell[k].plmn.mnc_digit_length, f1Setup->cell[k].plmn.mnc_digit_length,
...@@ -1978,7 +1980,7 @@ int RCconfig_NR_DU_F1(MessageDef *msg_p, uint32_t i) { ...@@ -1978,7 +1980,7 @@ int RCconfig_NR_DU_F1(MessageDef *msg_p, uint32_t i) {
rrc->configuration.mcc[0] = f1Setup->cell[k].plmn.mcc; rrc->configuration.mcc[0] = f1Setup->cell[k].plmn.mcc;
rrc->configuration.mnc[0] = f1Setup->cell[k].plmn.mnc; rrc->configuration.mnc[0] = f1Setup->cell[k].plmn.mnc;
rrc->configuration.tac = f1Setup->cell[k].tac; rrc->configuration.tac = *f1Setup->cell[k].tac;
rrc->nr_cellid = f1Setup->cell[k].nr_cellid; rrc->nr_cellid = f1Setup->cell[k].nr_cellid;
f1Setup->cell[k].nr_pci = *rrc->configuration.scc->physCellId; f1Setup->cell[k].nr_pci = *rrc->configuration.scc->physCellId;
f1Setup->cell[k].num_ssi = 0; f1Setup->cell[k].num_ssi = 0;
......
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