Normalized message output
This commit is contained in:
@@ -84,7 +84,7 @@ int CU_handle_F1_SETUP_REQUEST(instance_t instance,
|
||||
uint32_t stream,
|
||||
F1AP_F1AP_PDU_t *pdu)
|
||||
{
|
||||
printf("CU_handle_F1_SETUP_REQUEST\n");
|
||||
LOG_D(CU_F1AP, "CU_handle_F1_SETUP_REQUEST\n");
|
||||
|
||||
MessageDef *message_p;
|
||||
F1AP_F1SetupRequest_t *container;
|
||||
@@ -112,7 +112,7 @@ int CU_handle_F1_SETUP_REQUEST(instance_t instance,
|
||||
F1AP_FIND_PROTOCOLIE_BY_ID(F1AP_F1SetupRequestIEs_t, ie, container,
|
||||
F1AP_ProtocolIE_ID_id_gNB_DU_ID, true);
|
||||
asn_INTEGER2ulong(&ie->value.choice.GNB_DU_ID, &F1AP_SETUP_REQ(message_p).gNB_DU_id);
|
||||
printf("F1AP_SETUP_REQ(message_p).gNB_DU_id %lu \n", F1AP_SETUP_REQ(message_p).gNB_DU_id);
|
||||
LOG_D(CU_F1AP, "F1AP_SETUP_REQ(message_p).gNB_DU_id %lu \n", F1AP_SETUP_REQ(message_p).gNB_DU_id);
|
||||
|
||||
/* gNB_DU_name */
|
||||
F1AP_FIND_PROTOCOLIE_BY_ID(F1AP_F1SetupRequestIEs_t, ie, container,
|
||||
@@ -122,13 +122,13 @@ int CU_handle_F1_SETUP_REQUEST(instance_t instance,
|
||||
ie->value.choice.GNB_DU_Name.size);
|
||||
/* Convert the mme name to a printable string */
|
||||
F1AP_SETUP_REQ(message_p).gNB_DU_name[ie->value.choice.GNB_DU_Name.size] = '\0';
|
||||
printf ("F1AP_SETUP_REQ(message_p).gNB_DU_name %s \n", F1AP_SETUP_REQ(message_p).gNB_DU_name);
|
||||
LOG_D(CU_F1AP, "F1AP_SETUP_REQ(message_p).gNB_DU_name %s \n", F1AP_SETUP_REQ(message_p).gNB_DU_name);
|
||||
|
||||
/* GNB_DU_Served_Cells_List */
|
||||
F1AP_FIND_PROTOCOLIE_BY_ID(F1AP_F1SetupRequestIEs_t, ie, container,
|
||||
F1AP_ProtocolIE_ID_id_gNB_DU_Served_Cells_List, true);
|
||||
F1AP_SETUP_REQ(message_p).num_cells_available = ie->value.choice.GNB_DU_Served_Cells_List.list.count;
|
||||
printf ("F1AP_SETUP_REQ(message_p).num_cells_available %d \n", F1AP_SETUP_REQ(message_p).num_cells_available);
|
||||
LOG_D(CU_F1AP, "F1AP_SETUP_REQ(message_p).num_cells_available %d \n", F1AP_SETUP_REQ(message_p).num_cells_available);
|
||||
|
||||
int num_cells_available = F1AP_SETUP_REQ(message_p).num_cells_available;
|
||||
|
||||
@@ -139,7 +139,7 @@ int CU_handle_F1_SETUP_REQUEST(instance_t instance,
|
||||
|
||||
/* tac */
|
||||
OCTET_STRING_TO_INT16(&(served_celles_item_p->served_Cell_Information.fiveGS_TAC), F1AP_SETUP_REQ(message_p).tac[i]);
|
||||
printf ("F1AP_SETUP_REQ(message_p).tac[%d] %d \n", i, F1AP_SETUP_REQ(message_p).tac[i]);
|
||||
LOG_D(CU_F1AP, "F1AP_SETUP_REQ(message_p).tac[%d] %d \n", i, F1AP_SETUP_REQ(message_p).tac[i]);
|
||||
|
||||
/* - nRCGI */
|
||||
TBCD_TO_MCC_MNC(&(served_celles_item_p->served_Cell_Information.nRCGI.pLMN_Identity), F1AP_SETUP_REQ(message_p).mcc[i],
|
||||
@@ -150,11 +150,11 @@ int CU_handle_F1_SETUP_REQUEST(instance_t instance,
|
||||
// NR cellID
|
||||
BIT_STRING_TO_NR_CELL_IDENTITY(&served_celles_item_p->served_Cell_Information.nRCGI.nRCellIdentity,
|
||||
F1AP_SETUP_REQ(message_p).nr_cellid[i]);
|
||||
printf("[SCTP %d] Received nRCGI: MCC %d, MNC %d, CELL_ID %d\n", assoc_id,
|
||||
LOG_D(CU_F1AP, "[SCTP %d] Received nRCGI: MCC %d, MNC %d, CELL_ID %d\n", assoc_id,
|
||||
F1AP_SETUP_REQ(message_p).mcc[i],
|
||||
F1AP_SETUP_REQ(message_p).mnc[i],
|
||||
F1AP_SETUP_REQ(message_p).nr_cellid[i]);
|
||||
printf("nr_cellId : %x %x %x %x %x\n",
|
||||
LOG_D(CU_F1AP, "nr_cellId : %x %x %x %x %x\n",
|
||||
served_celles_item_p->served_Cell_Information.nRCGI.nRCellIdentity.buf[0],
|
||||
served_celles_item_p->served_Cell_Information.nRCGI.nRCellIdentity.buf[1],
|
||||
served_celles_item_p->served_Cell_Information.nRCGI.nRCellIdentity.buf[2],
|
||||
@@ -162,7 +162,7 @@ int CU_handle_F1_SETUP_REQUEST(instance_t instance,
|
||||
served_celles_item_p->served_Cell_Information.nRCGI.nRCellIdentity.buf[4]);
|
||||
/* - nRPCI */
|
||||
F1AP_SETUP_REQ(message_p).nr_pci[i] = served_celles_item_p->served_Cell_Information.nRPCI;
|
||||
printf ("F1AP_SETUP_REQ(message_p).nr_pci[%d] %d \n", i, F1AP_SETUP_REQ(message_p).nr_pci[i]);
|
||||
LOG_D(CU_F1AP, "F1AP_SETUP_REQ(message_p).nr_pci[%d] %d \n", i, F1AP_SETUP_REQ(message_p).nr_pci[i]);
|
||||
|
||||
// System Information
|
||||
/* mib */
|
||||
@@ -172,7 +172,7 @@ int CU_handle_F1_SETUP_REQUEST(instance_t instance,
|
||||
/* Convert the mme name to a printable string */
|
||||
F1AP_SETUP_REQ(message_p).mib[i][served_celles_item_p->gNB_DU_System_Information->mIB_message.size] = '\0';
|
||||
F1AP_SETUP_REQ(message_p).mib_length[i] = served_celles_item_p->gNB_DU_System_Information->mIB_message.size;
|
||||
printf ("F1AP_SETUP_REQ(message_p).mib[%d] %s , len = %d \n", i, F1AP_SETUP_REQ(message_p).mib[i], F1AP_SETUP_REQ(message_p).mib_length[i]);
|
||||
LOG_D(CU_F1AP, "F1AP_SETUP_REQ(message_p).mib[%d] %s , len = %d \n", i, F1AP_SETUP_REQ(message_p).mib[i], F1AP_SETUP_REQ(message_p).mib_length[i]);
|
||||
|
||||
/* sib1 */
|
||||
F1AP_SETUP_REQ(message_p).sib1[i] = calloc(served_celles_item_p->gNB_DU_System_Information->sIB1_message.size + 1, sizeof(char));
|
||||
@@ -181,7 +181,7 @@ int CU_handle_F1_SETUP_REQUEST(instance_t instance,
|
||||
/* Convert the mme name to a printable string */
|
||||
F1AP_SETUP_REQ(message_p).sib1[i][served_celles_item_p->gNB_DU_System_Information->sIB1_message.size] = '\0';
|
||||
F1AP_SETUP_REQ(message_p).sib1_length[i] = served_celles_item_p->gNB_DU_System_Information->sIB1_message.size;
|
||||
printf ("F1AP_SETUP_REQ(message_p).sib1[%d] %s , len = %d \n", i, F1AP_SETUP_REQ(message_p).sib1[i], F1AP_SETUP_REQ(message_p).sib1_length[i]);
|
||||
LOG_D(CU_F1AP, "F1AP_SETUP_REQ(message_p).sib1[%d] %s , len = %d \n", i, F1AP_SETUP_REQ(message_p).sib1[i], F1AP_SETUP_REQ(message_p).sib1_length[i]);
|
||||
}
|
||||
|
||||
|
||||
@@ -294,7 +294,7 @@ int CU_send_F1_SETUP_RESPONSE(instance_t instance,
|
||||
ie->value.present = F1AP_F1SetupResponseIEs__value_PR_Cells_to_be_Activated_List;
|
||||
|
||||
int num_cells_to_activate = f1ap_setup_resp->num_cells_to_activate;
|
||||
printf("num_cells_to_activate = %d \n", num_cells_to_activate);
|
||||
LOG_D(CU_F1AP, "num_cells_to_activate = %d \n", num_cells_to_activate);
|
||||
for (i=0;
|
||||
i<num_cells_to_activate;
|
||||
i++) {
|
||||
@@ -335,13 +335,13 @@ int CU_send_F1_SETUP_RESPONSE(instance_t instance,
|
||||
|
||||
F1AP_GNB_CUSystemInformation_t *gNB_CUSystemInformation = (F1AP_GNB_CUSystemInformation_t *)calloc(1, sizeof(F1AP_GNB_CUSystemInformation_t));
|
||||
|
||||
printf("SI %d: ");
|
||||
for (int n=0;n<f1ap_setup_resp->SI_container_length[i][0];n++) printf("%2x ",f1ap_setup_resp->SI_container[i][0][n]);
|
||||
printf("\n");
|
||||
LOG_D(CU_F1AP, "SI %d: ");
|
||||
for (int n=0;n<f1ap_setup_resp->SI_container_length[i][0];n++) LOG_D(CU_F1AP, "%2x ",f1ap_setup_resp->SI_container[i][0][n]);
|
||||
LOG_D(CU_F1AP, "\n");
|
||||
OCTET_STRING_fromBuf(&gNB_CUSystemInformation->sImessage,
|
||||
f1ap_setup_resp->SI_container[i][0], f1ap_setup_resp->SI_container_length[i][0]);
|
||||
|
||||
printf("f1ap_setup_resp->SI_container_length = %d \n" , f1ap_setup_resp->SI_container_length[0][0]);
|
||||
LOG_D(CU_F1AP, "f1ap_setup_resp->SI_container_length = %d \n" , f1ap_setup_resp->SI_container_length[0][0]);
|
||||
cells_to_be_activated_list_itemExtIEs->extensionValue.choice.GNB_CUSystemInformation = *gNB_CUSystemInformation;
|
||||
|
||||
|
||||
@@ -362,24 +362,17 @@ int CU_send_F1_SETUP_RESPONSE(instance_t instance,
|
||||
|
||||
/* encode */
|
||||
if (f1ap_encode_pdu(&pdu, &buffer, &len) < 0) {
|
||||
printf("Failed to encode F1 setup request\n");
|
||||
LOG_E(CU_F1AP, "Failed to encode F1 setup request\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
// printf("\n");
|
||||
cu_f1ap_itti_send_sctp_data_req(instance, f1ap_du_data_from_du->assoc_id, buffer, len, 0);
|
||||
/* decode */
|
||||
// if (f1ap_decode_pdu(&pdu, buffer, len) > 0) {
|
||||
// printf("Failed to decode F1 setup request\n");
|
||||
// }
|
||||
//printf("F1 setup response present = %d\n", out->value.present);
|
||||
//f1ap_send_sctp_data_req(instance_p->instance, f1ap_mme_data_p->assoc_id, buffer, len, 0);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int CU_send_F1_SETUP_FAILURE(instance_t instance) {
|
||||
printf("CU_send_F1_SETUP_FAILURE\n");
|
||||
LOG_D(CU_F1AP, "CU_send_F1_SETUP_FAILURE\n");
|
||||
|
||||
module_id_t enb_mod_idP;
|
||||
module_id_t cu_mod_idP;
|
||||
@@ -454,7 +447,7 @@ int CU_send_F1_SETUP_FAILURE(instance_t instance) {
|
||||
|
||||
/* encode */
|
||||
if (f1ap_encode_pdu(&pdu, &buffer, &len) < 0) {
|
||||
printf("Failed to encode F1 setup request\n");
|
||||
LOG_E(CU_F1AP, "Failed to encode F1 setup request\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
@@ -858,7 +851,7 @@ int CU_send_gNB_CU_CONFIGURATION_UPDATE(instance_t instance, module_id_t du_mod_
|
||||
|
||||
/* encode */
|
||||
if (f1ap_encode_pdu(&pdu, &buffer, &len) < 0) {
|
||||
printf("Failed to encode F1 setup request\n");
|
||||
LOG_E(CU_F1AP, "Failed to encode F1 setup request\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
@@ -59,7 +59,7 @@ int CU_handle_INITIAL_UL_RRC_MESSAGE_TRANSFER(instance_t instance,
|
||||
uint32_t stream,
|
||||
F1AP_F1AP_PDU_t *pdu) {
|
||||
|
||||
printf("CU_handle_INITIAL_UL_RRC_MESSAGE_TRANSFER\n");
|
||||
LOG_D(CU_F1AP, "CU_handle_INITIAL_UL_RRC_MESSAGE_TRANSFER\n");
|
||||
// decode the F1 message
|
||||
// get the rrc message from the contauiner
|
||||
// call func rrc_eNB_decode_ccch: <-- needs some update here
|
||||
@@ -90,7 +90,7 @@ int CU_handle_INITIAL_UL_RRC_MESSAGE_TRANSFER(instance_t instance,
|
||||
F1AP_FIND_PROTOCOLIE_BY_ID(F1AP_InitialULRRCMessageTransferIEs_t, ie, container,
|
||||
F1AP_ProtocolIE_ID_id_gNB_DU_UE_F1AP_ID, true);
|
||||
du_ue_f1ap_id = ie->value.choice.GNB_DU_UE_F1AP_ID;
|
||||
printf("du_ue_f1ap_id %lu \n", du_ue_f1ap_id);
|
||||
LOG_D(CU_F1AP, "du_ue_f1ap_id %lu \n", du_ue_f1ap_id);
|
||||
|
||||
/* NRCGI
|
||||
* TODO: process NRCGI
|
||||
@@ -117,9 +117,9 @@ int CU_handle_INITIAL_UL_RRC_MESSAGE_TRANSFER(instance_t instance,
|
||||
ccch_sdu_len = ie->value.choice.RRCContainer.size;
|
||||
memcpy(RRC_MAC_CCCH_DATA_IND (message_p).sdu, ie->value.choice.RRCContainer.buf,
|
||||
ccch_sdu_len);
|
||||
printf ("RRCContainer(CCCH) :");
|
||||
for (int i=0;i<ie->value.choice.RRCContainer.size;i++) printf("%2x ",RRC_MAC_CCCH_DATA_IND (message_p).sdu[i]);
|
||||
|
||||
LOG_D(CU_F1AP, "RRCContainer(CCCH) :");
|
||||
for (int i=0;i<ie->value.choice.RRCContainer.size;i++) LOG_D(CU_F1AP, "%2x ",RRC_MAC_CCCH_DATA_IND (message_p).sdu[i]);
|
||||
LOG_D(CU_F1AP, "\n");
|
||||
// Find instance from nr_cellid
|
||||
int rrc_inst = -1;
|
||||
for (int i=0;i<RC.nb_inst;i++) {
|
||||
@@ -276,22 +276,12 @@ int CU_send_DL_RRC_MESSAGE_TRANSFER(instance_t instance,
|
||||
|
||||
/* encode */
|
||||
if (f1ap_encode_pdu(&pdu, &buffer, &len) < 0) {
|
||||
printf("Failed to encode F1 setup request\n");
|
||||
LOG_E(CU_F1AP, "Failed to encode F1 setup request\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
#ifdef F1AP_TEST
|
||||
printf("\n");
|
||||
/* decode */
|
||||
if (f1ap_decode_pdu(&pdu, buffer, len) > 0) {
|
||||
printf("Failed to decode F1 setup request\n");
|
||||
return -1;
|
||||
}
|
||||
#endif
|
||||
|
||||
cu_f1ap_itti_send_sctp_data_req(instance, f1ap_assoc_id, buffer, len, 0);
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -304,7 +294,7 @@ int CU_handle_UL_RRC_MESSAGE_TRANSFER(instance_t instance,
|
||||
uint32_t stream,
|
||||
F1AP_F1AP_PDU_t *pdu) {
|
||||
|
||||
printf("CU_handle_UL_RRC_MESSAGE_TRANSFER \n");
|
||||
LOG_D(CU_F1AP, "CU_handle_UL_RRC_MESSAGE_TRANSFER \n");
|
||||
|
||||
MessageDef *message_p;
|
||||
F1AP_ULRRCMessageTransfer_t *container;
|
||||
@@ -336,14 +326,14 @@ int CU_handle_UL_RRC_MESSAGE_TRANSFER(instance_t instance,
|
||||
F1AP_FIND_PROTOCOLIE_BY_ID(F1AP_ULRRCMessageTransferIEs_t, ie, container,
|
||||
F1AP_ProtocolIE_ID_id_gNB_CU_UE_F1AP_ID, true);
|
||||
cu_ue_f1ap_id = ie->value.choice.GNB_CU_UE_F1AP_ID;
|
||||
printf("cu_ue_f1ap_id %lu \n", cu_ue_f1ap_id);
|
||||
LOG_D(CU_F1AP, "cu_ue_f1ap_id %lu \n", cu_ue_f1ap_id);
|
||||
|
||||
|
||||
/* GNB_DU_UE_F1AP_ID */
|
||||
F1AP_FIND_PROTOCOLIE_BY_ID(F1AP_ULRRCMessageTransferIEs_t, ie, container,
|
||||
F1AP_ProtocolIE_ID_id_gNB_DU_UE_F1AP_ID, true);
|
||||
du_ue_f1ap_id = ie->value.choice.GNB_DU_UE_F1AP_ID;
|
||||
printf("du_ue_f1ap_id %lu \n", du_ue_f1ap_id);
|
||||
LOG_D(CU_F1AP, "du_ue_f1ap_id %lu \n", du_ue_f1ap_id);
|
||||
|
||||
|
||||
/* mandatory */
|
||||
@@ -351,7 +341,7 @@ int CU_handle_UL_RRC_MESSAGE_TRANSFER(instance_t instance,
|
||||
F1AP_FIND_PROTOCOLIE_BY_ID(F1AP_ULRRCMessageTransferIEs_t, ie, container,
|
||||
F1AP_ProtocolIE_ID_id_SRBID, true);
|
||||
srb_id = ie->value.choice.SRBID;
|
||||
printf("srb_id %lu \n", srb_id);
|
||||
LOG_D(CU_F1AP, "srb_id %lu \n", srb_id);
|
||||
|
||||
|
||||
// issue in here
|
||||
@@ -366,8 +356,9 @@ int CU_handle_UL_RRC_MESSAGE_TRANSFER(instance_t instance,
|
||||
ccch_sdu_len = ie->value.choice.RRCContainer.size;
|
||||
memcpy(RRC_MAC_CCCH_DATA_IND (message_p).sdu, ie->value.choice.RRCContainer.buf,
|
||||
ccch_sdu_len);
|
||||
printf ("RRCContainer(CCCH) :");
|
||||
for (int i=0;i<ie->value.choice.RRCContainer.size;i++) printf("%2x ",RRC_MAC_CCCH_DATA_IND (message_p).sdu[i]);
|
||||
LOG_D(CU_F1AP, "RRCContainer(CCCH) :");
|
||||
for (int i=0;i<ie->value.choice.RRCContainer.size;i++) LOG_D(CU_F1AP, "%2x ",RRC_MAC_CCCH_DATA_IND (message_p).sdu[i]);
|
||||
LOG_D(CU_F1AP, "\n");
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -120,25 +120,25 @@ void *F1AP_CU_task(void *arg) {
|
||||
switch (ITTI_MSG_ID(received_msg)) {
|
||||
|
||||
case SCTP_NEW_ASSOCIATION_IND:
|
||||
LOG_I(CU_F1AP, "SCTP_NEW_ASSOCIATION_IND for instance %d\n",ITTI_MESSAGE_GET_INSTANCE(received_msg));
|
||||
LOG_I(CU_F1AP, "CU Task Received SCTP_NEW_ASSOCIATION_IND for instance %d\n",ITTI_MESSAGE_GET_INSTANCE(received_msg));
|
||||
cu_task_handle_sctp_association_ind(ITTI_MESSAGE_GET_INSTANCE(received_msg),
|
||||
&received_msg->ittiMsg.sctp_new_association_ind);
|
||||
break;
|
||||
|
||||
case SCTP_NEW_ASSOCIATION_RESP:
|
||||
LOG_I(CU_F1AP, "SCTP_NEW_ASSOCIATION_RESP for instance %d\n",ITTI_MESSAGE_GET_INSTANCE(received_msg));
|
||||
LOG_I(CU_F1AP, "CU Task Received SCTP_NEW_ASSOCIATION_RESP for instance %d\n",ITTI_MESSAGE_GET_INSTANCE(received_msg));
|
||||
cu_task_handle_sctp_association_resp(ITTI_MESSAGE_GET_INSTANCE(received_msg),
|
||||
&received_msg->ittiMsg.sctp_new_association_resp);
|
||||
break;
|
||||
|
||||
case SCTP_DATA_IND:
|
||||
LOG_I(CU_F1AP, "SCTP_DATA_IND for Instance %d\n",ITTI_MESSAGE_GET_INSTANCE(received_msg));
|
||||
LOG_I(CU_F1AP, "CU Task Received SCTP_DATA_IND for Instance %d\n",ITTI_MESSAGE_GET_INSTANCE(received_msg));
|
||||
cu_task_handle_sctp_data_ind(ITTI_MESSAGE_GET_INSTANCE(received_msg),
|
||||
&received_msg->ittiMsg.sctp_data_ind);
|
||||
break;
|
||||
|
||||
case F1AP_SETUP_RESP: // from rrc
|
||||
LOG_W(CU_F1AP, "F1AP_SETUP_RESP\n");
|
||||
LOG_I(CU_F1AP, "CU Task Received F1AP_SETUP_RESP\n");
|
||||
// CU_send_f1setup_resp(ITTI_MESSAGE_GET_INSTANCE(received_msg),
|
||||
// &F1AP_SETUP_RESP(received_msg));
|
||||
CU_send_F1_SETUP_RESPONSE(ITTI_MESSAGE_GET_INSTANCE(received_msg),
|
||||
@@ -146,7 +146,7 @@ void *F1AP_CU_task(void *arg) {
|
||||
break;
|
||||
|
||||
case F1AP_DL_RRC_MESSAGE: // from rrc
|
||||
LOG_W(CU_F1AP, "F1AP_DL_RRC_MESSAGE\n");
|
||||
LOG_I(CU_F1AP, "CU Task Received F1AP_DL_RRC_MESSAGE\n");
|
||||
// CU_send_f1setup_resp(ITTI_MESSAGE_GET_INSTANCE(received_msg),
|
||||
// &F1AP_SETUP_RESP(received_msg));
|
||||
CU_send_DL_RRC_MESSAGE_TRANSFER(ITTI_MESSAGE_GET_INSTANCE(received_msg),
|
||||
|
||||
@@ -356,18 +356,10 @@ int CU_send_UE_CONTEXT_SETUP_REQUEST(instance_t instance) {
|
||||
|
||||
/* encode */
|
||||
if (f1ap_encode_pdu(&pdu, &buffer, &len) < 0) {
|
||||
printf("Failed to encode F1 setup request\n");
|
||||
LOG_E(CU_F1AP, "Failed to encode F1 setup request\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
printf("\n");
|
||||
|
||||
/* decode */
|
||||
if (f1ap_decode_pdu(&pdu, buffer, len) > 0) {
|
||||
printf("Failed to decode F1 setup request\n");
|
||||
return -1;
|
||||
}
|
||||
//AssertFatal(1==0,"Not implemented yet\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -869,15 +861,7 @@ int CU_send_UE_CONTEXT_MODIFICATION_REQUEST(instance_t instance) {
|
||||
|
||||
/* encode */
|
||||
if (f1ap_encode_pdu(&pdu, &buffer, &len) < 0) {
|
||||
printf("Failed to encode F1 setup request\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
printf("\n");
|
||||
|
||||
/* decode */
|
||||
if (f1ap_decode_pdu(&pdu, buffer, len) > 0) {
|
||||
printf("Failed to decode F1 setup request\n");
|
||||
LOG_E(CU_F1AP, "Failed to encode F1 setup request\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
@@ -33,33 +33,35 @@
|
||||
#include "f1ap_common.h"
|
||||
#include "f1ap_decoder.h"
|
||||
|
||||
int asn1_decoder_xer_print = 1;
|
||||
|
||||
static int f1ap_decode_initiating_message(F1AP_F1AP_PDU_t *pdu)
|
||||
{
|
||||
MessageDef *message_p;
|
||||
MessagesIds message_id;
|
||||
asn_encode_to_new_buffer_result_t res = { NULL, {0, NULL, NULL} };
|
||||
//MessageDef *message_p;
|
||||
//MessagesIds message_id;
|
||||
//asn_encode_to_new_buffer_result_t res = { NULL, {0, NULL, NULL} };
|
||||
DevAssert(pdu != NULL);
|
||||
|
||||
switch(pdu->choice.initiatingMessage->procedureCode) {
|
||||
|
||||
case F1AP_ProcedureCode_id_F1Setup:
|
||||
res = asn_encode_to_new_buffer(NULL, ATS_CANONICAL_XER, &asn_DEF_F1AP_F1AP_PDU, pdu);
|
||||
printf("f1ap_eNB_decode_initiating_message!\n");
|
||||
//res = asn_encode_to_new_buffer(NULL, ATS_CANONICAL_XER, &asn_DEF_F1AP_F1AP_PDU, pdu);
|
||||
LOG_I(F1AP, "f1ap_eNB_decode_initiating_message!\n");
|
||||
break;
|
||||
|
||||
case F1AP_ProcedureCode_id_InitialULRRCMessageTransfer:
|
||||
res = asn_encode_to_new_buffer(NULL, ATS_CANONICAL_XER, &asn_DEF_F1AP_F1AP_PDU, pdu);
|
||||
printf("f1ap_eNB_decode_initiating_message!\n");
|
||||
//res = asn_encode_to_new_buffer(NULL, ATS_CANONICAL_XER, &asn_DEF_F1AP_F1AP_PDU, pdu);
|
||||
LOG_I(F1AP, "f1ap_eNB_decode_initiating_message!\n");
|
||||
break;
|
||||
|
||||
case F1AP_ProcedureCode_id_DLRRCMessageTransfer:
|
||||
res = asn_encode_to_new_buffer(NULL, ATS_CANONICAL_XER, &asn_DEF_F1AP_F1AP_PDU, pdu);
|
||||
printf("f1ap_eNB_decode_initiating_message!\n");
|
||||
//res = asn_encode_to_new_buffer(NULL, ATS_CANONICAL_XER, &asn_DEF_F1AP_F1AP_PDU, pdu);
|
||||
LOG_I(F1AP, "f1ap_eNB_decode_initiating_message!\n");
|
||||
break;
|
||||
|
||||
case F1AP_ProcedureCode_id_ULRRCMessageTransfer:
|
||||
res = asn_encode_to_new_buffer(NULL, ATS_CANONICAL_XER, &asn_DEF_F1AP_F1AP_PDU, pdu);
|
||||
printf("f1ap_eNB_decode_initiating_message!\n");
|
||||
//res = asn_encode_to_new_buffer(NULL, ATS_CANONICAL_XER, &asn_DEF_F1AP_F1AP_PDU, pdu);
|
||||
LOG_I(F1AP, "f1ap_eNB_decode_initiating_message!\n");
|
||||
break;
|
||||
// case F1AP_ProcedureCode_id_InitialContextSetup:
|
||||
// res = asn_encode_to_new_buffer(NULL, ATS_CANONICAL_XER, &asn_DEF_F1AP_F1AP_PDU, pdu);
|
||||
@@ -75,7 +77,7 @@ static int f1ap_decode_initiating_message(F1AP_F1AP_PDU_t *pdu)
|
||||
default:
|
||||
// F1AP_ERROR("Unknown procedure ID (%d) for initiating message\n",
|
||||
// (int)pdu->choice.initiatingMessage->procedureCode);
|
||||
printf("Unknown procedure ID (%d) for initiating message\n",
|
||||
LOG_E(F1AP, "Unknown procedure ID (%d) for initiating message\n",
|
||||
(int)pdu->choice.initiatingMessage->procedureCode);
|
||||
AssertFatal( 0, "Unknown procedure ID (%d) for initiating message\n",
|
||||
(int)pdu->choice.initiatingMessage->procedureCode);
|
||||
@@ -137,8 +139,12 @@ int f1ap_decode_pdu(F1AP_F1AP_PDU_t *pdu, const uint8_t *const buffer, uint32_t
|
||||
length,
|
||||
0,
|
||||
0);
|
||||
|
||||
xer_fprint(stdout, &asn_DEF_F1AP_F1AP_PDU, pdu);
|
||||
|
||||
if (asn1_decoder_xer_print) {
|
||||
LOG_E(F1AP, "----------------- ASN1 DECODER PRINT START----------------- \n");
|
||||
xer_fprint(stdout, &asn_DEF_F1AP_F1AP_PDU, pdu);
|
||||
LOG_E(F1AP, "----------------- ASN1 DECODER PRINT END ----------------- \n");
|
||||
}
|
||||
//LOG_I(F1AP, "f1ap_decode_pdu.dec_ret.code = %d\n", dec_ret.code);
|
||||
|
||||
if (dec_ret.code != RC_OK) {
|
||||
@@ -157,7 +163,7 @@ int f1ap_decode_pdu(F1AP_F1AP_PDU_t *pdu, const uint8_t *const buffer, uint32_t
|
||||
return f1ap_decode_unsuccessful_outcome(pdu);
|
||||
|
||||
default:
|
||||
LOG_D(F1AP, "Unknown presence (%d) or not implemented\n", (int)pdu->present);
|
||||
LOG_E(F1AP, "Unknown presence (%d) or not implemented\n", (int)pdu->present);
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
@@ -145,7 +145,7 @@ int DU_send_F1_SETUP_REQUEST(instance_t instance) {
|
||||
ie->value.present = F1AP_F1SetupRequestIEs__value_PR_GNB_DU_Served_Cells_List;
|
||||
|
||||
int num_cells_available = f1ap_du_data->num_cells_available;
|
||||
printf("num_cells_available = %d \n", num_cells_available);
|
||||
LOG_D(DU_F1AP, "num_cells_available = %d \n", num_cells_available);
|
||||
for (i=0;
|
||||
i<num_cells_available;
|
||||
i++) {
|
||||
@@ -170,11 +170,11 @@ int DU_send_F1_SETUP_REQUEST(instance_t instance) {
|
||||
/* - nRCGI */
|
||||
F1AP_NRCGI_t nRCGI;
|
||||
MCC_MNC_TO_PLMNID(f1ap_du_data->mcc[i], f1ap_du_data->mnc[i], f1ap_du_data->mnc_digit_length[i], &nRCGI.pLMN_Identity);
|
||||
printf("plmn: (%d,%d)\n",f1ap_du_data->mcc[i],f1ap_du_data->mnc[i]);
|
||||
LOG_D(DU_F1AP, "plmn: (%d,%d)\n",f1ap_du_data->mcc[i],f1ap_du_data->mnc[i]);
|
||||
//MCC_MNC_TO_PLMNID(208, 95, 2, &nRCGI.pLMN_Identity);
|
||||
|
||||
NR_CELL_ID_TO_BIT_STRING(f1ap_du_data->nr_cellid[i], &nRCGI.nRCellIdentity);
|
||||
printf("nRCellIdentity (%llx): %x.%x.%x.%x.%x\n",f1ap_du_data->nr_cellid[i],
|
||||
LOG_D(DU_F1AP, "nRCellIdentity (%llx): %x.%x.%x.%x.%x\n",f1ap_du_data->nr_cellid[i],
|
||||
nRCGI.nRCellIdentity.buf[0],
|
||||
nRCGI.nRCellIdentity.buf[1],
|
||||
nRCGI.nRCellIdentity.buf[2],
|
||||
@@ -202,7 +202,7 @@ int DU_send_F1_SETUP_REQUEST(instance_t instance) {
|
||||
/* - broadcast PLMNs */
|
||||
// RK: add the num_available_broadcast_PLMNs to the message
|
||||
int num_available_broadcast_PLMNs = 1; //f1ap_du_data->num_available_broadcast_PLMNs;
|
||||
printf("num_available_broadcast_PLMNs = %d \n", num_available_broadcast_PLMNs);
|
||||
LOG_D(DU_F1AP, "num_available_broadcast_PLMNs = %d \n", num_available_broadcast_PLMNs);
|
||||
for (j=0;
|
||||
j<num_available_broadcast_PLMNs; // num_available_broadcast_PLMNs
|
||||
j++) {
|
||||
@@ -235,7 +235,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;
|
||||
printf("fdd_ul_num_available_freq_Bands = %d \n", fdd_ul_num_available_freq_Bands);
|
||||
LOG_D(DU_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;
|
||||
@@ -248,7 +248,7 @@ int DU_send_F1_SETUP_REQUEST(instance_t instance) {
|
||||
|
||||
/* FDD.1.3.2 supportedSULBandList*/
|
||||
int num_available_supported_SULBands = f1ap_du_data->nr_mode_info[i].fdd.ul_num_sul_frequency_bands;
|
||||
printf("num_available_supported_SULBands = %d \n", num_available_supported_SULBands);
|
||||
LOG_D(DU_F1AP, "num_available_supported_SULBands = %d \n", num_available_supported_SULBands);
|
||||
int fdd_ul_k;
|
||||
for (fdd_ul_k=0;
|
||||
fdd_ul_k<num_available_supported_SULBands;
|
||||
@@ -277,7 +277,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;
|
||||
printf("fdd_dl_num_available_freq_Bands = %d \n", fdd_dl_num_available_freq_Bands);
|
||||
LOG_D(DU_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;
|
||||
@@ -290,7 +290,7 @@ int DU_send_F1_SETUP_REQUEST(instance_t instance) {
|
||||
|
||||
/* FDD.2.3.2 supportedSULBandList*/
|
||||
int num_available_supported_SULBands = f1ap_du_data->nr_mode_info[i].fdd.dl_num_sul_frequency_bands;
|
||||
printf("num_available_supported_SULBands = %d \n", num_available_supported_SULBands);
|
||||
LOG_D(DU_F1AP, "num_available_supported_SULBands = %d \n", num_available_supported_SULBands);
|
||||
int fdd_dl_k;
|
||||
for (fdd_dl_k=0;
|
||||
fdd_dl_k<num_available_supported_SULBands;
|
||||
@@ -331,7 +331,7 @@ 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;
|
||||
printf("tdd_num_available_freq_Bands = %d \n", tdd_num_available_freq_Bands);
|
||||
LOG_D(DU_F1AP, "tdd_num_available_freq_Bands = %d \n", tdd_num_available_freq_Bands);
|
||||
int j;
|
||||
for (j=0;
|
||||
j<tdd_num_available_freq_Bands;
|
||||
@@ -344,7 +344,7 @@ int DU_send_F1_SETUP_REQUEST(instance_t instance) {
|
||||
|
||||
/* TDD.1.3.2 supportedSULBandList*/
|
||||
int num_available_supported_SULBands = f1ap_du_data->nr_mode_info[i].tdd.num_sul_frequency_bands;
|
||||
printf("num_available_supported_SULBands = %d \n", num_available_supported_SULBands);
|
||||
LOG_D(DU_F1AP, "num_available_supported_SULBands = %d \n", num_available_supported_SULBands);
|
||||
int k;
|
||||
for (k=0;
|
||||
k<num_available_supported_SULBands;
|
||||
@@ -399,7 +399,7 @@ int DU_send_F1_SETUP_REQUEST(instance_t instance) {
|
||||
|
||||
/* encode */
|
||||
if (f1ap_encode_pdu(&pdu, &buffer, &len) < 0) {
|
||||
printf("Failed to encode F1 setup request\n");
|
||||
LOG_E(DU_F1AP, "Failed to encode F1 setup request\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
@@ -414,7 +414,7 @@ int DU_handle_F1_SETUP_RESPONSE(instance_t instance,
|
||||
F1AP_F1AP_PDU_t *pdu)
|
||||
{
|
||||
|
||||
printf("DU_handle_F1_SETUP_RESPONSE\n");
|
||||
LOG_D(DU_F1AP, "DU_handle_F1_SETUP_RESPONSE\n");
|
||||
|
||||
AssertFatal(pdu->present == F1AP_F1AP_PDU_PR_successfulOutcome,
|
||||
"pdu->present != F1AP_F1AP_PDU_PR_successfulOutcome\n");
|
||||
@@ -435,7 +435,7 @@ int DU_handle_F1_SETUP_RESPONSE(instance_t instance,
|
||||
|
||||
MessageDef *msg_p = itti_alloc_new_message (TASK_DU_F1, F1AP_SETUP_RESP);
|
||||
|
||||
printf("F1AP: F1Setup-Resp: protocolIEs.list.count %d\n",
|
||||
LOG_D(DU_F1AP, "F1AP: F1Setup-Resp: protocolIEs.list.count %d\n",
|
||||
in->protocolIEs.list.count);
|
||||
for (int i=0;i < in->protocolIEs.list.count; i++) {
|
||||
ie = in->protocolIEs.list.array[i];
|
||||
@@ -446,7 +446,7 @@ int DU_handle_F1_SETUP_RESPONSE(instance_t instance,
|
||||
AssertFatal(ie->value.present == F1AP_F1SetupResponseIEs__value_PR_TransactionID,
|
||||
"ie->value.present != F1AP_F1SetupResponseIEs__value_PR_TransactionID\n");
|
||||
TransactionId=ie->value.choice.TransactionID;
|
||||
printf("F1AP: F1Setup-Resp: TransactionId %d\n",
|
||||
LOG_D(DU_F1AP, "F1AP: F1Setup-Resp: TransactionId %d\n",
|
||||
TransactionId);
|
||||
break;
|
||||
case F1AP_ProtocolIE_ID_id_gNB_CU_Name:
|
||||
@@ -457,7 +457,7 @@ int DU_handle_F1_SETUP_RESPONSE(instance_t instance,
|
||||
F1AP_SETUP_RESP (msg_p).gNB_CU_name = malloc(ie->value.choice.GNB_CU_Name.size+1);
|
||||
memcpy(F1AP_SETUP_RESP (msg_p).gNB_CU_name,ie->value.choice.GNB_CU_Name.buf,ie->value.choice.GNB_CU_Name.size);
|
||||
F1AP_SETUP_RESP (msg_p).gNB_CU_name[ie->value.choice.GNB_CU_Name.size]='\0';
|
||||
printf("F1AP: F1Setup-Resp: gNB_CU_name %s\n",
|
||||
LOG_D(DU_F1AP, "F1AP: F1Setup-Resp: gNB_CU_name %s\n",
|
||||
F1AP_SETUP_RESP (msg_p).gNB_CU_name);
|
||||
break;
|
||||
case F1AP_ProtocolIE_ID_id_Cells_to_be_Activated_List:
|
||||
@@ -466,7 +466,7 @@ int DU_handle_F1_SETUP_RESPONSE(instance_t instance,
|
||||
AssertFatal(ie->value.present == F1AP_F1SetupResponseIEs__value_PR_Cells_to_be_Activated_List,
|
||||
"ie->value.present != F1AP_F1SetupResponseIEs__value_PR_Cells_to_be_Activated_List\n");
|
||||
num_cells_to_activate = ie->value.choice.Cells_to_be_Activated_List.list.count;
|
||||
printf("F1AP: Activating %d cells\n",num_cells_to_activate);
|
||||
LOG_D(DU_F1AP, "F1AP: Activating %d cells\n",num_cells_to_activate);
|
||||
for (int i=0;i<num_cells_to_activate;i++) {
|
||||
|
||||
F1AP_Cells_to_be_Activated_List_ItemIEs_t *cells_to_be_activated_list_item_ies = ie->value.choice.Cells_to_be_Activated_List.list.array[i];
|
||||
@@ -482,7 +482,7 @@ int DU_handle_F1_SETUP_RESPONSE(instance_t instance,
|
||||
|
||||
TBCD_TO_MCC_MNC(&cell->nRCGI.pLMN_Identity, F1AP_SETUP_RESP (msg_p).mcc[i], F1AP_SETUP_RESP (msg_p).mnc[i], F1AP_SETUP_RESP (msg_p).mnc_digit_length[i]);
|
||||
AssertFatal(cell->nRPCI != NULL, "nRPCI is null\n");
|
||||
printf("nr_cellId : %x %x %x %x %x\n",
|
||||
LOG_D(DU_F1AP, "nr_cellId : %x %x %x %x %x\n",
|
||||
cell->nRCGI.nRCellIdentity.buf[0],
|
||||
cell->nRCGI.nRCellIdentity.buf[1],
|
||||
cell->nRCGI.nRCellIdentity.buf[2],
|
||||
@@ -496,11 +496,11 @@ int DU_handle_F1_SETUP_RESPONSE(instance_t instance,
|
||||
AssertFatal(ext!=NULL,"Extension for SI is null\n");
|
||||
F1AP_SETUP_RESP (msg_p).num_SI[i] = ext->list.count;
|
||||
AssertFatal(ext->list.count==1,"At least one SI message should be there, and only 1 for now!\n");
|
||||
printf("F1AP: F1Setup-Resp Cell %d MCC %d MNC %d NRCellid %x num_si %d\n",i,F1AP_SETUP_RESP (msg_p).mcc[i],F1AP_SETUP_RESP (msg_p).mnc[i],F1AP_SETUP_RESP (msg_p).nr_cellid[i],F1AP_SETUP_RESP (msg_p).num_SI[i]);
|
||||
LOG_D(DU_F1AP, "F1AP: F1Setup-Resp Cell %d MCC %d MNC %d NRCellid %x num_si %d\n",i,F1AP_SETUP_RESP (msg_p).mcc[i],F1AP_SETUP_RESP (msg_p).mnc[i],F1AP_SETUP_RESP (msg_p).nr_cellid[i],F1AP_SETUP_RESP (msg_p).num_SI[i]);
|
||||
for (int si =0;si < ext->list.count;si++) {
|
||||
size_t size = ext->list.array[si]->extensionValue.choice.GNB_CUSystemInformation.sImessage.size;
|
||||
F1AP_SETUP_RESP (msg_p).SI_container_length[i][si] = size;
|
||||
printf("F1AP: F1Setup-Resp SI_container_length[%d][%d] %d bytes\n",i,si,size);
|
||||
LOG_D(DU_F1AP, "F1AP: F1Setup-Resp SI_container_length[%d][%d] %d bytes\n",i,si,size);
|
||||
F1AP_SETUP_RESP (msg_p).SI_container[i][si] = malloc(F1AP_SETUP_RESP (msg_p).SI_container_length[i][si]);
|
||||
|
||||
memcpy((void*)F1AP_SETUP_RESP (msg_p).SI_container[i][si],
|
||||
@@ -519,7 +519,7 @@ int DU_handle_F1_SETUP_RESPONSE(instance_t instance,
|
||||
AssertFatal(F1AP_SETUP_RESP (msg_p).num_SI[i] > 0, "System Information %d is missing",i);
|
||||
|
||||
|
||||
printf("Sending F1AP_SETUP_RESP ITTI message to ENB_APP with assoc_id (%d->%d)\n",
|
||||
LOG_D(DU_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);
|
||||
|
||||
@@ -600,7 +600,7 @@ int DU_send_gNB_DU_CONFIGURATION_UPDATE(instance_t instance,
|
||||
/* - nRCGI */
|
||||
F1AP_NRCGI_t nRCGI;
|
||||
MCC_MNC_TO_PLMNID(f1ap_du_data->mcc[i], f1ap_du_data->mnc[i], f1ap_du_data->mnc_digit_length[i], &nRCGI.pLMN_Identity);
|
||||
printf("nr_cellId : %x %x %x %x %x\n",
|
||||
LOG_D(DU_F1AP, "nr_cellId : %x %x %x %x %x\n",
|
||||
nRCGI.nRCellIdentity.buf[0],
|
||||
nRCGI.nRCellIdentity.buf[1],
|
||||
nRCGI.nRCellIdentity.buf[2],
|
||||
@@ -975,17 +975,7 @@ int DU_send_gNB_DU_CONFIGURATION_UPDATE(instance_t instance,
|
||||
|
||||
|
||||
if (f1ap_encode_pdu(&pdu, &buffer, &len) < 0) {
|
||||
printf("Failed to encode F1 setup request\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
printf("\n");
|
||||
|
||||
//du_f1ap_itti_send_sctp_data_req(instance, f1ap_setup_req->assoc_id, buffer, len, 0);
|
||||
|
||||
/* decode */
|
||||
if (f1ap_decode_pdu(&pdu, buffer, len) > 0) {
|
||||
printf("Failed to decode F1 setup request\n");
|
||||
LOG_E(DU_F1AP, "Failed to encode F1 setup request\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
@@ -49,7 +49,7 @@ int DU_handle_DL_RRC_MESSAGE_TRANSFER(instance_t instance,
|
||||
uint32_t stream,
|
||||
F1AP_F1AP_PDU_t *pdu) {
|
||||
|
||||
printf("DU_handle_DL_RRC_MESSAGE_TRANSFER \n");
|
||||
LOG_D(DU_F1AP, "DU_handle_DL_RRC_MESSAGE_TRANSFER \n");
|
||||
|
||||
MessageDef *message_p;
|
||||
F1AP_DLRRCMessageTransfer_t *container;
|
||||
@@ -81,14 +81,14 @@ int DU_handle_DL_RRC_MESSAGE_TRANSFER(instance_t instance,
|
||||
F1AP_FIND_PROTOCOLIE_BY_ID(F1AP_DLRRCMessageTransferIEs_t, ie, container,
|
||||
F1AP_ProtocolIE_ID_id_gNB_CU_UE_F1AP_ID, true);
|
||||
cu_ue_f1ap_id = ie->value.choice.GNB_CU_UE_F1AP_ID;
|
||||
printf("cu_ue_f1ap_id %lu \n", cu_ue_f1ap_id);
|
||||
LOG_D(DU_F1AP, "cu_ue_f1ap_id %lu \n", cu_ue_f1ap_id);
|
||||
|
||||
|
||||
/* GNB_DU_UE_F1AP_ID */
|
||||
F1AP_FIND_PROTOCOLIE_BY_ID(F1AP_DLRRCMessageTransferIEs_t, ie, container,
|
||||
F1AP_ProtocolIE_ID_id_gNB_DU_UE_F1AP_ID, true);
|
||||
du_ue_f1ap_id = ie->value.choice.GNB_DU_UE_F1AP_ID;
|
||||
printf("du_ue_f1ap_id %lu \n", du_ue_f1ap_id);
|
||||
LOG_D(DU_F1AP, "du_ue_f1ap_id %lu \n", du_ue_f1ap_id);
|
||||
|
||||
|
||||
/* optional */
|
||||
@@ -103,7 +103,7 @@ int DU_handle_DL_RRC_MESSAGE_TRANSFER(instance_t instance,
|
||||
F1AP_FIND_PROTOCOLIE_BY_ID(F1AP_DLRRCMessageTransferIEs_t, ie, container,
|
||||
F1AP_ProtocolIE_ID_id_SRBID, true);
|
||||
srb_id = ie->value.choice.SRBID;
|
||||
printf("srb_id %lu \n", srb_id);
|
||||
LOG_D(DU_F1AP, "srb_id %lu \n", srb_id);
|
||||
|
||||
|
||||
/* optional */
|
||||
@@ -112,7 +112,7 @@ int DU_handle_DL_RRC_MESSAGE_TRANSFER(instance_t instance,
|
||||
F1AP_FIND_PROTOCOLIE_BY_ID(F1AP_DLRRCMessageTransferIEs_t, ie, container,
|
||||
F1AP_ProtocolIE_ID_id_ExecuteDuplication, true);
|
||||
executeDuplication = ie->value.choice.ExecuteDuplication;
|
||||
printf("ExecuteDuplication %d \n", executeDuplication);
|
||||
LOG_D(DU_F1AP, "ExecuteDuplication %d \n", executeDuplication);
|
||||
}
|
||||
|
||||
// issue in here
|
||||
@@ -127,9 +127,9 @@ int DU_handle_DL_RRC_MESSAGE_TRANSFER(instance_t instance,
|
||||
ccch_sdu_len = ie->value.choice.RRCContainer.size;
|
||||
memcpy(RRC_MAC_CCCH_DATA_IND (message_p).sdu, ie->value.choice.RRCContainer.buf,
|
||||
ccch_sdu_len);
|
||||
printf ("RRCContainer(CCCH) :");
|
||||
for (int i=0;i<ie->value.choice.RRCContainer.size;i++) printf("%2x ",RRC_MAC_CCCH_DATA_IND (message_p).sdu[i]);
|
||||
|
||||
LOG_D(DU_F1AP, "RRCContainer(CCCH) :");
|
||||
for (int i=0;i<ie->value.choice.RRCContainer.size;i++) LOG_D(DU_F1AP, "%2x ",RRC_MAC_CCCH_DATA_IND (message_p).sdu[i]);
|
||||
LOG_D(DU_F1AP, "\n");
|
||||
|
||||
/* optional */
|
||||
/* RAT_FrequencyPriorityInformation */
|
||||
@@ -157,7 +157,7 @@ int DU_send_UL_RRC_MESSAGE_TRANSFER(module_id_t module_idP,
|
||||
uint8_t *sduP,
|
||||
sdu_size_t sdu_lenP) {
|
||||
|
||||
printf("DU_send_UL_RRC_MESSAGE_TRANSFER \n");
|
||||
LOG_D(DU_F1AP, "DU_send_UL_RRC_MESSAGE_TRANSFER \n");
|
||||
|
||||
F1AP_F1AP_PDU_t pdu;
|
||||
F1AP_ULRRCMessageTransfer_t *out;
|
||||
@@ -215,19 +215,10 @@ int DU_send_UL_RRC_MESSAGE_TRANSFER(module_id_t module_idP,
|
||||
|
||||
/* encode */
|
||||
if (f1ap_encode_pdu(&pdu, &buffer, &len) < 0) {
|
||||
printf("Failed to encode F1 setup request\n");
|
||||
LOG_E(DU_F1AP, "Failed to encode F1 setup request\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
printf("\n");
|
||||
|
||||
//du_f1ap_itti_send_sctp_data_req(instance, f1ap_setup_req->assoc_id, buffer, len, 0);
|
||||
/* decode */
|
||||
// if (f1ap_decode_pdu(&pdu, buffer, len) > 0) {
|
||||
// printf("Failed to decode F1 setup request\n");
|
||||
// }
|
||||
//AssertFatal(1==0,"Not implemented yet\n");
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -238,7 +229,7 @@ int DU_send_INITIAL_UL_RRC_MESSAGE_TRANSFER(module_id_t module_idP,
|
||||
rnti_t rntiP,
|
||||
uint8_t *sduP,
|
||||
sdu_size_t sdu_lenP) {
|
||||
|
||||
|
||||
F1AP_F1AP_PDU_t pdu;
|
||||
F1AP_InitialULRRCMessageTransfer_t *out;
|
||||
F1AP_InitialULRRCMessageTransferIEs_t *ie;
|
||||
@@ -313,7 +304,7 @@ int DU_send_INITIAL_UL_RRC_MESSAGE_TRANSFER(module_id_t module_idP,
|
||||
|
||||
/* encode */
|
||||
if (f1ap_encode_pdu(&pdu, &buffer, &len) < 0) {
|
||||
printf("Failed to encode F1 setup request\n");
|
||||
LOG_E(DU_F1AP, "Failed to encode F1 setup request\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
@@ -69,7 +69,7 @@ void du_task_send_sctp_association_req(instance_t instance, f1ap_setup_req_t *f1
|
||||
*f1ap_du_data = *f1ap_setup_req;
|
||||
//printf("sib itti message %s\n", f1ap_setup_req_t->sib1[0]);
|
||||
|
||||
printf("nr_cellid : %llx (%lld)",f1ap_setup_req->nr_cellid[0],f1ap_setup_req->nr_cellid[0]);
|
||||
//printf("nr_cellid : %llx (%lld)",f1ap_setup_req->nr_cellid[0],f1ap_setup_req->nr_cellid[0]);
|
||||
|
||||
//du_f1ap_register_to_sctp
|
||||
itti_send_msg_to_task(TASK_SCTP, instance, message_p);
|
||||
@@ -139,7 +139,7 @@ void *F1AP_DU_task(void *arg) {
|
||||
// 1. save the itti msg so that you can use it to sen f1ap_setup_req, fill the f1ap_setup_req message,
|
||||
// 2. store the message in f1ap context, that is also stored in RC
|
||||
// 2. send a sctp_association req
|
||||
LOG_I(DU_F1AP, "F1AP_SETUP_REQ\n");
|
||||
LOG_I(DU_F1AP, "DU Task Received F1AP_SETUP_REQ\n");
|
||||
du_task_send_sctp_association_req(ITTI_MESSAGE_GET_INSTANCE(received_msg),
|
||||
&F1AP_SETUP_REQ(received_msg));
|
||||
break;
|
||||
@@ -147,14 +147,14 @@ void *F1AP_DU_task(void *arg) {
|
||||
case SCTP_NEW_ASSOCIATION_RESP:
|
||||
// 1. store the respon
|
||||
// 2. send the f1setup_req
|
||||
LOG_I(DU_F1AP, "SCTP_NEW_ASSOCIATION_RESP\n");
|
||||
LOG_I(DU_F1AP, "DU Task Received SCTP_NEW_ASSOCIATION_RESP\n");
|
||||
du_task_handle_sctp_association_resp(ITTI_MESSAGE_GET_INSTANCE(received_msg),
|
||||
&received_msg->ittiMsg.sctp_new_association_resp);
|
||||
break;
|
||||
|
||||
case SCTP_DATA_IND:
|
||||
// ex: any F1 incoming message for DU ends here
|
||||
LOG_I(DU_F1AP, "SCTP_DATA_IND\n");
|
||||
LOG_I(DU_F1AP, "DU Task Received SCTP_DATA_IND\n");
|
||||
du_task_handle_sctp_data_ind(ITTI_MESSAGE_GET_INSTANCE(received_msg),
|
||||
&received_msg->ittiMsg.sctp_data_ind);
|
||||
break;
|
||||
|
||||
@@ -298,17 +298,10 @@ int DU_send_UE_CONTEXT_SETUP_RESPONSE(instance_t instance) {
|
||||
|
||||
/* encode */
|
||||
if (f1ap_encode_pdu(&pdu, &buffer, &len) < 0) {
|
||||
printf("Failed to encode F1 setup request\n");
|
||||
LOG_E(DU_F1AP, "Failed to encode F1 setup request\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
printf("\n");
|
||||
|
||||
/* decode */
|
||||
// if (f1ap_decode_pdu(&pdu, buffer, len) > 0) {
|
||||
// printf("Failed to decode F1 setup request\n");
|
||||
// }
|
||||
//du_f1ap_itti_send_sctp_data_req(instance, f1ap_setup_req->assoc_id, buffer, len, 0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -688,16 +681,10 @@ int DU_send_UE_CONTEXT_MODIFICATION_RESPONSE(instance_t instance) {
|
||||
|
||||
/* encode */
|
||||
if (f1ap_encode_pdu(&pdu, &buffer, &len) < 0) {
|
||||
printf("Failed to encode F1 setup request\n");
|
||||
LOG_E(DU_F1AP, "Failed to encode F1 setup request\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
printf("\n");
|
||||
|
||||
/* decode */
|
||||
// if (f1ap_decode_pdu(&pdu, buffer, len) > 0) {
|
||||
// printf("Failed to decode F1 setup request\n");
|
||||
// }
|
||||
//du_f1ap_itti_send_sctp_data_req(instance, f1ap_setup_req->assoc_id, buffer, len, 0);
|
||||
return 0;
|
||||
|
||||
|
||||
@@ -33,6 +33,8 @@
|
||||
#include "f1ap_common.h"
|
||||
#include "f1ap_encoder.h"
|
||||
|
||||
int asn1_encoder_xer_print = 1;
|
||||
|
||||
/*
|
||||
static inline int f1ap_encode_initiating(f1ap_message *message,
|
||||
uint8_t **buffer,
|
||||
@@ -76,14 +78,21 @@ int f1ap_encode_pdu(F1AP_F1AP_PDU_t *pdu, uint8_t **buffer, uint32_t *length)
|
||||
DevAssert(buffer != NULL);
|
||||
DevAssert(length != NULL);
|
||||
|
||||
xer_fprint(stdout, &asn_DEF_F1AP_F1AP_PDU, pdu);
|
||||
if (asn1_encoder_xer_print) {
|
||||
LOG_E(F1AP, "----------------- ASN1 ENCODER PRINT START ----------------- \n");
|
||||
xer_fprint(stdout, &asn_DEF_F1AP_F1AP_PDU, pdu);
|
||||
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;
|
||||
}
|
||||
|
||||
*length = encoded;
|
||||
|
||||
/* Is the following needed? I moved the code here from CU_F1AP.c/DU_F1AP.c */
|
||||
// ASN_STRUCT_FREE_CONTENTS_ONLY(asn_DEF_F1AP_F1AP_PDU, pdu);
|
||||
return encoded;
|
||||
|
||||
@@ -117,7 +117,7 @@ int f1ap_handle_message(instance_t instance, uint32_t assoc_id, int32_t stream,
|
||||
}
|
||||
|
||||
/* Calling the right handler */
|
||||
printf("Calling handler with instance %d\n",instance);
|
||||
LOG_I(DU_F1AP, "Calling handler with instance %d\n",instance);
|
||||
ret = (*f1ap_messages_callback[pdu.choice.initiatingMessage->procedureCode][pdu.present - 1])
|
||||
(instance, assoc_id, stream, &pdu);
|
||||
ASN_STRUCT_FREE_CONTENTS_ONLY(asn_DEF_F1AP_F1AP_PDU, &pdu);
|
||||
|
||||
@@ -55,7 +55,7 @@ void du_f1ap_itti_send_sctp_data_req(instance_t instance, int32_t assoc_id, uint
|
||||
sctp_data_req->buffer_length = buffer_length;
|
||||
sctp_data_req->stream = stream;
|
||||
|
||||
printf("Sending ITTI message to SCTP Task\n");
|
||||
LOG_I(F1AP, "Sending ITTI message to SCTP Task\n");
|
||||
itti_send_msg_to_task(TASK_SCTP, instance, message_p);
|
||||
}
|
||||
|
||||
|
||||
@@ -5775,7 +5775,7 @@ rrc_eNB_generate_RRCConnectionSetup(
|
||||
F1AP_DL_RRC_MESSAGE (message_p).execute_duplication = 1;
|
||||
F1AP_DL_RRC_MESSAGE (message_p).RAT_frequency_priority_information.en_dc = 0;
|
||||
itti_send_msg_to_task (TASK_CU_F1, UE_MODULE_ID_TO_INSTANCE(ctxt_pP->module_id), message_p);
|
||||
LOG_E(RRC, "F1AP_DL_RRC_MESSAGE\n");
|
||||
LOG_D(RRC, "Send F1AP_DL_RRC_MESSAGE with ITTI\n");
|
||||
break;
|
||||
case ngran_eNB_DU :
|
||||
case ngran_gNB_DU :
|
||||
|
||||
Reference in New Issue
Block a user