Merge remote-tracking branch 'origin/develop' into develop-NR_SA_F1AP_5GRECORDS
# Conflicts: # cmake_targets/CMakeLists.txt # cmake_targets/build_oai # openair1/PHY/INIT/nr_init_ru.c # openair1/PHY/NR_TRANSPORT/nr_ulsch.c # openair1/PHY/NR_TRANSPORT/nr_ulsch_demodulation.c # openair1/SCHED_NR/phy_procedures_nr_gNB.c # openair1/SIMULATION/NR_PHY/ulsim.c # openair2/COMMON/platform_constants.h # openair2/ENB_APP/enb_config.c # openair2/F1AP/f1ap_cu_interface_management.c # openair2/F1AP/f1ap_cu_rrc_message_transfer.c # openair2/F1AP/f1ap_cu_ue_context_management.c # openair2/F1AP/f1ap_du_interface_management.c # openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c # openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c # openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c # openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_bch.c # openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c # openair2/RRC/LTE/rrc_eNB.c # openair2/RRC/NR/rrc_gNB.c # openair2/RRC/NR_UE/rrc_UE.c
This commit is contained in:
@@ -142,8 +142,7 @@ int CU_handle_F1_SETUP_REQUEST(instance_t instance,
|
||||
/* tac */
|
||||
if (served_cells_item_p->served_Cell_Information.fiveGS_TAC) {
|
||||
OCTET_STRING_TO_INT16(served_cells_item_p->served_Cell_Information.fiveGS_TAC, F1AP_SETUP_REQ(message_p).tac[i]);
|
||||
LOG_D(F1AP, "F1AP_SETUP_REQ(message_p).tac[%d] %d \n",
|
||||
i, F1AP_SETUP_REQ(message_p).tac[i]);
|
||||
LOG_D(F1AP, "F1AP_SETUP_REQ(message_p).tac[%d] %d \n", i, F1AP_SETUP_REQ(message_p).tac[i]);
|
||||
}
|
||||
/* - nRCGI */
|
||||
TBCD_TO_MCC_MNC(&(served_cells_item_p->served_Cell_Information.nRCGI.pLMN_Identity), F1AP_SETUP_REQ(message_p).mcc[i],
|
||||
@@ -322,22 +321,22 @@ int CU_send_F1_SETUP_RESPONSE(instance_t instance,
|
||||
ie->id = F1AP_ProtocolIE_ID_id_Cells_to_be_Activated_List;
|
||||
ie->criticality = F1AP_Criticality_reject;
|
||||
ie->value.present = F1AP_F1SetupResponseIEs__value_PR_Cells_to_be_Activated_List;
|
||||
|
||||
|
||||
|
||||
|
||||
for (i=0;
|
||||
i<num_cells_to_activate;
|
||||
i++) {
|
||||
|
||||
|
||||
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->id = F1AP_ProtocolIE_ID_id_Cells_to_be_Activated_List_Item;
|
||||
cells_to_be_activated_list_item_ies->criticality = F1AP_Criticality_reject;
|
||||
cells_to_be_activated_list_item_ies->value.present = F1AP_Cells_to_be_Activated_List_ItemIEs__value_PR_Cells_to_be_Activated_List_Item;
|
||||
|
||||
|
||||
/* 3.1 cells to be Activated list item */
|
||||
F1AP_Cells_to_be_Activated_List_Item_t cells_to_be_activated_list_item;
|
||||
memset((void *)&cells_to_be_activated_list_item, 0, sizeof(F1AP_Cells_to_be_Activated_List_Item_t));
|
||||
|
||||
|
||||
/* - nRCGI */
|
||||
F1AP_NRCGI_t nRCGI;
|
||||
memset(&nRCGI, 0, sizeof(F1AP_NRCGI_t));
|
||||
@@ -345,14 +344,14 @@ int CU_send_F1_SETUP_RESPONSE(instance_t instance,
|
||||
&nRCGI.pLMN_Identity);
|
||||
NR_CELL_ID_TO_BIT_STRING(f1ap_setup_resp->cells_to_activate[i].nr_cellid, &nRCGI.nRCellIdentity);
|
||||
cells_to_be_activated_list_item.nRCGI = nRCGI;
|
||||
|
||||
|
||||
/* optional */
|
||||
/* - nRPCI */
|
||||
if (1) {
|
||||
cells_to_be_activated_list_item.nRPCI = (F1AP_NRPCI_t *)calloc(1, sizeof(F1AP_NRPCI_t));
|
||||
*cells_to_be_activated_list_item.nRPCI = f1ap_setup_resp->cells_to_activate[i].nrpci; // int 0..1007
|
||||
}
|
||||
|
||||
|
||||
/* optional */
|
||||
/* - gNB-CU System Information */
|
||||
if (1) {
|
||||
@@ -559,44 +558,44 @@ int CU_send_gNB_CU_CONFIGURATION_UPDATE(instance_t instance, f1ap_gnb_cu_configu
|
||||
ASN_SEQUENCE_ADD(&out->protocolIEs.list, ie);
|
||||
|
||||
|
||||
|
||||
|
||||
// mandatory
|
||||
// c2. Cells_to_be_Activated_List
|
||||
// c2. Cells_to_be_Activated_List
|
||||
if (f1ap_gnb_cu_configuration_update->num_cells_to_activate > 0) {
|
||||
ie = (F1AP_GNBCUConfigurationUpdateIEs_t *)calloc(1, sizeof(F1AP_GNBCUConfigurationUpdateIEs_t));
|
||||
ie->id = F1AP_ProtocolIE_ID_id_Cells_to_be_Activated_List;
|
||||
ie->criticality = F1AP_Criticality_reject;
|
||||
ie->value.present = F1AP_GNBCUConfigurationUpdateIEs__value_PR_Cells_to_be_Activated_List;
|
||||
|
||||
|
||||
for (i=0; i<f1ap_gnb_cu_configuration_update->num_cells_to_activate; i++) {
|
||||
|
||||
|
||||
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->id = F1AP_ProtocolIE_ID_id_Cells_to_be_Activated_List_Item;
|
||||
cells_to_be_activated_list_item_ies->criticality = F1AP_Criticality_reject;
|
||||
cells_to_be_activated_list_item_ies->value.present = F1AP_Cells_to_be_Activated_List_ItemIEs__value_PR_Cells_to_be_Activated_List_Item;
|
||||
|
||||
|
||||
// 2.1 cells to be Activated list item
|
||||
F1AP_Cells_to_be_Activated_List_Item_t cells_to_be_activated_list_item;
|
||||
memset((void *)&cells_to_be_activated_list_item, 0, sizeof(F1AP_Cells_to_be_Activated_List_Item_t));
|
||||
|
||||
// - nRCGI
|
||||
|
||||
// - 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,
|
||||
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,
|
||||
NR_CELL_ID_TO_BIT_STRING(f1ap_gnb_cu_configuration_update->cells_to_activate[i].nr_cellid,
|
||||
&nRCGI.nRCellIdentity);
|
||||
cells_to_be_activated_list_item.nRCGI = nRCGI;
|
||||
|
||||
|
||||
// optional
|
||||
// -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
|
||||
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));
|
||||
@@ -610,7 +609,7 @@ int CU_send_gNB_CU_CONFIGURATION_UPDATE(instance_t instance, f1ap_gnb_cu_configu
|
||||
//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");
|
||||
|
||||
|
||||
// for (int sIBtype=2;sIBtype<33;sIBtype++) { //21 ? 33 ?
|
||||
for (int sIBtype=2;sIBtype<21;sIBtype++) {
|
||||
if (f1ap_gnb_cu_configuration_update->cells_to_activate[i].SI_container[sIBtype]!=NULL) {
|
||||
@@ -619,39 +618,39 @@ int CU_send_gNB_CU_CONFIGURATION_UPDATE(instance_t instance, f1ap_gnb_cu_configu
|
||||
memset((void*)sib_item,0,sizeof(*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],
|
||||
(const char*)f1ap_gnb_cu_configuration_update->cells_to_activate[i].SI_container[sIBtype],
|
||||
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]);
|
||||
ASN_SEQUENCE_ADD(&gNB_CUSystemInformation->sibtypetobeupdatedlist.list,sib_item);
|
||||
}
|
||||
}
|
||||
cells_to_be_activated_list_itemExtIEs->extensionValue.choice.GNB_CUSystemInformation = *gNB_CUSystemInformation;
|
||||
|
||||
|
||||
|
||||
|
||||
F1AP_ProtocolExtensionContainer_154P112_t p_154P112_t;
|
||||
memset((void *)&p_154P112_t, 0, sizeof(F1AP_ProtocolExtensionContainer_154P112_t));
|
||||
|
||||
|
||||
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
|
||||
cells_to_be_activated_list_item_ies->value.choice.Cells_to_be_Activated_List_Item = cells_to_be_activated_list_item;
|
||||
ASN_SEQUENCE_ADD(&ie->value.choice.Cells_to_be_Activated_List.list,
|
||||
cells_to_be_activated_list_item_ies);
|
||||
}
|
||||
}
|
||||
ASN_SEQUENCE_ADD(&out->protocolIEs.list, ie);
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
|
||||
// c3. Cells_to_be_Deactivated_List
|
||||
// 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;
|
||||
@@ -668,7 +667,7 @@ int CU_send_gNB_CU_CONFIGURATION_UPDATE(instance_t instance, f1ap_gnb_cu_configu
|
||||
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
|
||||
// 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));
|
||||
|
||||
@@ -690,7 +689,7 @@ int CU_send_gNB_CU_CONFIGURATION_UPDATE(instance_t instance, f1ap_gnb_cu_configu
|
||||
|
||||
/*
|
||||
// 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;
|
||||
@@ -706,7 +705,7 @@ int CU_send_gNB_CU_CONFIGURATION_UPDATE(instance_t instance, f1ap_gnb_cu_configu
|
||||
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 GNB_CU_TNL_Association_To_Add_Item
|
||||
// 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));
|
||||
|
||||
@@ -728,7 +727,7 @@ int CU_send_gNB_CU_CONFIGURATION_UPDATE(instance_t instance, f1ap_gnb_cu_configu
|
||||
gnb_cu_tnl_association_to_add_item.tNLAssociationUsage = F1AP_TNLAssociationUsage_non_ue;
|
||||
|
||||
|
||||
|
||||
|
||||
gnb_cu_tnl_association_to_add_item_ies->value.choice.GNB_CU_TNL_Association_To_Add_Item = gnb_cu_tnl_association_to_add_item;
|
||||
ASN_SEQUENCE_ADD(&ie->value.choice.GNB_CU_TNL_Association_To_Add_List.list,
|
||||
gnb_cu_tnl_association_to_add_item_ies);
|
||||
@@ -737,8 +736,8 @@ int CU_send_gNB_CU_CONFIGURATION_UPDATE(instance_t instance, f1ap_gnb_cu_configu
|
||||
|
||||
*/
|
||||
|
||||
/*
|
||||
|
||||
/*
|
||||
|
||||
// c5. GNB_CU_TNL_Association_To_Remove_List
|
||||
ie = (F1AP_GNBCUConfigurationUpdateIEs_t *)calloc(1, sizeof(F1AP_GNBCUConfigurationUpdateIEs_t));
|
||||
ie->id = F1AP_ProtocolIE_ID_id_GNB_CU_TNL_Association_To_Remove_List;
|
||||
@@ -759,7 +758,7 @@ int CU_send_gNB_CU_CONFIGURATION_UPDATE(instance_t instance, f1ap_gnb_cu_configu
|
||||
memset((void *)&gnb_cu_tnl_association_to_remove_item, 0, sizeof(F1AP_GNB_CU_TNL_Association_To_Remove_Item_t));
|
||||
|
||||
|
||||
// 4.1.1 tNLAssociationTransportLayerAddress
|
||||
// 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;
|
||||
@@ -781,7 +780,7 @@ int CU_send_gNB_CU_CONFIGURATION_UPDATE(instance_t instance, f1ap_gnb_cu_configu
|
||||
ASN_SEQUENCE_ADD(&out->protocolIEs.list, ie);
|
||||
*/
|
||||
|
||||
/*
|
||||
/*
|
||||
//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;
|
||||
@@ -797,7 +796,7 @@ int CU_send_gNB_CU_CONFIGURATION_UPDATE(instance_t instance, f1ap_gnb_cu_configu
|
||||
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
|
||||
// 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));
|
||||
|
||||
@@ -816,7 +815,7 @@ int CU_send_gNB_CU_CONFIGURATION_UPDATE(instance_t instance, f1ap_gnb_cu_configu
|
||||
gnb_cu_tnl_association_to_update_item.tNLAssociationTransportLayerAddress = transportLayerAddress;
|
||||
|
||||
|
||||
// 4.1.2 tNLAssociationUsage
|
||||
// 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;
|
||||
@@ -830,7 +829,7 @@ int CU_send_gNB_CU_CONFIGURATION_UPDATE(instance_t instance, f1ap_gnb_cu_configu
|
||||
ASN_SEQUENCE_ADD(&out->protocolIEs.list, ie);
|
||||
*/
|
||||
|
||||
/*
|
||||
/*
|
||||
// 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;
|
||||
@@ -850,7 +849,7 @@ int CU_send_gNB_CU_CONFIGURATION_UPDATE(instance_t instance, f1ap_gnb_cu_configu
|
||||
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
|
||||
// - nRCGI
|
||||
F1AP_NRCGI_t nRCGI;
|
||||
memset(&nRCGI,0,sizeof(F1AP_NRCGI_t));
|
||||
MCC_MNC_TO_PLMNID(mcc, mnc, mnc_digit_length,
|
||||
|
||||
@@ -155,7 +155,7 @@ int CU_handle_INITIAL_UL_RRC_MESSAGE_TRANSFER(instance_t instance,
|
||||
// first get RRC instance (note, no the ITTI instance)
|
||||
gNB_RRC_INST *rrc = RC.nrrrc[i];
|
||||
if (rrc->nr_cellid == nr_cellid) {
|
||||
rrc_inst = i;
|
||||
rrc_inst = i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -164,7 +164,7 @@ int CU_handle_INITIAL_UL_RRC_MESSAGE_TRANSFER(instance_t instance,
|
||||
// first get RRC instance (note, no the ITTI instance)
|
||||
eNB_RRC_INST *rrc = RC.rrc[i];
|
||||
if (rrc->nr_cellid == nr_cellid) {
|
||||
rrc_inst = i;
|
||||
rrc_inst = i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -180,20 +180,20 @@ int CU_handle_INITIAL_UL_RRC_MESSAGE_TRANSFER(instance_t instance,
|
||||
f1ap_cu_inst[rrc_inst].f1ap_ue[f1ap_uid].du_ue_f1ap_id = du_ue_f1ap_id;
|
||||
|
||||
if (RC.nrrrc[GNB_INSTANCE_TO_MODULE_ID(instance)]->node_type == ngran_gNB_CU) {
|
||||
NR_RRC_MAC_CCCH_DATA_IND (message_p).frame = 0;
|
||||
NR_RRC_MAC_CCCH_DATA_IND (message_p).frame = 0;
|
||||
NR_RRC_MAC_CCCH_DATA_IND (message_p).sub_frame = 0;
|
||||
NR_RRC_MAC_CCCH_DATA_IND (message_p).sdu_size = ccch_sdu_len;
|
||||
NR_RRC_MAC_CCCH_DATA_IND (message_p).gnb_index = rrc_inst; // CU instance
|
||||
NR_RRC_MAC_CCCH_DATA_IND (message_p).gnb_index = rrc_inst; // CU instance
|
||||
NR_RRC_MAC_CCCH_DATA_IND (message_p).rnti = rnti;
|
||||
NR_RRC_MAC_CCCH_DATA_IND (message_p).CC_id = CC_id;
|
||||
NR_RRC_MAC_CCCH_DATA_IND (message_p).CC_id = CC_id;
|
||||
itti_send_msg_to_task (TASK_RRC_GNB, instance, message_p);
|
||||
} else {
|
||||
RRC_MAC_CCCH_DATA_IND (message_p).frame = 0;
|
||||
RRC_MAC_CCCH_DATA_IND (message_p).frame = 0;
|
||||
RRC_MAC_CCCH_DATA_IND (message_p).sub_frame = 0;
|
||||
RRC_MAC_CCCH_DATA_IND (message_p).sdu_size = ccch_sdu_len;
|
||||
RRC_MAC_CCCH_DATA_IND (message_p).enb_index = rrc_inst; // CU instance
|
||||
RRC_MAC_CCCH_DATA_IND (message_p).enb_index = rrc_inst; // CU instance
|
||||
RRC_MAC_CCCH_DATA_IND (message_p).rnti = rnti;
|
||||
RRC_MAC_CCCH_DATA_IND (message_p).CC_id = CC_id;
|
||||
RRC_MAC_CCCH_DATA_IND (message_p).CC_id = CC_id;
|
||||
itti_send_msg_to_task (TASK_RRC_ENB, instance, message_p);
|
||||
}
|
||||
|
||||
@@ -211,7 +211,7 @@ int CU_send_DL_RRC_MESSAGE_TRANSFER(instance_t instance,
|
||||
{
|
||||
|
||||
LOG_D(F1AP, "CU send DL_RRC_MESSAGE_TRANSFER \n");
|
||||
F1AP_F1AP_PDU_t pdu;
|
||||
F1AP_F1AP_PDU_t pdu;
|
||||
F1AP_DLRRCMessageTransfer_t *out;
|
||||
F1AP_DLRRCMessageTransferIEs_t *ie;
|
||||
|
||||
@@ -300,25 +300,23 @@ int CU_send_DL_RRC_MESSAGE_TRANSFER(instance_t instance,
|
||||
/* optional */
|
||||
/* c7. RAT_FrequencyPriorityInformation */
|
||||
/* TODO */
|
||||
if (0) {
|
||||
int endc=1;
|
||||
ie = (F1AP_DLRRCMessageTransferIEs_t *)calloc(1, sizeof(F1AP_DLRRCMessageTransferIEs_t));
|
||||
ie->id = F1AP_ProtocolIE_ID_id_RAT_FrequencyPriorityInformation;
|
||||
ie->criticality = F1AP_Criticality_reject;
|
||||
ie->value.present = F1AP_DLRRCMessageTransferIEs__value_PR_RAT_FrequencyPriorityInformation;
|
||||
if (endc==1) {
|
||||
ie->value.choice.RAT_FrequencyPriorityInformation.present = F1AP_RAT_FrequencyPriorityInformation_PR_eNDC;
|
||||
ie->value.choice.RAT_FrequencyPriorityInformation.choice.eNDC = 123L;
|
||||
}
|
||||
else {
|
||||
ie->value.choice.RAT_FrequencyPriorityInformation.present = F1AP_RAT_FrequencyPriorityInformation_PR_nGRAN;
|
||||
ie->value.choice.RAT_FrequencyPriorityInformation.choice.nGRAN = 11L;
|
||||
}
|
||||
//ie->value.choice.RAT_FrequencyPriorityInformation.present = F1AP_RAT_FrequencyPriorityInformation_PR_rAT_FrequencySelectionPriority;
|
||||
//ie->value.choice.RAT_FrequencyPriorityInformation.choice.rAT_FrequencySelectionPriority = 123L;
|
||||
ASN_SEQUENCE_ADD(&out->protocolIEs.list, ie);
|
||||
int endc=1;
|
||||
ie = (F1AP_DLRRCMessageTransferIEs_t *)calloc(1, sizeof(F1AP_DLRRCMessageTransferIEs_t));
|
||||
ie->id = F1AP_ProtocolIE_ID_id_RAT_FrequencyPriorityInformation;
|
||||
ie->criticality = F1AP_Criticality_reject;
|
||||
ie->value.present = F1AP_DLRRCMessageTransferIEs__value_PR_RAT_FrequencyPriorityInformation;
|
||||
if (endc==1) {
|
||||
ie->value.choice.RAT_FrequencyPriorityInformation.present = F1AP_RAT_FrequencyPriorityInformation_PR_eNDC;
|
||||
ie->value.choice.RAT_FrequencyPriorityInformation.choice.eNDC = 123L;
|
||||
}
|
||||
|
||||
else {
|
||||
ie->value.choice.RAT_FrequencyPriorityInformation.present = F1AP_RAT_FrequencyPriorityInformation_PR_nGRAN;
|
||||
ie->value.choice.RAT_FrequencyPriorityInformation.choice.nGRAN = 11L;
|
||||
}
|
||||
//ie->value.choice.RAT_FrequencyPriorityInformation.present = F1AP_RAT_FrequencyPriorityInformation_PR_rAT_FrequencySelectionPriority;
|
||||
//ie->value.choice.RAT_FrequencyPriorityInformation.choice.rAT_FrequencySelectionPriority = 123L;
|
||||
ASN_SEQUENCE_ADD(&out->protocolIEs.list, ie);
|
||||
|
||||
/* encode */
|
||||
if (f1ap_encode_pdu(&pdu, &buffer, &len) < 0) {
|
||||
LOG_E(F1AP, "Failed to encode F1 DL RRC MESSAGE TRANSFER \n");
|
||||
|
||||
@@ -440,6 +440,7 @@ if (0) {
|
||||
DRB_Information->dRB_QoS.qoS_Characteristics.choice.dynamic_5QI->packetErrorRate.pER_Scalar = 1L;
|
||||
DRB_Information->dRB_QoS.qoS_Characteristics.choice.dynamic_5QI->packetErrorRate.pER_Exponent = 6L;
|
||||
|
||||
|
||||
/* OPTIONAL */
|
||||
/* delayCritical */
|
||||
if (0) {
|
||||
@@ -475,7 +476,7 @@ if (0) {
|
||||
/* OPTIONAL */
|
||||
/* gBR_QoS_Flow_Information */
|
||||
if (0) {
|
||||
DRB_Information->dRB_QoS.gBR_QoS_Flow_Information = (F1AP_GBR_QoSFlowInformation_t *)calloc(1, sizeof(F1AP_GBR_QoSFlowInformation_t));
|
||||
DRB_Information->dRB_QoS.gBR_QoS_Flow_Information = (F1AP_GBR_QoSFlowInformation_t *)calloc(1, sizeof(F1AP_GBR_QoSFlowInformation_t));
|
||||
asn_long2INTEGER(&DRB_Information->dRB_QoS.gBR_QoS_Flow_Information->maxFlowBitRateDownlink, 1L);
|
||||
asn_long2INTEGER(&DRB_Information->dRB_QoS.gBR_QoS_Flow_Information->maxFlowBitRateUplink, 1L);
|
||||
asn_long2INTEGER(&DRB_Information->dRB_QoS.gBR_QoS_Flow_Information->guaranteedFlowBitRateDownlink, 1L);
|
||||
@@ -484,14 +485,14 @@ if (0) {
|
||||
/* OPTIONAL */
|
||||
/* maxPacketLossRateDownlink */
|
||||
if (0) {
|
||||
DRB_Information->dRB_QoS.gBR_QoS_Flow_Information->maxPacketLossRateDownlink = (F1AP_MaxPacketLossRate_t *)calloc(1, sizeof(F1AP_MaxPacketLossRate_t));
|
||||
DRB_Information->dRB_QoS.gBR_QoS_Flow_Information->maxPacketLossRateDownlink = (F1AP_MaxPacketLossRate_t *)calloc(1, sizeof(F1AP_MaxPacketLossRate_t));
|
||||
*DRB_Information->dRB_QoS.gBR_QoS_Flow_Information->maxPacketLossRateDownlink = 1L;
|
||||
}
|
||||
|
||||
/* OPTIONAL */
|
||||
/* maxPacketLossRateUplink */
|
||||
if (0) {
|
||||
DRB_Information->dRB_QoS.gBR_QoS_Flow_Information->maxPacketLossRateUplink = (F1AP_MaxPacketLossRate_t *)calloc(1, sizeof(F1AP_MaxPacketLossRate_t));
|
||||
DRB_Information->dRB_QoS.gBR_QoS_Flow_Information->maxPacketLossRateUplink = (F1AP_MaxPacketLossRate_t *)calloc(1, sizeof(F1AP_MaxPacketLossRate_t));
|
||||
*DRB_Information->dRB_QoS.gBR_QoS_Flow_Information->maxPacketLossRateUplink = 1L;
|
||||
}
|
||||
|
||||
@@ -500,7 +501,7 @@ if (0) {
|
||||
/* OPTIONAL */
|
||||
/* reflective_QoS_Attribute */
|
||||
if (0) {
|
||||
DRB_Information->dRB_QoS.reflective_QoS_Attribute = (long *)calloc(1, sizeof(long));
|
||||
DRB_Information->dRB_QoS.reflective_QoS_Attribute = (long *)calloc(1, sizeof(long));
|
||||
*DRB_Information->dRB_QoS.reflective_QoS_Attribute = 1L;
|
||||
}
|
||||
|
||||
@@ -728,7 +729,7 @@ if (0) {
|
||||
ie->criticality = F1AP_Criticality_reject;
|
||||
ie->value.present = F1AP_UEContextSetupRequestIEs__value_PR_RAT_FrequencyPriorityInformation;
|
||||
|
||||
int endc = 1; // RK: Get this from somewhere ...
|
||||
int endc = 1; // RK: Get this from somewhere ...
|
||||
if (endc) {
|
||||
ie->value.choice.RAT_FrequencyPriorityInformation.present = F1AP_RAT_FrequencyPriorityInformation_PR_eNDC;
|
||||
ie->value.choice.RAT_FrequencyPriorityInformation.choice.eNDC = 11L;
|
||||
|
||||
@@ -240,7 +240,7 @@ int DU_send_F1_SETUP_REQUEST(instance_t instance) {
|
||||
|
||||
/* FDD.1.3 freqBandListNr */
|
||||
int fdd_ul_num_available_freq_Bands = f1ap_du_data->nr_mode_info[i].fdd.ul_num_frequency_bands;
|
||||
LOG_D(F1AP, "fdd_ul_num_available_freq_Bands = %d \n", fdd_ul_num_available_freq_Bands);
|
||||
LOG_I(F1AP, "fdd_ul_num_available_freq_Bands = %d \n", fdd_ul_num_available_freq_Bands);
|
||||
int fdd_ul_j;
|
||||
for (fdd_ul_j=0;
|
||||
fdd_ul_j<fdd_ul_num_available_freq_Bands;
|
||||
@@ -282,7 +282,7 @@ int DU_send_F1_SETUP_REQUEST(instance_t instance) {
|
||||
|
||||
/* FDD.2.3 freqBandListNr */
|
||||
int fdd_dl_num_available_freq_Bands = f1ap_du_data->nr_mode_info[i].fdd.dl_num_frequency_bands;
|
||||
LOG_D(F1AP, "fdd_dl_num_available_freq_Bands = %d \n", fdd_dl_num_available_freq_Bands);
|
||||
LOG_I(F1AP, "fdd_dl_num_available_freq_Bands = %d \n", fdd_dl_num_available_freq_Bands);
|
||||
int fdd_dl_j;
|
||||
for (fdd_dl_j=0;
|
||||
fdd_dl_j<fdd_dl_num_available_freq_Bands;
|
||||
@@ -336,7 +336,8 @@ int DU_send_F1_SETUP_REQUEST(instance_t instance) {
|
||||
|
||||
/* TDD.1.3 freqBandListNr */
|
||||
int tdd_num_available_freq_Bands = f1ap_du_data->nr_mode_info[i].tdd.num_frequency_bands;
|
||||
LOG_D(F1AP, "tdd_num_available_freq_Bands = %d \n", tdd_num_available_freq_Bands);
|
||||
LOG_I(F1AP, "tdd_num_available_freq_Bands = %d \n", tdd_num_available_freq_Bands);
|
||||
AssertFatal(tdd_num_available_freq_Bands > 0, "should have at least one TDD band available\n");
|
||||
int j;
|
||||
for (j=0;
|
||||
j<tdd_num_available_freq_Bands;
|
||||
@@ -518,10 +519,12 @@ int DU_handle_F1_SETUP_RESPONSE(instance_t instance,
|
||||
cell->nRCGI.nRCellIdentity.buf[2],
|
||||
cell->nRCGI.nRCellIdentity.buf[3],
|
||||
cell->nRCGI.nRCellIdentity.buf[4]);
|
||||
|
||||
BIT_STRING_TO_NR_CELL_IDENTITY(&cell->nRCGI.nRCellIdentity,
|
||||
F1AP_SETUP_RESP (msg_p).cells_to_activate[i].nr_cellid);
|
||||
F1AP_ProtocolExtensionContainer_154P112_t *ext = (F1AP_ProtocolExtensionContainer_154P112_t *)cell->iE_Extensions;
|
||||
if (ext==NULL) continue;
|
||||
F1AP_ProtocolExtensionContainer_154P112_t *ext = (F1AP_ProtocolExtensionContainer_154P112_t *)cell->iE_Extensions;
|
||||
|
||||
if (ext==NULL) continue;
|
||||
|
||||
for (int cnt=0;cnt<ext->list.count;cnt++) {
|
||||
F1AP_Cells_to_be_Activated_List_ItemExtIEs_t *cells_to_be_activated_list_itemExtIEs=(F1AP_Cells_to_be_Activated_List_ItemExtIEs_t *)ext->list.array[cnt];
|
||||
@@ -582,10 +585,9 @@ int DU_handle_F1_SETUP_RESPONSE(instance_t instance,
|
||||
} // switch ie
|
||||
} // for IE
|
||||
AssertFatal(TransactionId!=-1,"TransactionId was not sent\n");
|
||||
LOG_D(F1AP,"F1AP: num_cells_to_activate %d\n",num_cells_to_activate);
|
||||
AssertFatal(num_cells_to_activate>0,"No cells activated\n");
|
||||
F1AP_SETUP_RESP (msg_p).num_cells_to_activate = num_cells_to_activate;
|
||||
// tmp
|
||||
// F1AP_SETUP_RESP (msg_p).num_SI[0] = 1;
|
||||
|
||||
for (int i=0;i<num_cells_to_activate;i++)
|
||||
AssertFatal(F1AP_SETUP_RESP (msg_p).cells_to_activate[i].num_SI > 0, "System Information %d is missing",i);
|
||||
|
||||
@@ -605,7 +607,7 @@ int DU_handle_F1_SETUP_RESPONSE(instance_t instance,
|
||||
} else {
|
||||
LOG_D(F1AP, "Sending F1AP_SETUP_RESP ITTI message to ENB_APP with assoc_id (%d->%d)\n",
|
||||
assoc_id,ENB_MODULE_ID_TO_INSTANCE(assoc_id));
|
||||
itti_send_msg_to_task(TASK_ENB_APP, ENB_MODULE_ID_TO_INSTANCE(assoc_id), msg_p);
|
||||
itti_send_msg_to_task(TASK_ENB_APP, instance, msg_p);
|
||||
}
|
||||
|
||||
return 0;
|
||||
@@ -1138,7 +1140,7 @@ int DU_handle_gNB_CU_CONFIGURATION_UPDATE(instance_t instance,
|
||||
F1AP_ProtocolExtensionContainer_154P112_t *ext = (F1AP_ProtocolExtensionContainer_154P112_t *)cell->iE_Extensions;
|
||||
|
||||
if (ext==NULL) continue;
|
||||
|
||||
|
||||
for (int cnt=0;cnt<ext->list.count;cnt++) {
|
||||
F1AP_Cells_to_be_Activated_List_ItemExtIEs_t *cells_to_be_activated_list_itemExtIEs=(F1AP_Cells_to_be_Activated_List_ItemExtIEs_t *)ext->list.array[cnt];
|
||||
switch (cells_to_be_activated_list_itemExtIEs->id) {
|
||||
@@ -1244,7 +1246,7 @@ int DU_send_gNB_CU_CONFIGURATION_UPDATE_ACKNOWLEDGE(instance_t instance,
|
||||
AssertFatal(GNBCUConfigurationUpdateAcknowledge->noofTNLAssociations_failed == 0,
|
||||
"%d TNLAssociations failed\n",
|
||||
GNBCUConfigurationUpdateAcknowledge->noofTNLAssociations_failed);
|
||||
|
||||
|
||||
AssertFatal(GNBCUConfigurationUpdateAcknowledge->noofDedicatedSIDeliveryNeededUEs == 0,
|
||||
"%d DedicatedSIDeliveryNeededUEs\n",
|
||||
GNBCUConfigurationUpdateAcknowledge->noofDedicatedSIDeliveryNeededUEs);
|
||||
|
||||
@@ -86,9 +86,9 @@ void du_task_handle_sctp_association_resp(instance_t instance, sctp_new_associat
|
||||
DevAssert(sctp_new_association_resp != NULL);
|
||||
|
||||
if (sctp_new_association_resp->sctp_state != SCTP_STATE_ESTABLISHED) {
|
||||
LOG_W(F1AP, "Received unsuccessful result for SCTP association (%u), instance %ld, cnx_id %u\n",
|
||||
LOG_E(F1AP, "Received unsuccessful result for SCTP association (%u), instance %d, cnx_id %u\n",
|
||||
sctp_new_association_resp->sctp_state,
|
||||
instance,
|
||||
(int)instance,
|
||||
sctp_new_association_resp->ulp_cnx_id);
|
||||
|
||||
//f1ap_handle_setup_message(instance, sctp_new_association_resp->sctp_state == SCTP_STATE_SHUTDOWN);
|
||||
|
||||
@@ -84,12 +84,8 @@ int f1ap_encode_pdu(F1AP_F1AP_PDU_t *pdu, uint8_t **buffer, uint32_t *length)
|
||||
LOG_E(F1AP, "----------------- ASN1 ENCODER PRINT END----------------- \n");
|
||||
}
|
||||
|
||||
encoded = aper_encode_to_new_buffer(&asn_DEF_F1AP_F1AP_PDU, 0, pdu, (void **)buffer);
|
||||
|
||||
if (encoded < 0) {
|
||||
LOG_E(F1AP, "Failed to encode F1AP message\n");
|
||||
return -1;
|
||||
}
|
||||
AssertFatal((encoded = aper_encode_to_new_buffer(&asn_DEF_F1AP_F1AP_PDU, 0, pdu, (void **)buffer))>0,
|
||||
"Failed to encode F1AP message\n");
|
||||
|
||||
*length = encoded;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user