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) {
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 &&
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
for (si_ind=2; si_ind<10; 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++)
printf("%02x ",resp->cells_to_activate[j].SI_container[si_ind][n]);
printf("\n");
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]);
//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("\n");
if (si_ind==6) si_ind=9;
if (resp->cells_to_activate[j].SI_container[si_ind] != NULL) {
extract_and_decode_SI(i,
......
......@@ -130,24 +130,27 @@ int CU_handle_INITIAL_UL_RRC_MESSAGE_TRANSFER(instance_t instance,
ccch_sdu_len);
}
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);
if (RC.nrrrc && RC.nrrrc[GNB_INSTANCE_TO_MODULE_ID(instance)]->node_type == ngran_gNB_CU) {
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
int rrc_inst = -1;
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,
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);
LOG_I(F1AP, "%s() RRCContainer size %d: ", __func__, f1ap_dl_rrc->rrc_container_length);
for (int i = 0; i < ie->value.choice.RRCContainer.size; i++)
printf("%02x ", f1ap_dl_rrc->rrc_container[i]);
printf("\n");
if (RC.nrrrc && RC.nrrrc[GNB_INSTANCE_TO_MODULE_ID(instance)]->node_type == ngran_gNB_CU) {
LOG_I(F1AP, "%s() RRCContainer size %d: ", __func__, f1ap_dl_rrc->rrc_container_length);
for (int i = 0; i < ie->value.choice.RRCContainer.size; i++)
printf("%02x ", f1ap_dl_rrc->rrc_container[i]);
printf("\n");
}
/* optional */
/* c7. RAT_FrequencyPriorityInformation */
......
......@@ -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_digit_length,
&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;
/* 10.1.2 sCellIndex */
......@@ -742,13 +742,15 @@ int CU_send_UE_CONTEXT_SETUP_REQUEST(instance_t instance,
/* OPTIONAL */
/* RRCContainer */
ie = (F1AP_UEContextSetupRequestIEs_t *)calloc(1, sizeof(F1AP_UEContextSetupRequestIEs_t));
ie->id = F1AP_ProtocolIE_ID_id_RRCContainer;
ie->criticality = F1AP_Criticality_reject;
ie->value.present = F1AP_UEContextSetupRequestIEs__value_PR_RRCContainer;
OCTET_STRING_fromBuf(&ie->value.choice.RRCContainer, (const char*)f1ap_ue_context_setup_req->rrc_container,
f1ap_ue_context_setup_req->rrc_container_length);
ASN_SEQUENCE_ADD(&out->protocolIEs.list, ie);
if(RC.nrrrc) {
ie = (F1AP_UEContextSetupRequestIEs_t *)calloc(1, sizeof(F1AP_UEContextSetupRequestIEs_t));
ie->id = F1AP_ProtocolIE_ID_id_RRCContainer;
ie->criticality = F1AP_Criticality_reject;
ie->value.present = F1AP_UEContextSetupRequestIEs__value_PR_RRCContainer;
OCTET_STRING_fromBuf(&ie->value.choice.RRCContainer, (const char*)f1ap_ue_context_setup_req->rrc_container,
f1ap_ue_context_setup_req->rrc_container_length);
ASN_SEQUENCE_ADD(&out->protocolIEs.list, ie);
}
/* OPTIONAL */
/* MaskedIMEISV */
......@@ -781,7 +783,9 @@ int CU_send_UE_CONTEXT_SETUP_REQUEST(instance_t instance,
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;
}
......@@ -1081,8 +1085,8 @@ int CU_send_UE_CONTEXT_MODIFICATION_REQUEST(instance_t instance) {
// for test
int mcc = 208;
int mnc = 93;
int mnc_digit_length = 8;
int mnc = 92;
int mnc_digit_length = 2;
/* Create */
/* 0. Message Type */
......@@ -1123,7 +1127,7 @@ int CU_send_UE_CONTEXT_MODIFICATION_REQUEST(instance_t instance) {
F1AP_NRCGI_t nRCGI;
MCC_MNC_TO_PLMNID(mcc, mnc, mnc_digit_length,
&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;
ASN_SEQUENCE_ADD(&out->protocolIEs.list, ie);
......@@ -1248,7 +1252,7 @@ int CU_send_UE_CONTEXT_MODIFICATION_REQUEST(instance_t instance) {
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);
NR_CELL_ID_TO_BIT_STRING(12345678, &nRCGI.nRCellIdentity);
scell_toBeSetupMod_item.sCell_ID = nRCGI;
/* sCellIndex */
......@@ -1288,7 +1292,7 @@ int CU_send_UE_CONTEXT_MODIFICATION_REQUEST(instance_t instance) {
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);
NR_CELL_ID_TO_BIT_STRING(12345678, &nRCGI.nRCellIdentity);
scell_toBeRemoved_item.sCell_ID = nRCGI;
/* ADD */
......
......@@ -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
/* - fiveGS_TAC */
uint8_t fiveGS_TAC[3];
served_cell_information.fiveGS_TAC=calloc(1,sizeof(*served_cell_information.fiveGS_TAC));
fiveGS_TAC[0] = ((uint8_t*)&f1ap_du_data->tac[i])[2];
fiveGS_TAC[1] = ((uint8_t*)&f1ap_du_data->tac[i])[1];
fiveGS_TAC[2] = ((uint8_t*)&f1ap_du_data->tac[i])[0];
OCTET_STRING_fromBuf(served_cell_information.fiveGS_TAC,
(const char *)fiveGS_TAC,
3);
if (RC.nrrrc) {
uint8_t fiveGS_TAC[3];
fiveGS_TAC[0] = ((uint8_t*)&f1ap_du_data->tac[i])[2];
fiveGS_TAC[1] = ((uint8_t*)&f1ap_du_data->tac[i])[1];
fiveGS_TAC[2] = ((uint8_t*)&f1ap_du_data->tac[i])[0];
OCTET_STRING_fromBuf(served_cell_information.fiveGS_TAC,
(const char *)fiveGS_TAC,
3);
} else {
OCTET_STRING_fromBuf(served_cell_information.fiveGS_TAC,
(const char*)&f1ap_du_data->tac[i],
3);
}
/* - Configured_EPS_TAC */
if(0){
......@@ -392,6 +397,7 @@ int DU_send_F1_SETUP_REQUEST(instance_t instance) {
(const char*)f1ap_du_data->mib[i],//f1ap_du_data->mib,
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
(const char*)f1ap_du_data->sib1[i],
f1ap_du_data->sib1_length[i]);
......@@ -409,15 +415,17 @@ int DU_send_F1_SETUP_REQUEST(instance_t instance) {
/* mandatory */
/* c5. RRC VERSION */
ie = (F1AP_F1SetupRequestIEs_t *)calloc(1, sizeof(F1AP_F1SetupRequestIEs_t));
ie->id = F1AP_ProtocolIE_ID_id_GNB_DU_RRC_Version;
ie->criticality = F1AP_Criticality_reject;
ie->value.present = F1AP_F1SetupRequestIEs__value_PR_RRC_Version;
ie->value.choice.RRC_Version.latest_RRC_Version.buf=calloc(1,sizeof(char));
ie->value.choice.RRC_Version.latest_RRC_Version.buf[0] = 0xe0;
ie->value.choice.RRC_Version.latest_RRC_Version.size = 1;
ie->value.choice.RRC_Version.latest_RRC_Version.bits_unused = 5;
ASN_SEQUENCE_ADD(&out->protocolIEs.list, ie);
if(RC.nrrrc) {
ie = (F1AP_F1SetupRequestIEs_t *) calloc(1, sizeof(F1AP_F1SetupRequestIEs_t));
ie->id = F1AP_ProtocolIE_ID_id_GNB_DU_RRC_Version;
ie->criticality = F1AP_Criticality_reject;
ie->value.present = F1AP_F1SetupRequestIEs__value_PR_RRC_Version;
ie->value.choice.RRC_Version.latest_RRC_Version.buf = calloc(1, sizeof(char));
ie->value.choice.RRC_Version.latest_RRC_Version.buf[0] = 0xe0;
ie->value.choice.RRC_Version.latest_RRC_Version.size = 1;
ie->value.choice.RRC_Version.latest_RRC_Version.bits_unused = 5;
ASN_SEQUENCE_ADD(&out->protocolIEs.list, ie);
}
/* encode */
if (f1ap_encode_pdu(&pdu, &buffer, &len) < 0) {
......@@ -553,10 +561,10 @@ int DU_handle_F1_SETUP_RESPONSE(instance_t instance,
for (int si = 0;si < gNB_CUSystemInformation->sibtypetobeupdatedlist.list.count;si++) {
F1AP_SibtypetobeupdatedListItem_t *sib_item = gNB_CUSystemInformation->sibtypetobeupdatedlist.list.array[si];
size_t size = sib_item->sIBmessage.size;
F1AP_SETUP_RESP (msg_p).cells_to_activate[i].SI_container_length[si] = size;
LOG_D(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]);
memcpy((void*)F1AP_SETUP_RESP (msg_p).cells_to_activate[i].SI_container[si],
F1AP_SETUP_RESP (msg_p).cells_to_activate[i].SI_container_length[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[sib_item->sIBtype] = malloc(size);
memcpy((void*)F1AP_SETUP_RESP (msg_p).cells_to_activate[i].SI_container[sib_item->sIBtype],
(void*)sib_item->sIBmessage.buf,
size);
}
......@@ -589,7 +597,6 @@ int DU_handle_F1_SETUP_RESPONSE(instance_t instance,
} // switch ie
} // for IE
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;
for (int i=0;i<num_cells_to_activate;i++)
......@@ -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
/* - fiveGS_TAC */
uint8_t fiveGS_TAC[3];
fiveGS_TAC[0] = ((uint8_t*)&f1ap_setup_req->tac[i])[2];
fiveGS_TAC[1] = ((uint8_t*)&f1ap_setup_req->tac[i])[1];
fiveGS_TAC[2] = ((uint8_t*)&f1ap_setup_req->tac[i])[0];
OCTET_STRING_fromBuf(served_cell_information.fiveGS_TAC,
(const char *)fiveGS_TAC,
3);
if (RC.nrrrc) {
uint8_t fiveGS_TAC[3];
fiveGS_TAC[0] = ((uint8_t*)&f1ap_setup_req->tac[i])[2];
fiveGS_TAC[1] = ((uint8_t*)&f1ap_setup_req->tac[i])[1];
fiveGS_TAC[2] = ((uint8_t*)&f1ap_setup_req->tac[i])[0];
OCTET_STRING_fromBuf(served_cell_information.fiveGS_TAC,
(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 */
if(1){
......@@ -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
/* - fiveGS_TAC */
served_cell_information.fiveGS_TAC=calloc(1,sizeof(*served_cell_information.fiveGS_TAC));
OCTET_STRING_fromBuf(served_cell_information.fiveGS_TAC,
(const char *) &f1ap_setup_req->tac[i],
3);
......@@ -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++) {
F1AP_SibtypetobeupdatedListItem_t *sib_item = gNB_CUSystemInformation->sibtypetobeupdatedlist.list.array[si];
size_t size = sib_item->sIBmessage.size;
F1AP_GNB_CU_CONFIGURATION_UPDATE (msg_p).cells_to_activate[i].SI_container_length[si] = size;
LOG_D(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]);
memcpy((void*)F1AP_GNB_CU_CONFIGURATION_UPDATE (msg_p).cells_to_activate[i].SI_container[si],
F1AP_GNB_CU_CONFIGURATION_UPDATE (msg_p).cells_to_activate[i].SI_container_length[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[sib_item->sIBtype] = malloc(size);
memcpy((void*)F1AP_GNB_CU_CONFIGURATION_UPDATE (msg_p).cells_to_activate[i].SI_container[sib_item->sIBtype],
(void*)sib_item->sIBmessage.buf,
size);
}
......
......@@ -108,22 +108,52 @@ int DU_handle_UE_CONTEXT_SETUP_REQUEST(instance_t instance,
f1ap_ue_context_setup_req->cellULConfigured = NULL;
}
/* CUtoDURRCInformation */
/* Candidate_SpCell_List */
/* optional */
/* DRXCycle */
/* optional */
/* ResourceCoordinationTransferContainer */
/* SCell_ToBeSetup_List */
/* SRBs_ToBeSetup_List */
/* DRBs_ToBeSetup_List */
/* Decode DRBs_ToBeSetup_List */
if(0) {
if (RC.nrrrc) {
/* RRCContainer */
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 = 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,
"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,
}
}
}
/* 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;
}
......
......@@ -1951,8 +1951,8 @@ int gNB_app_handle_f1ap_setup_resp(f1ap_setup_resp_t *resp) {
du_extract_and_decode_SI(i,
si_ind,
resp->cells_to_activate[j].SI_container[si_ind],
resp->cells_to_activate[j].SI_container_length[si_ind]);
resp->cells_to_activate[j].SI_container[2+si_ind],
resp->cells_to_activate[j].SI_container_length[2+si_ind]);
}
// perform MAC/L1 common configuration
......@@ -1986,8 +1986,8 @@ int gNB_app_handle_f1ap_gnb_cu_configuration_update(f1ap_gnb_cu_configuration_up
du_extract_and_decode_SI(i,
si_ind,
gnb_cu_cfg_update->cells_to_activate[j].SI_container[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[2+si_ind],
gnb_cu_cfg_update->cells_to_activate[j].SI_container_length[2+si_ind]);
}
// perform MAC/L1 common configuration
......
......@@ -8845,9 +8845,9 @@ void handle_f1_setup_req(f1ap_setup_req_t *f1_setup_req) {
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_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]);
//for (int n = 0; n < F1AP_SETUP_RESP(msg_p).SI_container_length[j][num_SI]; n++)
// printf("%02x ", F1AP_SETUP_RESP(msg_p).SI_container[0][num_SI][n]);
//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).cells_to_activate[cu_cell_ind].SI_container_length[2+num_SI]; n++)
// printf("%02x ", F1AP_SETUP_RESP (msg_p).cells_to_activate[cu_cell_ind].SI_container[2+num_SI][n]);
//printf("\n");
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