Commit 46183f89 authored by Masayuki Harada's avatar Masayuki Harada

Merge remote-tracking branch 'remotes/oai/develop-NR_SA_F1AP_5GRECORDS' into...

Merge remote-tracking branch 'remotes/oai/develop-NR_SA_F1AP_5GRECORDS' into develop-NR_SA_F1AP_5GRECORDS
parents 7379717d 1145a551
...@@ -3166,15 +3166,12 @@ void handle_f1ap_setup_resp(f1ap_setup_resp_t *resp) { ...@@ -3166,15 +3166,12 @@ void handle_f1ap_setup_resp(f1ap_setup_resp_t *resp) {
if (RC.rrc[i]->nr_cellid == resp->cells_to_activate[j].nr_cellid && if (RC.rrc[i]->nr_cellid == resp->cells_to_activate[j].nr_cellid &&
(check_plmn_identity(carrier, resp->cells_to_activate[j].mcc, resp->cells_to_activate[j].mnc, resp->cells_to_activate[j].mnc_digit_length)>0 && (check_plmn_identity(carrier, resp->cells_to_activate[j].mcc, resp->cells_to_activate[j].mnc, resp->cells_to_activate[j].mnc_digit_length)>0 &&
resp->cells_to_activate[j].nrpci == carrier->physCellId)) { resp->cells_to_activate[j].nrpci == carrier->physCellId)) {
LOG_I(ENB_APP, "Copy system information and decode it for %i number of SI\n", resp->cells_to_activate[j].num_SI);
// copy system information and decode it // copy system information and decode it
for (si_ind=2; si_ind<10; si_ind++) { for (si_ind=2; si_ind<resp->cells_to_activate[j].num_SI + 2; si_ind++) {
printf("SI %d size %d: ", si_ind, resp->cells_to_activate[j].SI_container_length[si_ind]); //printf("SI %d size %d: ", si_ind, resp->cells_to_activate[j].SI_container_length[si_ind]);
for (int n=0;n<resp->cells_to_activate[j].SI_container_length[si_ind];n++) //for (int n=0;n<resp->cells_to_activate[j].SI_container_length[si_ind];n++)
printf("%02x ",resp->cells_to_activate[j].SI_container[si_ind][n]); // printf("%02x ",resp->cells_to_activate[j].SI_container[si_ind][n]);
printf("\n"); //printf("\n");
if (si_ind==6) si_ind=9; if (si_ind==6) si_ind=9;
if (resp->cells_to_activate[j].SI_container[si_ind] != NULL) { if (resp->cells_to_activate[j].SI_container[si_ind] != NULL) {
extract_and_decode_SI(i, extract_and_decode_SI(i,
......
...@@ -315,17 +315,17 @@ int CU_send_F1_SETUP_RESPONSE(instance_t instance, ...@@ -315,17 +315,17 @@ int CU_send_F1_SETUP_RESPONSE(instance_t instance,
/* mandatory */ /* mandatory */
/* c3. cells to be Activated list */ /* c3. cells to be Activated list */
int num_cells_to_activate = f1ap_setup_resp->num_cells_to_activate; int num_cells_to_activate = f1ap_setup_resp->num_cells_to_activate;
LOG_D(F1AP, "num_cells_to_activate = %d \n", num_cells_to_activate); LOG_I(F1AP, "num_cells_to_activate = %d \n", num_cells_to_activate);
if (num_cells_to_activate >0) { if (num_cells_to_activate >0) {
ie = (F1AP_F1SetupResponseIEs_t *)calloc(1, sizeof(F1AP_F1SetupResponseIEs_t)); ie = (F1AP_F1SetupResponseIEs_t *)calloc(1, sizeof(F1AP_F1SetupResponseIEs_t));
ie->id = F1AP_ProtocolIE_ID_id_Cells_to_be_Activated_List; ie->id = F1AP_ProtocolIE_ID_id_Cells_to_be_Activated_List;
ie->criticality = F1AP_Criticality_reject; ie->criticality = F1AP_Criticality_reject;
ie->value.present = F1AP_F1SetupResponseIEs__value_PR_Cells_to_be_Activated_List; ie->value.present = F1AP_F1SetupResponseIEs__value_PR_Cells_to_be_Activated_List;
for (i=0; i<num_cells_to_activate; i++) {
for (i=0; LOG_I(F1AP, "(%d) mcc = %d, mnc = %d, mnc_digit_length = %d\n",
i<num_cells_to_activate; i, f1ap_setup_resp->cells_to_activate[i].mcc, f1ap_setup_resp->cells_to_activate[i].mnc, f1ap_setup_resp->cells_to_activate[i].mnc_digit_length);
i++) {
F1AP_Cells_to_be_Activated_List_ItemIEs_t *cells_to_be_activated_list_item_ies; F1AP_Cells_to_be_Activated_List_ItemIEs_t *cells_to_be_activated_list_item_ies;
cells_to_be_activated_list_item_ies = (F1AP_Cells_to_be_Activated_List_ItemIEs_t *)calloc(1, sizeof(F1AP_Cells_to_be_Activated_List_ItemIEs_t)); cells_to_be_activated_list_item_ies = (F1AP_Cells_to_be_Activated_List_ItemIEs_t *)calloc(1, sizeof(F1AP_Cells_to_be_Activated_List_ItemIEs_t));
...@@ -379,7 +379,7 @@ int CU_send_F1_SETUP_RESPONSE(instance_t instance, ...@@ -379,7 +379,7 @@ int CU_send_F1_SETUP_RESPONSE(instance_t instance,
(const char*)f1ap_setup_resp->cells_to_activate[i].SI_container[sIBtype], (const char*)f1ap_setup_resp->cells_to_activate[i].SI_container[sIBtype],
f1ap_setup_resp->cells_to_activate[i].SI_container_length[sIBtype]); f1ap_setup_resp->cells_to_activate[i].SI_container_length[sIBtype]);
LOG_D(F1AP, "f1ap_setup_resp->SI_container_length[%d][%d] = %d \n", i,sIBtype,f1ap_setup_resp->cells_to_activate[i].SI_container_length[sIBtype]); LOG_I(F1AP, "f1ap_setup_resp->SI_container_length[%d][%d] = %d \n", i,sIBtype,f1ap_setup_resp->cells_to_activate[i].SI_container_length[sIBtype]);
ASN_SEQUENCE_ADD(&gNB_CUSystemInformation->sibtypetobeupdatedlist.list,sib_item); ASN_SEQUENCE_ADD(&gNB_CUSystemInformation->sibtypetobeupdatedlist.list,sib_item);
} }
} }
...@@ -569,6 +569,9 @@ int CU_send_gNB_CU_CONFIGURATION_UPDATE(instance_t instance, f1ap_gnb_cu_configu ...@@ -569,6 +569,9 @@ int CU_send_gNB_CU_CONFIGURATION_UPDATE(instance_t instance, f1ap_gnb_cu_configu
for (i=0; i<f1ap_gnb_cu_configuration_update->num_cells_to_activate; i++) { for (i=0; i<f1ap_gnb_cu_configuration_update->num_cells_to_activate; i++) {
LOG_I(F1AP, "(%d) mcc = %d, mnc = %d, mnc_digit_length = %d\n",
i, f1ap_gnb_cu_configuration_update->cells_to_activate[i].mcc, f1ap_gnb_cu_configuration_update->cells_to_activate[i].mnc, f1ap_gnb_cu_configuration_update->cells_to_activate[i].mnc_digit_length);
F1AP_Cells_to_be_Activated_List_ItemIEs_t *cells_to_be_activated_list_item_ies; F1AP_Cells_to_be_Activated_List_ItemIEs_t *cells_to_be_activated_list_item_ies;
cells_to_be_activated_list_item_ies = (F1AP_Cells_to_be_Activated_List_ItemIEs_t *)calloc(1, sizeof(F1AP_Cells_to_be_Activated_List_ItemIEs_t)); cells_to_be_activated_list_item_ies = (F1AP_Cells_to_be_Activated_List_ItemIEs_t *)calloc(1, sizeof(F1AP_Cells_to_be_Activated_List_ItemIEs_t));
cells_to_be_activated_list_item_ies->id = F1AP_ProtocolIE_ID_id_Cells_to_be_Activated_List_Item; cells_to_be_activated_list_item_ies->id = F1AP_ProtocolIE_ID_id_Cells_to_be_Activated_List_Item;
...@@ -590,53 +593,56 @@ int CU_send_gNB_CU_CONFIGURATION_UPDATE(instance_t instance, f1ap_gnb_cu_configu ...@@ -590,53 +593,56 @@ int CU_send_gNB_CU_CONFIGURATION_UPDATE(instance_t instance, f1ap_gnb_cu_configu
&nRCGI.nRCellIdentity); &nRCGI.nRCellIdentity);
cells_to_be_activated_list_item.nRCGI = nRCGI; cells_to_be_activated_list_item.nRCGI = nRCGI;
// optional if(RC.nrrrc) {
// -nRPCI
cells_to_be_activated_list_item.nRPCI = (F1AP_NRPCI_t *)calloc(1, sizeof(F1AP_NRPCI_t));
*cells_to_be_activated_list_item.nRPCI = f1ap_gnb_cu_configuration_update->cells_to_activate[i].nrpci; // int 0..1007
// optional // optional
// 3.1.2 gNB-CUSystem Information // -nRPCI
F1AP_Cells_to_be_Activated_List_ItemExtIEs_t *cells_to_be_activated_list_itemExtIEs; cells_to_be_activated_list_item.nRPCI = (F1AP_NRPCI_t *)calloc(1, sizeof(F1AP_NRPCI_t));
cells_to_be_activated_list_itemExtIEs = (F1AP_Cells_to_be_Activated_List_ItemExtIEs_t *)calloc(1, sizeof(F1AP_Cells_to_be_Activated_List_ItemExtIEs_t)); *cells_to_be_activated_list_item.nRPCI = f1ap_gnb_cu_configuration_update->cells_to_activate[i].nrpci; // int 0..1007
cells_to_be_activated_list_itemExtIEs->id = F1AP_ProtocolIE_ID_id_gNB_CUSystemInformation;
cells_to_be_activated_list_itemExtIEs->criticality = F1AP_Criticality_reject; // optional
cells_to_be_activated_list_itemExtIEs->extensionValue.present = F1AP_Cells_to_be_Activated_List_ItemExtIEs__extensionValue_PR_GNB_CUSystemInformation; // 3.1.2 gNB-CUSystem Information
F1AP_Cells_to_be_Activated_List_ItemExtIEs_t *cells_to_be_activated_list_itemExtIEs;
cells_to_be_activated_list_itemExtIEs = (F1AP_Cells_to_be_Activated_List_ItemExtIEs_t *)calloc(1, sizeof(F1AP_Cells_to_be_Activated_List_ItemExtIEs_t));
cells_to_be_activated_list_itemExtIEs->id = F1AP_ProtocolIE_ID_id_gNB_CUSystemInformation;
cells_to_be_activated_list_itemExtIEs->criticality = F1AP_Criticality_reject;
cells_to_be_activated_list_itemExtIEs->extensionValue.present = F1AP_Cells_to_be_Activated_List_ItemExtIEs__extensionValue_PR_GNB_CUSystemInformation;
if (f1ap_gnb_cu_configuration_update->cells_to_activate[i].num_SI > 0) {
F1AP_GNB_CUSystemInformation_t *gNB_CUSystemInformation = (F1AP_GNB_CUSystemInformation_t *)calloc(1, sizeof(F1AP_GNB_CUSystemInformation_t));
//LOG_I(F1AP, "%s() SI %d size %d: ", __func__, i, f1ap_setup_resp->SI_container_length[i][0]);
//for (int n = 0; n < f1ap_setup_resp->SI_container_length[i][0]; n++)
// printf("%02x ", f1ap_setup_resp->SI_container[i][0][n]);
//printf("\n");
if (f1ap_gnb_cu_configuration_update->cells_to_activate[i].num_SI > 0) { // for (int sIBtype=2;sIBtype<33;sIBtype++) { //21 ? 33 ?
F1AP_GNB_CUSystemInformation_t *gNB_CUSystemInformation = (F1AP_GNB_CUSystemInformation_t *)calloc(1, sizeof(F1AP_GNB_CUSystemInformation_t)); for (int sIBtype=2;sIBtype<21;sIBtype++) {
//LOG_I(F1AP, "%s() SI %d size %d: ", __func__, i, f1ap_setup_resp->SI_container_length[i][0]); if (f1ap_gnb_cu_configuration_update->cells_to_activate[i].SI_container[sIBtype]!=NULL) {
//for (int n = 0; n < f1ap_setup_resp->SI_container_length[i][0]; n++) AssertFatal(sIBtype < 6 || sIBtype == 9, "Illegal SI type %d\n",sIBtype);
// printf("%02x ", f1ap_setup_resp->SI_container[i][0][n]); F1AP_SibtypetobeupdatedListItem_t *sib_item = calloc(1,sizeof(*sib_item));
//printf("\n"); memset((void*)sib_item,0,sizeof(*sib_item));
sib_item->sIBtype = sIBtype;
// for (int sIBtype=2;sIBtype<33;sIBtype++) { //21 ? 33 ? OCTET_STRING_fromBuf(&sib_item->sIBmessage,
for (int sIBtype=2;sIBtype<21;sIBtype++) { (const char*)f1ap_gnb_cu_configuration_update->cells_to_activate[i].SI_container[sIBtype],
if (f1ap_gnb_cu_configuration_update->cells_to_activate[i].SI_container[sIBtype]!=NULL) { f1ap_gnb_cu_configuration_update->cells_to_activate[i].SI_container_length[sIBtype]);
AssertFatal(sIBtype < 6 || sIBtype == 9, "Illegal SI type %d\n",sIBtype);
F1AP_SibtypetobeupdatedListItem_t *sib_item = calloc(1,sizeof(*sib_item)); LOG_D(F1AP, "f1ap_setup_resp->SI_container_length[%d][%d] = %d \n", i,sIBtype,f1ap_gnb_cu_configuration_update->cells_to_activate[i].SI_container_length[sIBtype]);
memset((void*)sib_item,0,sizeof(*sib_item)); ASN_SEQUENCE_ADD(&gNB_CUSystemInformation->sibtypetobeupdatedlist.list,sib_item);
sib_item->sIBtype = sIBtype; }
OCTET_STRING_fromBuf(&sib_item->sIBmessage, }
(const char*)f1ap_gnb_cu_configuration_update->cells_to_activate[i].SI_container[sIBtype], cells_to_be_activated_list_itemExtIEs->extensionValue.choice.GNB_CUSystemInformation = *gNB_CUSystemInformation;
f1ap_gnb_cu_configuration_update->cells_to_activate[i].SI_container_length[sIBtype]);
LOG_D(F1AP, "f1ap_setup_resp->SI_container_length[%d][%d] = %d \n", i,sIBtype,f1ap_gnb_cu_configuration_update->cells_to_activate[i].SI_container_length[sIBtype]); F1AP_ProtocolExtensionContainer_154P112_t p_154P112_t;
ASN_SEQUENCE_ADD(&gNB_CUSystemInformation->sibtypetobeupdatedlist.list,sib_item); memset((void *)&p_154P112_t, 0, sizeof(F1AP_ProtocolExtensionContainer_154P112_t));
}
} ASN_SEQUENCE_ADD(&p_154P112_t.list,
cells_to_be_activated_list_itemExtIEs->extensionValue.choice.GNB_CUSystemInformation = *gNB_CUSystemInformation; cells_to_be_activated_list_itemExtIEs);
cells_to_be_activated_list_item.iE_Extensions = (struct F1AP_ProtocolExtensionContainer*)&p_154P112_t;
F1AP_ProtocolExtensionContainer_154P112_t p_154P112_t; free(gNB_CUSystemInformation);
memset((void *)&p_154P112_t, 0, sizeof(F1AP_ProtocolExtensionContainer_154P112_t)); gNB_CUSystemInformation = NULL;
}
ASN_SEQUENCE_ADD(&p_154P112_t.list,
cells_to_be_activated_list_itemExtIEs);
cells_to_be_activated_list_item.iE_Extensions = (struct F1AP_ProtocolExtensionContainer*)&p_154P112_t;
free(gNB_CUSystemInformation);
gNB_CUSystemInformation = NULL;
} }
// ADD // ADD
...@@ -648,251 +654,251 @@ int CU_send_gNB_CU_CONFIGURATION_UPDATE(instance_t instance, f1ap_gnb_cu_configu ...@@ -648,251 +654,251 @@ int CU_send_gNB_CU_CONFIGURATION_UPDATE(instance_t instance, f1ap_gnb_cu_configu
} }
/*
// c3. Cells_to_be_Deactivated_List if(!RC.nrrrc) {
//
ie = (F1AP_GNBCUConfigurationUpdateIEs_t *)calloc(1, sizeof(F1AP_GNBCUConfigurationUpdateIEs_t));
ie->id = F1AP_ProtocolIE_ID_id_Cells_to_be_Deactivated_List;
ie->criticality = F1AP_Criticality_reject;
ie->value.present = F1AP_GNBCUConfigurationUpdateIEs__value_PR_Cells_to_be_Deactivated_List;
for (i=0;
i<1;
i++) {
F1AP_Cells_to_be_Deactivated_List_ItemIEs_t *cells_to_be_deactivated_list_item_ies;
cells_to_be_deactivated_list_item_ies = (F1AP_Cells_to_be_Deactivated_List_ItemIEs_t *)calloc(1, sizeof(F1AP_Cells_to_be_Deactivated_List_ItemIEs_t));
cells_to_be_deactivated_list_item_ies->id = F1AP_ProtocolIE_ID_id_Cells_to_be_Activated_List_Item;
cells_to_be_deactivated_list_item_ies->criticality = F1AP_Criticality_reject;
cells_to_be_deactivated_list_item_ies->value.present = F1AP_Cells_to_be_Deactivated_List_ItemIEs__value_PR_Cells_to_be_Deactivated_List_Item;
// 3.1 cells to be Deactivated list item
F1AP_Cells_to_be_Deactivated_List_Item_t cells_to_be_deactivated_list_item;
memset((void *)&cells_to_be_deactivated_list_item, 0, sizeof(F1AP_Cells_to_be_Deactivated_List_Item_t));
F1AP_NRCGI_t nRCGI;
memset(&nRCGI, 0, sizeof(F1AP_NRCGI_t));
MCC_MNC_TO_PLMNID(mcc, mnc, mnc_digit_length,
&nRCGI.pLMN_Identity);
NR_CELL_ID_TO_BIT_STRING(123456, &nRCGI.nRCellIdentity);
cells_to_be_deactivated_list_item.nRCGI = nRCGI;
cells_to_be_deactivated_list_item_ies->value.choice.Cells_to_be_Deactivated_List_Item = cells_to_be_deactivated_list_item;
ASN_SEQUENCE_ADD(&ie->value.choice.Cells_to_be_Deactivated_List.list,
cells_to_be_deactivated_list_item_ies);
}
ASN_SEQUENCE_ADD(&out->protocolIEs.list, ie);
*/
/* mandatory */
/* c3. Cells_to_be_Deactivated_List */
ie = (F1AP_GNBCUConfigurationUpdateIEs_t *)calloc(1, sizeof(F1AP_GNBCUConfigurationUpdateIEs_t));
ie->id = F1AP_ProtocolIE_ID_id_Cells_to_be_Deactivated_List;
ie->criticality = F1AP_Criticality_reject;
ie->value.present = F1AP_GNBCUConfigurationUpdateIEs__value_PR_Cells_to_be_Deactivated_List;
/* for (i=0;
// c4. GNB_CU_TNL_Association_To_Add_List i<1;
i++) {
ie = (F1AP_GNBCUConfigurationUpdateIEs_t *)calloc(1, sizeof(F1AP_GNBCUConfigurationUpdateIEs_t)); F1AP_Cells_to_be_Deactivated_List_ItemIEs_t *cells_to_be_deactivated_list_item_ies;
ie->id = F1AP_ProtocolIE_ID_id_GNB_CU_TNL_Association_To_Add_List; cells_to_be_deactivated_list_item_ies = (F1AP_Cells_to_be_Deactivated_List_ItemIEs_t *)calloc(1, sizeof(F1AP_Cells_to_be_Deactivated_List_ItemIEs_t));
ie->criticality = F1AP_Criticality_reject; cells_to_be_deactivated_list_item_ies->id = F1AP_ProtocolIE_ID_id_Cells_to_be_Activated_List_Item;
ie->value.present = F1AP_GNBCUConfigurationUpdateIEs__value_PR_GNB_CU_TNL_Association_To_Add_List; cells_to_be_deactivated_list_item_ies->criticality = F1AP_Criticality_reject;
cells_to_be_deactivated_list_item_ies->value.present = F1AP_Cells_to_be_Deactivated_List_ItemIEs__value_PR_Cells_to_be_Deactivated_List_Item;
// 3.1 cells to be Deactivated list item
F1AP_Cells_to_be_Deactivated_List_Item_t cells_to_be_deactivated_list_item;
memset((void *)&cells_to_be_deactivated_list_item, 0, sizeof(F1AP_Cells_to_be_Deactivated_List_Item_t));
for (i=0;
i<1;
i++) {
F1AP_GNB_CU_TNL_Association_To_Add_ItemIEs_t *gnb_cu_tnl_association_to_add_item_ies; F1AP_NRCGI_t nRCGI;
gnb_cu_tnl_association_to_add_item_ies = (F1AP_GNB_CU_TNL_Association_To_Add_ItemIEs_t *)calloc(1, sizeof(F1AP_GNB_CU_TNL_Association_To_Add_ItemIEs_t)); memset(&nRCGI, 0, sizeof(F1AP_NRCGI_t));
gnb_cu_tnl_association_to_add_item_ies->id = F1AP_ProtocolIE_ID_id_GNB_CU_TNL_Association_To_Add_Item; MCC_MNC_TO_PLMNID(f1ap_gnb_cu_configuration_update->cells_to_activate[i].mcc,
gnb_cu_tnl_association_to_add_item_ies->criticality = F1AP_Criticality_reject; f1ap_gnb_cu_configuration_update->cells_to_activate[i].mnc,
gnb_cu_tnl_association_to_add_item_ies->value.present = F1AP_GNB_CU_TNL_Association_To_Add_ItemIEs__value_PR_GNB_CU_TNL_Association_To_Add_Item; f1ap_gnb_cu_configuration_update->cells_to_activate[i].mnc_digit_length,
&nRCGI.pLMN_Identity);
NR_CELL_ID_TO_BIT_STRING(f1ap_gnb_cu_configuration_update->cells_to_activate[i].nr_cellid, &nRCGI.nRCellIdentity);
cells_to_be_deactivated_list_item.nRCGI = nRCGI;
cells_to_be_deactivated_list_item_ies->value.choice.Cells_to_be_Deactivated_List_Item = cells_to_be_deactivated_list_item;
ASN_SEQUENCE_ADD(&ie->value.choice.Cells_to_be_Deactivated_List.list,
cells_to_be_deactivated_list_item_ies);
}
ASN_SEQUENCE_ADD(&out->protocolIEs.list, ie);
// 4.1 GNB_CU_TNL_Association_To_Add_Item
F1AP_GNB_CU_TNL_Association_To_Add_Item_t gnb_cu_tnl_association_to_add_item;
memset((void *)&gnb_cu_tnl_association_to_add_item, 0, sizeof(F1AP_GNB_CU_TNL_Association_To_Add_Item_t));
/* mandatory */
/* c4. GNB_CU_TNL_Association_To_Add_List */
ie = (F1AP_GNBCUConfigurationUpdateIEs_t *)calloc(1, sizeof(F1AP_GNBCUConfigurationUpdateIEs_t));
ie->id = F1AP_ProtocolIE_ID_id_GNB_CU_TNL_Association_To_Add_List;
ie->criticality = F1AP_Criticality_reject;
ie->value.present = F1AP_GNBCUConfigurationUpdateIEs__value_PR_GNB_CU_TNL_Association_To_Add_List;
// 4.1.1 tNLAssociationTransportLayerAddress for (i=0;
F1AP_CP_TransportLayerAddress_t transportLayerAddress; i<1;
memset((void *)&transportLayerAddress, 0, sizeof(F1AP_CP_TransportLayerAddress_t)); i++) {
transportLayerAddress.present = F1AP_CP_TransportLayerAddress_PR_endpoint_IP_address;
TRANSPORT_LAYER_ADDRESS_IPv4_TO_BIT_STRING(1234, &transportLayerAddress.choice.endpoint_IP_address);
// memset((void *)&transportLayerAddress, 0, sizeof(F1AP_CP_TransportLayerAddress_t));
// transportLayerAddress.present = F1AP_CP_TransportLayerAddress_PR_endpoint_IP_address_and_port;
// transportLayerAddress.choice.endpoint_IP_address_and_port = (F1AP_Endpoint_IP_address_and_port_t *)calloc(1, sizeof(F1AP_Endpoint_IP_address_and_port_t));
// TRANSPORT_LAYER_ADDRESS_IPv4_TO_BIT_STRING(1234, &transportLayerAddress.choice.endpoint_IP_address_and_port.endpoint_IP_address);
gnb_cu_tnl_association_to_add_item.tNLAssociationTransportLayerAddress = transportLayerAddress; F1AP_GNB_CU_TNL_Association_To_Add_ItemIEs_t *gnb_cu_tnl_association_to_add_item_ies;
gnb_cu_tnl_association_to_add_item_ies = (F1AP_GNB_CU_TNL_Association_To_Add_ItemIEs_t *)calloc(1, sizeof(F1AP_GNB_CU_TNL_Association_To_Add_ItemIEs_t));
gnb_cu_tnl_association_to_add_item_ies->id = F1AP_ProtocolIE_ID_id_GNB_CU_TNL_Association_To_Add_Item;
gnb_cu_tnl_association_to_add_item_ies->criticality = F1AP_Criticality_reject;
gnb_cu_tnl_association_to_add_item_ies->value.present = F1AP_GNB_CU_TNL_Association_To_Add_ItemIEs__value_PR_GNB_CU_TNL_Association_To_Add_Item;
// 4.1.2 tNLAssociationUsage // 4.1 GNB_CU_TNL_Association_To_Add_Item
gnb_cu_tnl_association_to_add_item.tNLAssociationUsage = F1AP_TNLAssociationUsage_non_ue; F1AP_GNB_CU_TNL_Association_To_Add_Item_t gnb_cu_tnl_association_to_add_item;
memset((void *)&gnb_cu_tnl_association_to_add_item, 0, sizeof(F1AP_GNB_CU_TNL_Association_To_Add_Item_t));
gnb_cu_tnl_association_to_add_item_ies->value.choice.GNB_CU_TNL_Association_To_Add_Item = gnb_cu_tnl_association_to_add_item; // 4.1.1 tNLAssociationTransportLayerAddress
ASN_SEQUENCE_ADD(&ie->value.choice.GNB_CU_TNL_Association_To_Add_List.list, F1AP_CP_TransportLayerAddress_t transportLayerAddress;
gnb_cu_tnl_association_to_add_item_ies); memset((void *)&transportLayerAddress, 0, sizeof(F1AP_CP_TransportLayerAddress_t));
} transportLayerAddress.present = F1AP_CP_TransportLayerAddress_PR_endpoint_IP_address;
ASN_SEQUENCE_ADD(&out->protocolIEs.list, ie); TRANSPORT_LAYER_ADDRESS_IPv4_TO_BIT_STRING(1234, &transportLayerAddress.choice.endpoint_IP_address);
*/ // memset((void *)&transportLayerAddress, 0, sizeof(F1AP_CP_TransportLayerAddress_t));
// transportLayerAddress.present = F1AP_CP_TransportLayerAddress_PR_endpoint_IP_address_and_port;
// transportLayerAddress.choice.endpoint_IP_address_and_port = (F1AP_Endpoint_IP_address_and_port_t *)calloc(1, sizeof(F1AP_Endpoint_IP_address_and_port_t));
// TRANSPORT_LAYER_ADDRESS_IPv4_TO_BIT_STRING(1234, &transportLayerAddress.choice.endpoint_IP_address_and_port.endpoint_IP_address);
/* gnb_cu_tnl_association_to_add_item.tNLAssociationTransportLayerAddress = transportLayerAddress;
// c5. GNB_CU_TNL_Association_To_Remove_List // 4.1.2 tNLAssociationUsage
ie = (F1AP_GNBCUConfigurationUpdateIEs_t *)calloc(1, sizeof(F1AP_GNBCUConfigurationUpdateIEs_t)); gnb_cu_tnl_association_to_add_item.tNLAssociationUsage = F1AP_TNLAssociationUsage_non_ue;
ie->id = F1AP_ProtocolIE_ID_id_GNB_CU_TNL_Association_To_Remove_List;
ie->criticality = F1AP_Criticality_reject;
ie->value.present = F1AP_GNBCUConfigurationUpdateIEs__value_PR_GNB_CU_TNL_Association_To_Remove_List;
for (i=0;
i<1;
i++) {
F1AP_GNB_CU_TNL_Association_To_Remove_ItemIEs_t *gnb_cu_tnl_association_to_remove_item_ies;
gnb_cu_tnl_association_to_remove_item_ies = (F1AP_GNB_CU_TNL_Association_To_Remove_ItemIEs_t *)calloc(1, sizeof(F1AP_GNB_CU_TNL_Association_To_Remove_ItemIEs_t));
gnb_cu_tnl_association_to_remove_item_ies->id = F1AP_ProtocolIE_ID_id_GNB_CU_TNL_Association_To_Remove_Item;
gnb_cu_tnl_association_to_remove_item_ies->criticality = F1AP_Criticality_reject;
gnb_cu_tnl_association_to_remove_item_ies->value.present = F1AP_GNB_CU_TNL_Association_To_Remove_ItemIEs__value_PR_GNB_CU_TNL_Association_To_Remove_Item;
// 4.1 GNB_CU_TNL_Association_To_Remove_Item
F1AP_GNB_CU_TNL_Association_To_Remove_Item_t gnb_cu_tnl_association_to_remove_item;
memset((void *)&gnb_cu_tnl_association_to_remove_item, 0, sizeof(F1AP_GNB_CU_TNL_Association_To_Remove_Item_t));
// 4.1.1 tNLAssociationTransportLayerAddress
F1AP_CP_TransportLayerAddress_t transportLayerAddress;
memset((void *)&transportLayerAddress, 0, sizeof(F1AP_CP_TransportLayerAddress_t));
transportLayerAddress.present = F1AP_CP_TransportLayerAddress_PR_endpoint_IP_address;
TRANSPORT_LAYER_ADDRESS_IPv4_TO_BIT_STRING(1234, &transportLayerAddress.choice.endpoint_IP_address);
// memset((void *)&transportLayerAddress, 0, sizeof(F1AP_CP_TransportLayerAddress_t));
// transportLayerAddress.present = F1AP_CP_TransportLayerAddress_PR_endpoint_IP_address_and_port;
// transportLayerAddress.choice.endpoint_IP_address_and_port = (F1AP_Endpoint_IP_address_and_port_t *)calloc(1, sizeof(F1AP_Endpoint_IP_address_and_port_t));
// TRANSPORT_LAYER_ADDRESS_IPv4_TO_BIT_STRING(1234, &transportLayerAddress.choice.endpoint_IP_address_and_port.endpoint_IP_address);
gnb_cu_tnl_association_to_remove_item.tNLAssociationTransportLayerAddress = transportLayerAddress;
gnb_cu_tnl_association_to_remove_item_ies->value.choice.GNB_CU_TNL_Association_To_Remove_Item = gnb_cu_tnl_association_to_remove_item;
ASN_SEQUENCE_ADD(&ie->value.choice.GNB_CU_TNL_Association_To_Remove_List.list,
gnb_cu_tnl_association_to_remove_item_ies);
}
ASN_SEQUENCE_ADD(&out->protocolIEs.list, ie);
*/
/* gnb_cu_tnl_association_to_add_item_ies->value.choice.GNB_CU_TNL_Association_To_Add_Item = gnb_cu_tnl_association_to_add_item;
//c6. GNB_CU_TNL_Association_To_Update_List ASN_SEQUENCE_ADD(&ie->value.choice.GNB_CU_TNL_Association_To_Add_List.list,
ie = (F1AP_GNBCUConfigurationUpdateIEs_t *)calloc(1, sizeof(F1AP_GNBCUConfigurationUpdateIEs_t)); gnb_cu_tnl_association_to_add_item_ies);
ie->id = F1AP_ProtocolIE_ID_id_GNB_CU_TNL_Association_To_Update_List; }
ie->criticality = F1AP_Criticality_reject; ASN_SEQUENCE_ADD(&out->protocolIEs.list, ie);
ie->value.present = F1AP_GNBCUConfigurationUpdateIEs__value_PR_GNB_CU_TNL_Association_To_Update_List;
for (i=0;
i<1;
i++) {
F1AP_GNB_CU_TNL_Association_To_Update_ItemIEs_t *gnb_cu_tnl_association_to_update_item_ies;
gnb_cu_tnl_association_to_update_item_ies = (F1AP_GNB_CU_TNL_Association_To_Update_ItemIEs_t *)calloc(1, sizeof(F1AP_GNB_CU_TNL_Association_To_Update_ItemIEs_t));
gnb_cu_tnl_association_to_update_item_ies->id = F1AP_ProtocolIE_ID_id_GNB_CU_TNL_Association_To_Update_Item;
gnb_cu_tnl_association_to_update_item_ies->criticality = F1AP_Criticality_reject;
gnb_cu_tnl_association_to_update_item_ies->value.present = F1AP_GNB_CU_TNL_Association_To_Update_ItemIEs__value_PR_GNB_CU_TNL_Association_To_Update_Item;
// 4.1 GNB_CU_TNL_Association_To_Update_Item
F1AP_GNB_CU_TNL_Association_To_Update_Item_t gnb_cu_tnl_association_to_update_item;
memset((void *)&gnb_cu_tnl_association_to_update_item, 0, sizeof(F1AP_GNB_CU_TNL_Association_To_Update_Item_t));
// 4.1.1 tNLAssociationTransportLayerAddress
F1AP_CP_TransportLayerAddress_t transportLayerAddress;
memset((void *)&transportLayerAddress, 0, sizeof(F1AP_CP_TransportLayerAddress_t));
transportLayerAddress.present = F1AP_CP_TransportLayerAddress_PR_endpoint_IP_address;
TRANSPORT_LAYER_ADDRESS_IPv4_TO_BIT_STRING(1234, &transportLayerAddress.choice.endpoint_IP_address);
// memset((void *)&transportLayerAddress, 0, sizeof(F1AP_CP_TransportLayerAddress_t));
// transportLayerAddress.present = F1AP_CP_TransportLayerAddress_PR_endpoint_IP_address_and_port;
// transportLayerAddress.choice.endpoint_IP_address_and_port = (F1AP_Endpoint_IP_address_and_port_t *)calloc(1, sizeof(F1AP_Endpoint_IP_address_and_port_t));
// TRANSPORT_LAYER_ADDRESS_IPv4_TO_BIT_STRING(1234, &transportLayerAddress.choice.endpoint_IP_address_and_port.endpoint_IP_address);
gnb_cu_tnl_association_to_update_item.tNLAssociationTransportLayerAddress = transportLayerAddress;
// 4.1.2 tNLAssociationUsage
if (1) {
gnb_cu_tnl_association_to_update_item.tNLAssociationUsage = (F1AP_TNLAssociationUsage_t *)calloc(1, sizeof(F1AP_TNLAssociationUsage_t));
*gnb_cu_tnl_association_to_update_item.tNLAssociationUsage = F1AP_TNLAssociationUsage_non_ue;
}
gnb_cu_tnl_association_to_update_item_ies->value.choice.GNB_CU_TNL_Association_To_Update_Item = gnb_cu_tnl_association_to_update_item;
ASN_SEQUENCE_ADD(&ie->value.choice.GNB_CU_TNL_Association_To_Update_List.list,
gnb_cu_tnl_association_to_update_item_ies);
}
ASN_SEQUENCE_ADD(&out->protocolIEs.list, ie);
*/
/* /* mandatory */
// c7. Cells_to_be_Barred_List /* c5. GNB_CU_TNL_Association_To_Remove_List */
ie = (F1AP_GNBCUConfigurationUpdateIEs_t *)calloc(1, sizeof(F1AP_GNBCUConfigurationUpdateIEs_t)); ie = (F1AP_GNBCUConfigurationUpdateIEs_t *)calloc(1, sizeof(F1AP_GNBCUConfigurationUpdateIEs_t));
ie->id = F1AP_ProtocolIE_ID_id_Cells_to_be_Barred_List; ie->id = F1AP_ProtocolIE_ID_id_GNB_CU_TNL_Association_To_Remove_List;
ie->criticality = F1AP_Criticality_reject; ie->criticality = F1AP_Criticality_reject;
ie->value.present = F1AP_GNBCUConfigurationUpdateIEs__value_PR_Cells_to_be_Barred_List; ie->value.present = F1AP_GNBCUConfigurationUpdateIEs__value_PR_GNB_CU_TNL_Association_To_Remove_List;
for (i=0; for (i=0;
i<1; i<1;
i++) { i++) {
F1AP_Cells_to_be_Barred_ItemIEs_t *cells_to_be_barred_item_ies;
cells_to_be_barred_item_ies = (F1AP_Cells_to_be_Barred_ItemIEs_t *)calloc(1, sizeof(F1AP_Cells_to_be_Barred_ItemIEs_t));
cells_to_be_barred_item_ies->id = F1AP_ProtocolIE_ID_id_Cells_to_be_Activated_List_Item;
cells_to_be_barred_item_ies->criticality = F1AP_Criticality_reject;
cells_to_be_barred_item_ies->value.present = F1AP_Cells_to_be_Barred_ItemIEs__value_PR_Cells_to_be_Barred_Item;
// 7.1 cells to be Deactivated list item
F1AP_Cells_to_be_Barred_Item_t cells_to_be_barred_item;
memset((void *)&cells_to_be_barred_item, 0, sizeof(F1AP_Cells_to_be_Barred_Item_t));
// - nRCGI
F1AP_NRCGI_t nRCGI;
memset(&nRCGI,0,sizeof(F1AP_NRCGI_t));
MCC_MNC_TO_PLMNID(mcc, mnc, mnc_digit_length,
&nRCGI.pLMN_Identity);
NR_CELL_ID_TO_BIT_STRING(123456, &nRCGI.nRCellIdentity);
cells_to_be_barred_item.nRCGI = nRCGI;
// 7.2 cellBarred
cells_to_be_barred_item.cellBarred = F1AP_CellBarred_not_barred;
cells_to_be_barred_item_ies->value.choice.Cells_to_be_Barred_Item = cells_to_be_barred_item;
ASN_SEQUENCE_ADD(&ie->value.choice.Cells_to_be_Barred_List.list,
cells_to_be_barred_item_ies);
}
ASN_SEQUENCE_ADD(&out->protocolIEs.list, ie);
*/ F1AP_GNB_CU_TNL_Association_To_Remove_ItemIEs_t *gnb_cu_tnl_association_to_remove_item_ies;
gnb_cu_tnl_association_to_remove_item_ies = (F1AP_GNB_CU_TNL_Association_To_Remove_ItemIEs_t *)calloc(1, sizeof(F1AP_GNB_CU_TNL_Association_To_Remove_ItemIEs_t));
gnb_cu_tnl_association_to_remove_item_ies->id = F1AP_ProtocolIE_ID_id_GNB_CU_TNL_Association_To_Remove_Item;
gnb_cu_tnl_association_to_remove_item_ies->criticality = F1AP_Criticality_reject;
gnb_cu_tnl_association_to_remove_item_ies->value.present = F1AP_GNB_CU_TNL_Association_To_Remove_ItemIEs__value_PR_GNB_CU_TNL_Association_To_Remove_Item;
/* // 4.1 GNB_CU_TNL_Association_To_Remove_Item
// c8. Protected_EUTRA_Resources_List F1AP_GNB_CU_TNL_Association_To_Remove_Item_t gnb_cu_tnl_association_to_remove_item;
ie = (F1AP_GNBCUConfigurationUpdateIEs_t *)calloc(1, sizeof(F1AP_GNBCUConfigurationUpdateIEs_t)); memset((void *)&gnb_cu_tnl_association_to_remove_item, 0, sizeof(F1AP_GNB_CU_TNL_Association_To_Remove_Item_t));
ie->id = F1AP_ProtocolIE_ID_id_Protected_EUTRA_Resources_List;
ie->criticality = F1AP_Criticality_reject;
ie->value.present = F1AP_GNBCUConfigurationUpdateIEs__value_PR_Protected_EUTRA_Resources_List;
for (i=0;
i<1;
i++) {
// 4.1.1 tNLAssociationTransportLayerAddress
F1AP_CP_TransportLayerAddress_t transportLayerAddress;
memset((void *)&transportLayerAddress, 0, sizeof(F1AP_CP_TransportLayerAddress_t));
transportLayerAddress.present = F1AP_CP_TransportLayerAddress_PR_endpoint_IP_address;
TRANSPORT_LAYER_ADDRESS_IPv4_TO_BIT_STRING(1234, &transportLayerAddress.choice.endpoint_IP_address);
F1AP_Protected_EUTRA_Resources_ItemIEs_t *protected_eutra_resources_item_ies; // memset((void *)&transportLayerAddress, 0, sizeof(F1AP_CP_TransportLayerAddress_t));
// transportLayerAddress.present = F1AP_CP_TransportLayerAddress_PR_endpoint_IP_address_and_port;
// transportLayerAddress.choice.endpoint_IP_address_and_port = (F1AP_Endpoint_IP_address_and_port_t *)calloc(1, sizeof(F1AP_Endpoint_IP_address_and_port_t));
// TRANSPORT_LAYER_ADDRESS_IPv4_TO_BIT_STRING(1234, &transportLayerAddress.choice.endpoint_IP_address_and_port.endpoint_IP_address);
// 8.1 SpectrumSharingGroupID gnb_cu_tnl_association_to_remove_item.tNLAssociationTransportLayerAddress = transportLayerAddress;
protected_eutra_resources_item_ies = (F1AP_Protected_EUTRA_Resources_ItemIEs_t *)calloc(1, sizeof(F1AP_Protected_EUTRA_Resources_ItemIEs_t));
protected_eutra_resources_item_ies->id = F1AP_ProtocolIE_ID_id_Protected_EUTRA_Resources_List;
protected_eutra_resources_item_ies->criticality = F1AP_Criticality_reject;
protected_eutra_resources_item_ies->value.present = F1AP_Protected_EUTRA_Resources_ItemIEs__value_PR_Protected_EUTRA_Resources_Item;
((F1AP_Protected_EUTRA_Resources_Item_t*)&protected_eutra_resources_item_ies->value.choice.Protected_EUTRA_Resources_Item)->spectrumSharingGroupID = 123L;
memset(&protected_eutra_resources_item_ies->value.choice.Protected_EUTRA_Resources_Item,0,
sizeof(F1AP_Protected_EUTRA_Resources_Item_t));
ASN_SEQUENCE_ADD(&ie->value.choice.Protected_EUTRA_Resources_List.list, protected_eutra_resources_item_ies);
gnb_cu_tnl_association_to_remove_item_ies->value.choice.GNB_CU_TNL_Association_To_Remove_Item = gnb_cu_tnl_association_to_remove_item;
ASN_SEQUENCE_ADD(&ie->value.choice.GNB_CU_TNL_Association_To_Remove_List.list,
gnb_cu_tnl_association_to_remove_item_ies);
}
ASN_SEQUENCE_ADD(&out->protocolIEs.list, ie);
/* mandatory */
/* c6. GNB_CU_TNL_Association_To_Update_List */
ie = (F1AP_GNBCUConfigurationUpdateIEs_t *)calloc(1, sizeof(F1AP_GNBCUConfigurationUpdateIEs_t));
ie->id = F1AP_ProtocolIE_ID_id_GNB_CU_TNL_Association_To_Update_List;
ie->criticality = F1AP_Criticality_reject;
ie->value.present = F1AP_GNBCUConfigurationUpdateIEs__value_PR_GNB_CU_TNL_Association_To_Update_List;
for (i=0;
i<1;
i++) {
F1AP_GNB_CU_TNL_Association_To_Update_ItemIEs_t *gnb_cu_tnl_association_to_update_item_ies;
gnb_cu_tnl_association_to_update_item_ies = (F1AP_GNB_CU_TNL_Association_To_Update_ItemIEs_t *)calloc(1, sizeof(F1AP_GNB_CU_TNL_Association_To_Update_ItemIEs_t));
gnb_cu_tnl_association_to_update_item_ies->id = F1AP_ProtocolIE_ID_id_GNB_CU_TNL_Association_To_Update_Item;
gnb_cu_tnl_association_to_update_item_ies->criticality = F1AP_Criticality_reject;
gnb_cu_tnl_association_to_update_item_ies->value.present = F1AP_GNB_CU_TNL_Association_To_Update_ItemIEs__value_PR_GNB_CU_TNL_Association_To_Update_Item;
// 4.1 GNB_CU_TNL_Association_To_Update_Item
F1AP_GNB_CU_TNL_Association_To_Update_Item_t gnb_cu_tnl_association_to_update_item;
memset((void *)&gnb_cu_tnl_association_to_update_item, 0, sizeof(F1AP_GNB_CU_TNL_Association_To_Update_Item_t));
// 4.1.1 tNLAssociationTransportLayerAddress
F1AP_CP_TransportLayerAddress_t transportLayerAddress;
memset((void *)&transportLayerAddress, 0, sizeof(F1AP_CP_TransportLayerAddress_t));
transportLayerAddress.present = F1AP_CP_TransportLayerAddress_PR_endpoint_IP_address;
TRANSPORT_LAYER_ADDRESS_IPv4_TO_BIT_STRING(1234, &transportLayerAddress.choice.endpoint_IP_address);
// memset((void *)&transportLayerAddress, 0, sizeof(F1AP_CP_TransportLayerAddress_t));
// transportLayerAddress.present = F1AP_CP_TransportLayerAddress_PR_endpoint_IP_address_and_port;
// transportLayerAddress.choice.endpoint_IP_address_and_port = (F1AP_Endpoint_IP_address_and_port_t *)calloc(1, sizeof(F1AP_Endpoint_IP_address_and_port_t));
// TRANSPORT_LAYER_ADDRESS_IPv4_TO_BIT_STRING(1234, &transportLayerAddress.choice.endpoint_IP_address_and_port.endpoint_IP_address);
gnb_cu_tnl_association_to_update_item.tNLAssociationTransportLayerAddress = transportLayerAddress;
// 4.1.2 tNLAssociationUsage
if (1) {
gnb_cu_tnl_association_to_update_item.tNLAssociationUsage = (F1AP_TNLAssociationUsage_t *)calloc(1, sizeof(F1AP_TNLAssociationUsage_t));
*gnb_cu_tnl_association_to_update_item.tNLAssociationUsage = F1AP_TNLAssociationUsage_non_ue;
}
gnb_cu_tnl_association_to_update_item_ies->value.choice.GNB_CU_TNL_Association_To_Update_Item = gnb_cu_tnl_association_to_update_item;
ASN_SEQUENCE_ADD(&ie->value.choice.GNB_CU_TNL_Association_To_Update_List.list,
gnb_cu_tnl_association_to_update_item_ies);
}
ASN_SEQUENCE_ADD(&out->protocolIEs.list, ie);
/* mandatory */
/* c7. Cells_to_be_Barred_List */
ie = (F1AP_GNBCUConfigurationUpdateIEs_t *)calloc(1, sizeof(F1AP_GNBCUConfigurationUpdateIEs_t));
ie->id = F1AP_ProtocolIE_ID_id_Cells_to_be_Barred_List;
ie->criticality = F1AP_Criticality_reject;
ie->value.present = F1AP_GNBCUConfigurationUpdateIEs__value_PR_Cells_to_be_Barred_List;
for (i=0;
i<1;
i++) {
F1AP_Cells_to_be_Barred_ItemIEs_t *cells_to_be_barred_item_ies;
cells_to_be_barred_item_ies = (F1AP_Cells_to_be_Barred_ItemIEs_t *)calloc(1, sizeof(F1AP_Cells_to_be_Barred_ItemIEs_t));
cells_to_be_barred_item_ies->id = F1AP_ProtocolIE_ID_id_Cells_to_be_Activated_List_Item;
cells_to_be_barred_item_ies->criticality = F1AP_Criticality_reject;
cells_to_be_barred_item_ies->value.present = F1AP_Cells_to_be_Barred_ItemIEs__value_PR_Cells_to_be_Barred_Item;
// 7.1 cells to be Deactivated list item
F1AP_Cells_to_be_Barred_Item_t cells_to_be_barred_item;
memset((void *)&cells_to_be_barred_item, 0, sizeof(F1AP_Cells_to_be_Barred_Item_t));
// - nRCGI
F1AP_NRCGI_t nRCGI;
memset(&nRCGI,0,sizeof(F1AP_NRCGI_t));
MCC_MNC_TO_PLMNID(f1ap_gnb_cu_configuration_update->cells_to_activate[i].mcc,
f1ap_gnb_cu_configuration_update->cells_to_activate[i].mnc,
f1ap_gnb_cu_configuration_update->cells_to_activate[i].mnc_digit_length,
&nRCGI.pLMN_Identity);
NR_CELL_ID_TO_BIT_STRING(f1ap_gnb_cu_configuration_update->cells_to_activate[i].nr_cellid, &nRCGI.nRCellIdentity);
cells_to_be_barred_item.nRCGI = nRCGI;
// 7.2 cellBarred
cells_to_be_barred_item.cellBarred = F1AP_CellBarred_not_barred;
cells_to_be_barred_item_ies->value.choice.Cells_to_be_Barred_Item = cells_to_be_barred_item;
ASN_SEQUENCE_ADD(&ie->value.choice.Cells_to_be_Barred_List.list,
cells_to_be_barred_item_ies);
}
ASN_SEQUENCE_ADD(&out->protocolIEs.list, ie);
/* mandatory */
/* c8. Protected_EUTRA_Resources_List */
ie = (F1AP_GNBCUConfigurationUpdateIEs_t *)calloc(1, sizeof(F1AP_GNBCUConfigurationUpdateIEs_t));
ie->id = F1AP_ProtocolIE_ID_id_Protected_EUTRA_Resources_List;
ie->criticality = F1AP_Criticality_reject;
ie->value.present = F1AP_GNBCUConfigurationUpdateIEs__value_PR_Protected_EUTRA_Resources_List;
for (i=0;
i<1;
i++) {
F1AP_Protected_EUTRA_Resources_ItemIEs_t *protected_eutra_resources_item_ies;
// 8.1 SpectrumSharingGroupID
protected_eutra_resources_item_ies = (F1AP_Protected_EUTRA_Resources_ItemIEs_t *)calloc(1, sizeof(F1AP_Protected_EUTRA_Resources_ItemIEs_t));
protected_eutra_resources_item_ies->id = F1AP_ProtocolIE_ID_id_Protected_EUTRA_Resources_List;
protected_eutra_resources_item_ies->criticality = F1AP_Criticality_reject;
protected_eutra_resources_item_ies->value.present = F1AP_Protected_EUTRA_Resources_ItemIEs__value_PR_Protected_EUTRA_Resources_Item;
((F1AP_Protected_EUTRA_Resources_Item_t*)&protected_eutra_resources_item_ies->value.choice.Protected_EUTRA_Resources_Item)->spectrumSharingGroupID = 123L;
memset(&protected_eutra_resources_item_ies->value.choice.Protected_EUTRA_Resources_Item,0,
sizeof(F1AP_Protected_EUTRA_Resources_Item_t));
ASN_SEQUENCE_ADD(&ie->value.choice.Protected_EUTRA_Resources_List.list, protected_eutra_resources_item_ies);
/*
F1AP_Served_EUTRA_Cells_Information_t served_eutra_cells_information; F1AP_Served_EUTRA_Cells_Information_t served_eutra_cells_information;
memset((void *)&served_eutra_cells_information, 0, sizeof(F1AP_Served_EUTRA_Cells_Information_t)); memset((void *)&served_eutra_cells_information, 0, sizeof(F1AP_Served_EUTRA_Cells_Information_t));
...@@ -923,10 +929,10 @@ int CU_send_gNB_CU_CONFIGURATION_UPDATE(instance_t instance, f1ap_gnb_cu_configu ...@@ -923,10 +929,10 @@ int CU_send_gNB_CU_CONFIGURATION_UPDATE(instance_t instance, f1ap_gnb_cu_configu
ASN_SEQUENCE_ADD(&protected_eutra_resources_item_ies->value.choice.ListofEUTRACellsinGNBDUCoordination.list, &served_eutra_cells_information); ASN_SEQUENCE_ADD(&protected_eutra_resources_item_ies->value.choice.ListofEUTRACellsinGNBDUCoordination.list, &served_eutra_cells_information);
ASN_SEQUENCE_ADD(&ie->value.choice.Protected_EUTRA_Resources_List.list, protected_eutra_resources_item_ies); ASN_SEQUENCE_ADD(&ie->value.choice.Protected_EUTRA_Resources_List.list, protected_eutra_resources_item_ies);
*/
}
ASN_SEQUENCE_ADD(&out->protocolIEs.list, ie);
} }
ASN_SEQUENCE_ADD(&out->protocolIEs.list, ie);
*/
/* encode */ /* encode */
......
...@@ -130,24 +130,27 @@ int CU_handle_INITIAL_UL_RRC_MESSAGE_TRANSFER(instance_t instance, ...@@ -130,24 +130,27 @@ int CU_handle_INITIAL_UL_RRC_MESSAGE_TRANSFER(instance_t instance,
ccch_sdu_len); ccch_sdu_len);
} }
LOG_I(F1AP, "%s() RRCContainer (CCCH) size %ld: ", __func__, if (RC.nrrrc && RC.nrrrc[GNB_INSTANCE_TO_MODULE_ID(instance)]->node_type == ngran_gNB_CU) {
ie->value.choice.RRCContainer.size);
for (int i = 0; i < ie->value.choice.RRCContainer.size; i++)
printf("%02x ", RRC_MAC_CCCH_DATA_IND (message_p).sdu[i]);
printf("\n");
/* DUtoCURRCContainer */
F1AP_FIND_PROTOCOLIE_BY_ID(F1AP_InitialULRRCMessageTransferIEs_t, ie, container,
F1AP_ProtocolIE_ID_id_DUtoCURRCContainer, true);
if (ie) {
NR_RRC_MAC_CCCH_DATA_IND (message_p).du_to_cu_rrc_container = malloc(sizeof(OCTET_STRING_t));
NR_RRC_MAC_CCCH_DATA_IND (message_p).du_to_cu_rrc_container->size = ie->value.choice.DUtoCURRCContainer.size;
NR_RRC_MAC_CCCH_DATA_IND (message_p).du_to_cu_rrc_container->buf = malloc(ie->value.choice.DUtoCURRCContainer.size);
memcpy(NR_RRC_MAC_CCCH_DATA_IND (message_p).du_to_cu_rrc_container->buf,
ie->value.choice.DUtoCURRCContainer.buf,
ie->value.choice.DUtoCURRCContainer.size);
LOG_I(F1AP, "%s() RRCContainer (CCCH) size %ld: ", __func__, ie->value.choice.RRCContainer.size);
for (int i = 0; i < ie->value.choice.RRCContainer.size; i++)
printf("%02x ", RRC_MAC_CCCH_DATA_IND (message_p).sdu[i]);
printf("\n");
/* DUtoCURRCContainer */
F1AP_FIND_PROTOCOLIE_BY_ID(F1AP_InitialULRRCMessageTransferIEs_t, ie, container,
F1AP_ProtocolIE_ID_id_DUtoCURRCContainer, true);
if (ie) {
NR_RRC_MAC_CCCH_DATA_IND (message_p).du_to_cu_rrc_container = malloc(sizeof(OCTET_STRING_t));
NR_RRC_MAC_CCCH_DATA_IND (message_p).du_to_cu_rrc_container->size = ie->value.choice.DUtoCURRCContainer.size;
NR_RRC_MAC_CCCH_DATA_IND (message_p).du_to_cu_rrc_container->buf = malloc(
ie->value.choice.DUtoCURRCContainer.size);
memcpy(NR_RRC_MAC_CCCH_DATA_IND (message_p).du_to_cu_rrc_container->buf,
ie->value.choice.DUtoCURRCContainer.buf,
ie->value.choice.DUtoCURRCContainer.size);
}
} }
// Find instance from nr_cellid // Find instance from nr_cellid
int rrc_inst = -1; int rrc_inst = -1;
if (RC.nrrrc && RC.nrrrc[GNB_INSTANCE_TO_MODULE_ID(instance)]->node_type == ngran_gNB_CU) { if (RC.nrrrc && RC.nrrrc[GNB_INSTANCE_TO_MODULE_ID(instance)]->node_type == ngran_gNB_CU) {
...@@ -292,10 +295,12 @@ int CU_send_DL_RRC_MESSAGE_TRANSFER(instance_t instance, ...@@ -292,10 +295,12 @@ int CU_send_DL_RRC_MESSAGE_TRANSFER(instance_t instance,
OCTET_STRING_fromBuf(&ie->value.choice.RRCContainer, (const char*)f1ap_dl_rrc->rrc_container, f1ap_dl_rrc->rrc_container_length); OCTET_STRING_fromBuf(&ie->value.choice.RRCContainer, (const char*)f1ap_dl_rrc->rrc_container, f1ap_dl_rrc->rrc_container_length);
ASN_SEQUENCE_ADD(&out->protocolIEs.list, ie); ASN_SEQUENCE_ADD(&out->protocolIEs.list, ie);
LOG_I(F1AP, "%s() RRCContainer size %d: ", __func__, f1ap_dl_rrc->rrc_container_length); if (RC.nrrrc && RC.nrrrc[GNB_INSTANCE_TO_MODULE_ID(instance)]->node_type == ngran_gNB_CU) {
for (int i = 0; i < ie->value.choice.RRCContainer.size; i++) LOG_I(F1AP, "%s() RRCContainer size %d: ", __func__, f1ap_dl_rrc->rrc_container_length);
printf("%02x ", f1ap_dl_rrc->rrc_container[i]); for (int i = 0; i < ie->value.choice.RRCContainer.size; i++)
printf("\n"); printf("%02x ", f1ap_dl_rrc->rrc_container[i]);
printf("\n");
}
/* optional */ /* optional */
/* c7. RAT_FrequencyPriorityInformation */ /* c7. RAT_FrequencyPriorityInformation */
......
...@@ -264,7 +264,7 @@ int CU_send_UE_CONTEXT_SETUP_REQUEST(instance_t instance, ...@@ -264,7 +264,7 @@ int CU_send_UE_CONTEXT_SETUP_REQUEST(instance_t instance,
f1ap_ue_context_setup_req->mnc, f1ap_ue_context_setup_req->mnc,
f1ap_ue_context_setup_req->mnc_digit_length, f1ap_ue_context_setup_req->mnc_digit_length,
&nRCGI.pLMN_Identity); &nRCGI.pLMN_Identity);
NR_CELL_ID_TO_BIT_STRING(123456, &nRCGI.nRCellIdentity); NR_CELL_ID_TO_BIT_STRING(12345678, &nRCGI.nRCellIdentity);
scell_toBeSetup_item.sCell_ID = nRCGI; scell_toBeSetup_item.sCell_ID = nRCGI;
/* 10.1.2 sCellIndex */ /* 10.1.2 sCellIndex */
...@@ -742,13 +742,15 @@ int CU_send_UE_CONTEXT_SETUP_REQUEST(instance_t instance, ...@@ -742,13 +742,15 @@ int CU_send_UE_CONTEXT_SETUP_REQUEST(instance_t instance,
/* OPTIONAL */ /* OPTIONAL */
/* RRCContainer */ /* RRCContainer */
ie = (F1AP_UEContextSetupRequestIEs_t *)calloc(1, sizeof(F1AP_UEContextSetupRequestIEs_t)); if(RC.nrrrc) {
ie->id = F1AP_ProtocolIE_ID_id_RRCContainer; ie = (F1AP_UEContextSetupRequestIEs_t *)calloc(1, sizeof(F1AP_UEContextSetupRequestIEs_t));
ie->criticality = F1AP_Criticality_reject; ie->id = F1AP_ProtocolIE_ID_id_RRCContainer;
ie->value.present = F1AP_UEContextSetupRequestIEs__value_PR_RRCContainer; ie->criticality = F1AP_Criticality_reject;
OCTET_STRING_fromBuf(&ie->value.choice.RRCContainer, (const char*)f1ap_ue_context_setup_req->rrc_container, ie->value.present = F1AP_UEContextSetupRequestIEs__value_PR_RRCContainer;
f1ap_ue_context_setup_req->rrc_container_length); OCTET_STRING_fromBuf(&ie->value.choice.RRCContainer, (const char*)f1ap_ue_context_setup_req->rrc_container,
ASN_SEQUENCE_ADD(&out->protocolIEs.list, ie); f1ap_ue_context_setup_req->rrc_container_length);
ASN_SEQUENCE_ADD(&out->protocolIEs.list, ie);
}
/* OPTIONAL */ /* OPTIONAL */
/* MaskedIMEISV */ /* MaskedIMEISV */
...@@ -781,7 +783,9 @@ int CU_send_UE_CONTEXT_SETUP_REQUEST(instance_t instance, ...@@ -781,7 +783,9 @@ int CU_send_UE_CONTEXT_SETUP_REQUEST(instance_t instance,
LOG_D(F1AP,"F1AP UEContextSetupRequest Encoded %u bits\n", len); LOG_D(F1AP,"F1AP UEContextSetupRequest Encoded %u bits\n", len);
cu_f1ap_itti_send_sctp_data_req(instance, f1ap_assoc_id /* BK: fix me*/ , buffer, len, 0 /* BK: fix me*/); if(RC.nrrrc) {
cu_f1ap_itti_send_sctp_data_req(instance, f1ap_assoc_id /* BK: fix me*/ , buffer, len, 0 /* BK: fix me*/);
}
return 0; return 0;
} }
...@@ -1081,8 +1085,8 @@ int CU_send_UE_CONTEXT_MODIFICATION_REQUEST(instance_t instance) { ...@@ -1081,8 +1085,8 @@ int CU_send_UE_CONTEXT_MODIFICATION_REQUEST(instance_t instance) {
// for test // for test
int mcc = 208; int mcc = 208;
int mnc = 93; int mnc = 92;
int mnc_digit_length = 8; int mnc_digit_length = 2;
/* Create */ /* Create */
/* 0. Message Type */ /* 0. Message Type */
...@@ -1123,7 +1127,7 @@ int CU_send_UE_CONTEXT_MODIFICATION_REQUEST(instance_t instance) { ...@@ -1123,7 +1127,7 @@ int CU_send_UE_CONTEXT_MODIFICATION_REQUEST(instance_t instance) {
F1AP_NRCGI_t nRCGI; F1AP_NRCGI_t nRCGI;
MCC_MNC_TO_PLMNID(mcc, mnc, mnc_digit_length, MCC_MNC_TO_PLMNID(mcc, mnc, mnc_digit_length,
&nRCGI.pLMN_Identity); &nRCGI.pLMN_Identity);
NR_CELL_ID_TO_BIT_STRING(123456, &nRCGI.nRCellIdentity); NR_CELL_ID_TO_BIT_STRING(12345678, &nRCGI.nRCellIdentity);
ie->value.choice.NRCGI = nRCGI; ie->value.choice.NRCGI = nRCGI;
ASN_SEQUENCE_ADD(&out->protocolIEs.list, ie); ASN_SEQUENCE_ADD(&out->protocolIEs.list, ie);
...@@ -1248,7 +1252,7 @@ int CU_send_UE_CONTEXT_MODIFICATION_REQUEST(instance_t instance) { ...@@ -1248,7 +1252,7 @@ int CU_send_UE_CONTEXT_MODIFICATION_REQUEST(instance_t instance) {
memset(&nRCGI, 0, sizeof(F1AP_NRCGI_t)); memset(&nRCGI, 0, sizeof(F1AP_NRCGI_t));
MCC_MNC_TO_PLMNID(mcc, mnc, mnc_digit_length, MCC_MNC_TO_PLMNID(mcc, mnc, mnc_digit_length,
&nRCGI.pLMN_Identity); &nRCGI.pLMN_Identity);
NR_CELL_ID_TO_BIT_STRING(123456, &nRCGI.nRCellIdentity); NR_CELL_ID_TO_BIT_STRING(12345678, &nRCGI.nRCellIdentity);
scell_toBeSetupMod_item.sCell_ID = nRCGI; scell_toBeSetupMod_item.sCell_ID = nRCGI;
/* sCellIndex */ /* sCellIndex */
...@@ -1288,7 +1292,7 @@ int CU_send_UE_CONTEXT_MODIFICATION_REQUEST(instance_t instance) { ...@@ -1288,7 +1292,7 @@ int CU_send_UE_CONTEXT_MODIFICATION_REQUEST(instance_t instance) {
memset(&nRCGI, 0, sizeof(F1AP_NRCGI_t)); memset(&nRCGI, 0, sizeof(F1AP_NRCGI_t));
MCC_MNC_TO_PLMNID(mcc, mnc, mnc_digit_length, MCC_MNC_TO_PLMNID(mcc, mnc, mnc_digit_length,
&nRCGI.pLMN_Identity); &nRCGI.pLMN_Identity);
NR_CELL_ID_TO_BIT_STRING(123456, &nRCGI.nRCellIdentity); NR_CELL_ID_TO_BIT_STRING(12345678, &nRCGI.nRCellIdentity);
scell_toBeRemoved_item.sCell_ID = nRCGI; scell_toBeRemoved_item.sCell_ID = nRCGI;
/* ADD */ /* ADD */
......
...@@ -199,14 +199,19 @@ int DU_send_F1_SETUP_REQUEST(instance_t instance) { ...@@ -199,14 +199,19 @@ int DU_send_F1_SETUP_REQUEST(instance_t instance) {
served_cell_information.nRPCI = f1ap_du_data->nr_pci[i]; // int 0..1007 served_cell_information.nRPCI = f1ap_du_data->nr_pci[i]; // int 0..1007
/* - fiveGS_TAC */ /* - fiveGS_TAC */
uint8_t fiveGS_TAC[3]; if (RC.nrrrc) {
served_cell_information.fiveGS_TAC=calloc(1,sizeof(*served_cell_information.fiveGS_TAC)); uint8_t fiveGS_TAC[3];
fiveGS_TAC[0] = ((uint8_t*)&f1ap_du_data->tac[i])[2]; fiveGS_TAC[0] = ((uint8_t*)&f1ap_du_data->tac[i])[2];
fiveGS_TAC[1] = ((uint8_t*)&f1ap_du_data->tac[i])[1]; fiveGS_TAC[1] = ((uint8_t*)&f1ap_du_data->tac[i])[1];
fiveGS_TAC[2] = ((uint8_t*)&f1ap_du_data->tac[i])[0]; fiveGS_TAC[2] = ((uint8_t*)&f1ap_du_data->tac[i])[0];
OCTET_STRING_fromBuf(served_cell_information.fiveGS_TAC, OCTET_STRING_fromBuf(served_cell_information.fiveGS_TAC,
(const char *)fiveGS_TAC, (const char *)fiveGS_TAC,
3); 3);
} else {
OCTET_STRING_fromBuf(served_cell_information.fiveGS_TAC,
(const char*)&f1ap_du_data->tac[i],
3);
}
/* - Configured_EPS_TAC */ /* - Configured_EPS_TAC */
if(0){ if(0){
...@@ -392,6 +397,7 @@ int DU_send_F1_SETUP_REQUEST(instance_t instance) { ...@@ -392,6 +397,7 @@ int DU_send_F1_SETUP_REQUEST(instance_t instance) {
(const char*)f1ap_du_data->mib[i],//f1ap_du_data->mib, (const char*)f1ap_du_data->mib[i],//f1ap_du_data->mib,
f1ap_du_data->mib_length[i]); f1ap_du_data->mib_length[i]);
LOG_I(F1AP,"Filling SIB1_message for cell %d, length %d\n",i,f1ap_du_data->sib1_length[i]);
OCTET_STRING_fromBuf(&gNB_DU_System_Information->sIB1_message, // sept. 2018 OCTET_STRING_fromBuf(&gNB_DU_System_Information->sIB1_message, // sept. 2018
(const char*)f1ap_du_data->sib1[i], (const char*)f1ap_du_data->sib1[i],
f1ap_du_data->sib1_length[i]); f1ap_du_data->sib1_length[i]);
...@@ -409,15 +415,17 @@ int DU_send_F1_SETUP_REQUEST(instance_t instance) { ...@@ -409,15 +415,17 @@ int DU_send_F1_SETUP_REQUEST(instance_t instance) {
/* mandatory */ /* mandatory */
/* c5. RRC VERSION */ /* c5. RRC VERSION */
ie = (F1AP_F1SetupRequestIEs_t *)calloc(1, sizeof(F1AP_F1SetupRequestIEs_t)); if(RC.nrrrc) {
ie->id = F1AP_ProtocolIE_ID_id_GNB_DU_RRC_Version; ie = (F1AP_F1SetupRequestIEs_t *) calloc(1, sizeof(F1AP_F1SetupRequestIEs_t));
ie->criticality = F1AP_Criticality_reject; ie->id = F1AP_ProtocolIE_ID_id_GNB_DU_RRC_Version;
ie->value.present = F1AP_F1SetupRequestIEs__value_PR_RRC_Version; ie->criticality = F1AP_Criticality_reject;
ie->value.choice.RRC_Version.latest_RRC_Version.buf=calloc(1,sizeof(char)); ie->value.present = F1AP_F1SetupRequestIEs__value_PR_RRC_Version;
ie->value.choice.RRC_Version.latest_RRC_Version.buf[0] = 0xe0; ie->value.choice.RRC_Version.latest_RRC_Version.buf = calloc(1, sizeof(char));
ie->value.choice.RRC_Version.latest_RRC_Version.size = 1; ie->value.choice.RRC_Version.latest_RRC_Version.buf[0] = 0xe0;
ie->value.choice.RRC_Version.latest_RRC_Version.bits_unused = 5; ie->value.choice.RRC_Version.latest_RRC_Version.size = 1;
ASN_SEQUENCE_ADD(&out->protocolIEs.list, ie); ie->value.choice.RRC_Version.latest_RRC_Version.bits_unused = 5;
ASN_SEQUENCE_ADD(&out->protocolIEs.list, ie);
}
/* encode */ /* encode */
if (f1ap_encode_pdu(&pdu, &buffer, &len) < 0) { if (f1ap_encode_pdu(&pdu, &buffer, &len) < 0) {
...@@ -553,10 +561,10 @@ int DU_handle_F1_SETUP_RESPONSE(instance_t instance, ...@@ -553,10 +561,10 @@ int DU_handle_F1_SETUP_RESPONSE(instance_t instance,
for (int si = 0;si < gNB_CUSystemInformation->sibtypetobeupdatedlist.list.count;si++) { for (int si = 0;si < gNB_CUSystemInformation->sibtypetobeupdatedlist.list.count;si++) {
F1AP_SibtypetobeupdatedListItem_t *sib_item = gNB_CUSystemInformation->sibtypetobeupdatedlist.list.array[si]; F1AP_SibtypetobeupdatedListItem_t *sib_item = gNB_CUSystemInformation->sibtypetobeupdatedlist.list.array[si];
size_t size = sib_item->sIBmessage.size; size_t size = sib_item->sIBmessage.size;
F1AP_SETUP_RESP (msg_p).cells_to_activate[i].SI_container_length[si] = size; F1AP_SETUP_RESP (msg_p).cells_to_activate[i].SI_container_length[sib_item->sIBtype] = size;
LOG_D(F1AP, "F1AP: SI_container_length[%d][%d] %ld bytes\n", i, (int)sib_item->sIBtype, size); LOG_I(F1AP, "F1AP: SI_container_length[%d][%d] %ld bytes\n", i, (int)sib_item->sIBtype, size);
F1AP_SETUP_RESP (msg_p).cells_to_activate[i].SI_container[si] = malloc(F1AP_SETUP_RESP (msg_p).cells_to_activate[i].SI_container_length[si]); F1AP_SETUP_RESP (msg_p).cells_to_activate[i].SI_container[sib_item->sIBtype] = malloc(size);
memcpy((void*)F1AP_SETUP_RESP (msg_p).cells_to_activate[i].SI_container[si], memcpy((void*)F1AP_SETUP_RESP (msg_p).cells_to_activate[i].SI_container[sib_item->sIBtype],
(void*)sib_item->sIBmessage.buf, (void*)sib_item->sIBmessage.buf,
size); size);
} }
...@@ -589,7 +597,6 @@ int DU_handle_F1_SETUP_RESPONSE(instance_t instance, ...@@ -589,7 +597,6 @@ int DU_handle_F1_SETUP_RESPONSE(instance_t instance,
} // switch ie } // switch ie
} // for IE } // for IE
AssertFatal(TransactionId!=-1,"TransactionId was not sent\n"); AssertFatal(TransactionId!=-1,"TransactionId was not sent\n");
AssertFatal(num_cells_to_activate>0,"No cells activated\n");
F1AP_SETUP_RESP (msg_p).num_cells_to_activate = num_cells_to_activate; F1AP_SETUP_RESP (msg_p).num_cells_to_activate = num_cells_to_activate;
for (int i=0;i<num_cells_to_activate;i++) for (int i=0;i<num_cells_to_activate;i++)
...@@ -725,13 +732,19 @@ int DU_send_gNB_DU_CONFIGURATION_UPDATE(instance_t instance, ...@@ -725,13 +732,19 @@ int DU_send_gNB_DU_CONFIGURATION_UPDATE(instance_t instance,
served_cell_information.nRPCI = f1ap_setup_req->nr_pci[i]; // int 0..1007 served_cell_information.nRPCI = f1ap_setup_req->nr_pci[i]; // int 0..1007
/* - fiveGS_TAC */ /* - fiveGS_TAC */
uint8_t fiveGS_TAC[3]; if (RC.nrrrc) {
fiveGS_TAC[0] = ((uint8_t*)&f1ap_setup_req->tac[i])[2]; uint8_t fiveGS_TAC[3];
fiveGS_TAC[1] = ((uint8_t*)&f1ap_setup_req->tac[i])[1]; fiveGS_TAC[0] = ((uint8_t*)&f1ap_setup_req->tac[i])[2];
fiveGS_TAC[2] = ((uint8_t*)&f1ap_setup_req->tac[i])[0]; fiveGS_TAC[1] = ((uint8_t*)&f1ap_setup_req->tac[i])[1];
OCTET_STRING_fromBuf(served_cell_information.fiveGS_TAC, fiveGS_TAC[2] = ((uint8_t*)&f1ap_setup_req->tac[i])[0];
(const char *)fiveGS_TAC, OCTET_STRING_fromBuf(served_cell_information.fiveGS_TAC,
3); (const char *)fiveGS_TAC,
3);
} else {
OCTET_STRING_fromBuf(served_cell_information.fiveGS_TAC,
(const char *) &f1ap_setup_req->tac[i],
3);
}
/* - Configured_EPS_TAC */ /* - Configured_EPS_TAC */
if(1){ if(1){
...@@ -890,7 +903,6 @@ int DU_send_gNB_DU_CONFIGURATION_UPDATE(instance_t instance, ...@@ -890,7 +903,6 @@ int DU_send_gNB_DU_CONFIGURATION_UPDATE(instance_t instance,
served_cell_information.nRPCI = f1ap_setup_req->nr_pci[i]; // int 0..1007 served_cell_information.nRPCI = f1ap_setup_req->nr_pci[i]; // int 0..1007
/* - fiveGS_TAC */ /* - fiveGS_TAC */
served_cell_information.fiveGS_TAC=calloc(1,sizeof(*served_cell_information.fiveGS_TAC));
OCTET_STRING_fromBuf(served_cell_information.fiveGS_TAC, OCTET_STRING_fromBuf(served_cell_information.fiveGS_TAC,
(const char *) &f1ap_setup_req->tac[i], (const char *) &f1ap_setup_req->tac[i],
3); 3);
...@@ -1168,10 +1180,10 @@ int DU_handle_gNB_CU_CONFIGURATION_UPDATE(instance_t instance, ...@@ -1168,10 +1180,10 @@ int DU_handle_gNB_CU_CONFIGURATION_UPDATE(instance_t instance,
for (int si = 0;si < gNB_CUSystemInformation->sibtypetobeupdatedlist.list.count;si++) { for (int si = 0;si < gNB_CUSystemInformation->sibtypetobeupdatedlist.list.count;si++) {
F1AP_SibtypetobeupdatedListItem_t *sib_item = gNB_CUSystemInformation->sibtypetobeupdatedlist.list.array[si]; F1AP_SibtypetobeupdatedListItem_t *sib_item = gNB_CUSystemInformation->sibtypetobeupdatedlist.list.array[si];
size_t size = sib_item->sIBmessage.size; size_t size = sib_item->sIBmessage.size;
F1AP_GNB_CU_CONFIGURATION_UPDATE (msg_p).cells_to_activate[i].SI_container_length[si] = size; F1AP_GNB_CU_CONFIGURATION_UPDATE (msg_p).cells_to_activate[i].SI_container_length[sib_item->sIBtype] = size;
LOG_D(F1AP, "F1AP: SI_container_length[%d][%d] %ld bytes\n", i, (int)sib_item->sIBtype, size); LOG_I(F1AP, "F1AP: SI_container_length[%d][%d] %ld bytes\n", i, (int)sib_item->sIBtype, size);
F1AP_GNB_CU_CONFIGURATION_UPDATE (msg_p).cells_to_activate[i].SI_container[si] = malloc(F1AP_GNB_CU_CONFIGURATION_UPDATE (msg_p).cells_to_activate[i].SI_container_length[si]); F1AP_GNB_CU_CONFIGURATION_UPDATE (msg_p).cells_to_activate[i].SI_container[sib_item->sIBtype] = malloc(size);
memcpy((void*)F1AP_GNB_CU_CONFIGURATION_UPDATE (msg_p).cells_to_activate[i].SI_container[si], memcpy((void*)F1AP_GNB_CU_CONFIGURATION_UPDATE (msg_p).cells_to_activate[i].SI_container[sib_item->sIBtype],
(void*)sib_item->sIBmessage.buf, (void*)sib_item->sIBmessage.buf,
size); size);
} }
......
...@@ -108,22 +108,52 @@ int DU_handle_UE_CONTEXT_SETUP_REQUEST(instance_t instance, ...@@ -108,22 +108,52 @@ int DU_handle_UE_CONTEXT_SETUP_REQUEST(instance_t instance,
f1ap_ue_context_setup_req->cellULConfigured = NULL; f1ap_ue_context_setup_req->cellULConfigured = NULL;
} }
/* CUtoDURRCInformation */ if (RC.nrrrc) {
/* Candidate_SpCell_List */ /* RRCContainer */
/* optional */
/* DRXCycle */
/* optional */
/* ResourceCoordinationTransferContainer */
/* SCell_ToBeSetup_List */
/* SRBs_ToBeSetup_List */
/* DRBs_ToBeSetup_List */
/* Decode DRBs_ToBeSetup_List */
if(0) {
F1AP_FIND_PROTOCOLIE_BY_ID(F1AP_UEContextSetupRequestIEs_t, ie, container, F1AP_FIND_PROTOCOLIE_BY_ID(F1AP_UEContextSetupRequestIEs_t, ie, container,
F1AP_ProtocolIE_ID_id_DRBs_ToBeSetup_List, true); F1AP_ProtocolIE_ID_id_RRCContainer, false);
if (ie) {
/* correct here */
f1ap_ue_context_setup_req->rrc_container = malloc(ie->value.choice.RRCContainer.size);
memcpy(f1ap_ue_context_setup_req->rrc_container, ie->value.choice.RRCContainer.buf, ie->value.choice.RRCContainer.size);
} else {
LOG_E(F1AP, "can't find RRCContainer in UEContextSetupRequestIEs by id %ld \n", F1AP_ProtocolIE_ID_id_RRCContainer);
}
// AssertFatal(0, "check configuration, send to appropriate handler\n");
protocol_ctxt_t ctxt;
// ctxt.rnti = f1ap_get_rnti_by_du_id(&f1ap_du_inst[instance], ie->value.choice.GNB_DU_UE_F1AP_ID);
ctxt.rnti = 0x1234;
ctxt.module_id = instance;
ctxt.instance = instance;
ctxt.enb_flag = 1;
mem_block_t *pdcp_pdu_p = NULL;
pdcp_pdu_p = get_free_mem_block(ie->value.choice.RRCContainer.size, __func__);
if (pdcp_pdu_p != NULL) {
memset(pdcp_pdu_p->data, 0, ie->value.choice.RRCContainer.size);
memcpy(&pdcp_pdu_p->data[0], ie->value.choice.RRCContainer.buf, ie->value.choice.RRCContainer.size);
/* for rfsim */
du_rlc_data_req(&ctxt, 1, 0x00, 1, 1, 0, ie->value.choice.RRCContainer.size, pdcp_pdu_p);
}
} else {
/* CUtoDURRCInformation */
/* Candidate_SpCell_List */
/* optional */
/* DRXCycle */
/* optional */
/* ResourceCoordinationTransferContainer */
/* SCell_ToBeSetup_List */
/* SRBs_ToBeSetup_List */
/* DRBs_ToBeSetup_List */
/* Decode DRBs_ToBeSetup_List */
F1AP_FIND_PROTOCOLIE_BY_ID(F1AP_UEContextSetupRequestIEs_t, ie, container,
F1AP_ProtocolIE_ID_id_DRBs_ToBeSetup_List, true);
f1ap_ue_context_setup_req->drbs_to_be_setup_length = ie->value.choice.DRBs_ToBeSetup_List.list.count; f1ap_ue_context_setup_req->drbs_to_be_setup_length = ie->value.choice.DRBs_ToBeSetup_List.list.count;
f1ap_ue_context_setup_req->drbs_to_be_setup = calloc(f1ap_ue_context_setup_req->drbs_to_be_setup_length, f1ap_ue_context_setup_req->drbs_to_be_setup = calloc(f1ap_ue_context_setup_req->drbs_to_be_setup_length,
sizeof(f1ap_drb_to_be_setup_t)); sizeof(f1ap_drb_to_be_setup_t));
AssertFatal(f1ap_ue_context_setup_req->drbs_to_be_setup, AssertFatal(f1ap_ue_context_setup_req->drbs_to_be_setup,
"could not allocate memory for f1ap_ue_context_setup_req->drbs_to_be_setup\n"); "could not allocate memory for f1ap_ue_context_setup_req->drbs_to_be_setup\n");
...@@ -153,35 +183,7 @@ int DU_handle_UE_CONTEXT_SETUP_REQUEST(instance_t instance, ...@@ -153,35 +183,7 @@ int DU_handle_UE_CONTEXT_SETUP_REQUEST(instance_t instance,
} }
} }
} }
/* RRCContainer */
F1AP_FIND_PROTOCOLIE_BY_ID(F1AP_UEContextSetupRequestIEs_t, ie, container,
F1AP_ProtocolIE_ID_id_RRCContainer, false);
if (ie) {
/* correct here */
f1ap_ue_context_setup_req->rrc_container = malloc(ie->value.choice.RRCContainer.size);
memcpy(f1ap_ue_context_setup_req->rrc_container, ie->value.choice.RRCContainer.buf, ie->value.choice.RRCContainer.size);
} else {
LOG_E(F1AP, "can't find RRCContainer in UEContextSetupRequestIEs by id %ld \n", F1AP_ProtocolIE_ID_id_RRCContainer);
}
// AssertFatal(0, "check configuration, send to appropriate handler\n");
protocol_ctxt_t ctxt;
// ctxt.rnti = f1ap_get_rnti_by_du_id(&f1ap_du_inst[instance], ie->value.choice.GNB_DU_UE_F1AP_ID);
ctxt.rnti = 0x1234;
ctxt.module_id = instance;
ctxt.instance = instance;
ctxt.enb_flag = 1;
mem_block_t *pdcp_pdu_p = NULL;
pdcp_pdu_p = get_free_mem_block(ie->value.choice.RRCContainer.size, __func__);
if (pdcp_pdu_p != NULL) {
memset(pdcp_pdu_p->data, 0, ie->value.choice.RRCContainer.size);
memcpy(&pdcp_pdu_p->data[0], ie->value.choice.RRCContainer.buf, ie->value.choice.RRCContainer.size);
/* for rfsim */
du_rlc_data_req(&ctxt, 1, 0x00, 1, 1, 0, ie->value.choice.RRCContainer.size, pdcp_pdu_p);
}
return 0; return 0;
} }
......
...@@ -1951,8 +1951,8 @@ int gNB_app_handle_f1ap_setup_resp(f1ap_setup_resp_t *resp) { ...@@ -1951,8 +1951,8 @@ int gNB_app_handle_f1ap_setup_resp(f1ap_setup_resp_t *resp) {
du_extract_and_decode_SI(i, du_extract_and_decode_SI(i,
si_ind, si_ind,
resp->cells_to_activate[j].SI_container[si_ind], resp->cells_to_activate[j].SI_container[2+si_ind],
resp->cells_to_activate[j].SI_container_length[si_ind]); resp->cells_to_activate[j].SI_container_length[2+si_ind]);
} }
// perform MAC/L1 common configuration // perform MAC/L1 common configuration
...@@ -1986,8 +1986,8 @@ int gNB_app_handle_f1ap_gnb_cu_configuration_update(f1ap_gnb_cu_configuration_up ...@@ -1986,8 +1986,8 @@ int gNB_app_handle_f1ap_gnb_cu_configuration_update(f1ap_gnb_cu_configuration_up
du_extract_and_decode_SI(i, du_extract_and_decode_SI(i,
si_ind, si_ind,
gnb_cu_cfg_update->cells_to_activate[j].SI_container[si_ind], gnb_cu_cfg_update->cells_to_activate[j].SI_container[2+si_ind],
gnb_cu_cfg_update->cells_to_activate[j].SI_container_length[si_ind]); gnb_cu_cfg_update->cells_to_activate[j].SI_container_length[2+si_ind]);
} }
// perform MAC/L1 common configuration // perform MAC/L1 common configuration
......
...@@ -8845,9 +8845,9 @@ void handle_f1_setup_req(f1ap_setup_req_t *f1_setup_req) { ...@@ -8845,9 +8845,9 @@ void handle_f1_setup_req(f1ap_setup_req_t *f1_setup_req) {
if (rrc->carrier[0].SIB23) { if (rrc->carrier[0].SIB23) {
F1AP_SETUP_RESP (msg_p).cells_to_activate[cu_cell_ind].SI_container[2+num_SI] = rrc->carrier[0].SIB23; F1AP_SETUP_RESP (msg_p).cells_to_activate[cu_cell_ind].SI_container[2+num_SI] = rrc->carrier[0].SIB23;
F1AP_SETUP_RESP (msg_p).cells_to_activate[cu_cell_ind].SI_container_length[2+num_SI] = rrc->carrier[0].sizeof_SIB23; F1AP_SETUP_RESP (msg_p).cells_to_activate[cu_cell_ind].SI_container_length[2+num_SI] = rrc->carrier[0].sizeof_SIB23;
//printf("SI %d size %d: ", 0, F1AP_SETUP_RESP(msg_p).SI_container_length[j][num_SI]); //printf("SI %d size %d: ", 0, F1AP_SETUP_RESP (msg_p).cells_to_activate[cu_cell_ind].SI_container_length[2+num_SI]);
//for (int n = 0; n < F1AP_SETUP_RESP(msg_p).SI_container_length[j][num_SI]; n++) //for (int n = 0; n < F1AP_SETUP_RESP (msg_p).cells_to_activate[cu_cell_ind].SI_container_length[2+num_SI]; n++)
// printf("%02x ", F1AP_SETUP_RESP(msg_p).SI_container[0][num_SI][n]); // printf("%02x ", F1AP_SETUP_RESP (msg_p).cells_to_activate[cu_cell_ind].SI_container[2+num_SI][n]);
//printf("\n"); //printf("\n");
num_SI++; num_SI++;
} }
......
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