Commit cc2a507d authored by Robert Schmidt's avatar Robert Schmidt

Unify and comment RRC container print of F1

parent 80b62452
......@@ -2652,9 +2652,10 @@ void handle_f1ap_setup_resp(f1ap_setup_resp_t *resp) {
resp->nrpci[j] == carrier->physCellId)) {
// copy system information and decode it
for (si_ind=0;si_ind<resp->num_SI[j];si_ind++) {
printf("SI %d: ",si_ind);
for (int n=0;n<resp->SI_container_length[j][si_ind];n++) printf("%2x ",resp->SI_container[j][si_ind][n]);
printf("\n");
//printf("SI %d size %d: ", si_ind, resp->SI_container_length[j][si_ind]);
//for (int n=0;n<resp->SI_container_length[j][si_ind];n++)
// printf("%02x ",resp->SI_container[j][si_ind][n]);
//printf("\n");
extract_and_decode_SI(i,
si_ind,
resp->SI_container[j][si_ind],
......
......@@ -350,12 +350,10 @@ int CU_send_F1_SETUP_RESPONSE(instance_t instance,
cells_to_be_activated_list_itemExtIEs->extensionValue.present = F1AP_Cells_to_be_Activated_List_ItemExtIEs__extensionValue_PR_GNB_CUSystemInformation;
F1AP_GNB_CUSystemInformation_t *gNB_CUSystemInformation = (F1AP_GNB_CUSystemInformation_t *)calloc(1, sizeof(F1AP_GNB_CUSystemInformation_t));
#ifdef F1AP_DEBUG
LOG_I(F1AP, "SI %d: ", i);
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");
#endif
//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");
OCTET_STRING_fromBuf(&gNB_CUSystemInformation->sImessage,
(const char*)f1ap_setup_resp->SI_container[i][0],
f1ap_setup_resp->SI_container_length[i][0]);
......
......@@ -121,12 +121,13 @@ 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);
#ifdef F1AP_DEBUG
LOG_I(F1AP, "RRCContainer (CCCH):");
for (int i = 0; i < ie->value.choice.RRCContainer.size; i++)
printf("%2x ", RRC_MAC_CCCH_DATA_IND (message_p).sdu[i]);
printf("\n");
#endif
//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");
// Find instance from nr_cellid
int rrc_inst = -1;
for (int i=0;i<RC.nb_inst;i++) {
......@@ -250,6 +251,11 @@ 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");
/* optional */
/* c7. RAT_FrequencyPriorityInformation */
/* TODO */
......@@ -366,6 +372,12 @@ int CU_handle_UL_RRC_MESSAGE_TRANSFER(instance_t instance,
mem_block_t *mb = get_free_mem_block(ie->value.choice.RRCContainer.size,__func__);
memcpy((void*)mb->data,(void*)ie->value.choice.RRCContainer.buf,ie->value.choice.RRCContainer.size);
LOG_I(F1AP, "Calling pdcp_data_ind for UE RNTI %x srb_id %lu with size %ld (DCCH) \n", ctxt.rnti, srb_id, ie->value.choice.RRCContainer.size);
//LOG_I(F1AP, "%s() RRCContainer size %lu: ", __func__, ie->value.choice.RRCContainer.size);
//for (int i = 0; i < ie->value.choice.RRCContainer.size; i++)
// printf("%02x ", mb->data[i]);
//printf("\n");
pdcp_data_ind (&ctxt,
1, // srb_flag
0, // embms_flag
......
......@@ -147,9 +147,11 @@ int DU_handle_DL_RRC_MESSAGE_TRANSFER(instance_t instance,
rrc_dl_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 :");
for (int i=0;i<ie->value.choice.RRCContainer.size;i++) printf("%2x ",ie->value.choice.RRCContainer.buf[i]);
printf("\n");
//LOG_I(F1AP, "%s() RRCContainer size %lu: ", __func__, ie->value.choice.RRCContainer.size);
//for (int i = 0;i < ie->value.choice.RRCContainer.size; i++)
// printf("%02x ", ie->value.choice.RRCContainer.buf[i]);
//printf("\n");
/* optional */
/* RAT_FrequencyPriorityInformation */
......@@ -523,15 +525,15 @@ int DU_handle_DL_RRC_MESSAGE_TRANSFER(instance_t instance,
pdcp_pdu_p = get_free_mem_block(rrc_dl_sdu_len, __func__);
memset(pdcp_pdu_p->data, 0, rrc_dl_sdu_len);
memcpy(&pdcp_pdu_p->data[0], ie->value.choice.RRCContainer.buf, rrc_dl_sdu_len);
#ifdef DEBUG_MSG
printf ("PRRCContainer size %d:", ie->value.choice.RRCContainer.size);
for (int i=0;i<ie->value.choice.RRCContainer.size;i++) printf("%2x ",ie->value.choice.RRCContainer.buf[i]);
printf("\n");
printf ("PDCP PDU size %d:", rrc_dl_sdu_len);
for (int i=0;i<rrc_dl_sdu_len;i++) printf("%2x ",pdcp_pdu_p->data[i]);
printf("\n");
#endif
//LOG_I(F1AP, "PRRCContainer size %lu:", ie->value.choice.RRCContainer.size);
//for (int i = 0; i < ie->value.choice.RRCContainer.size; i++)
// printf("%02x ", ie->value.choice.RRCContainer.buf[i]);
//printf (", PDCP PDU size %d:", rrc_dl_sdu_len);
//for (int i=0;i<rrc_dl_sdu_len;i++) printf("%2x ",pdcp_pdu_p->data[i]);
//printf("\n");
if (pdcp_pdu_p != NULL) {
rlc_status = rlc_data_req(&ctxt
......@@ -595,6 +597,11 @@ int DU_send_UL_RRC_MESSAGE_TRANSFER(instance_t instance, const f1ap_ul_rrc_messa
LOG_I(F1AP, "[DU %d] %s: size %d UE RNTI %x in SRB %d\n",
instance, __func__, msg->rrc_container_length, rnti, msg->srb_id);
//LOG_I(F1AP, "%s() RRCContainer size %d: ", __func__, msg->rrc_container_length);
//for (int i = 0;i < msg->rrc_container_length; i++)
// printf("%02x ", msg->rrc_container[i]);
//printf("\n");
/* Create */
/* 0. Message Type */
memset(&pdu, 0, sizeof(pdu));
......
......@@ -8420,9 +8420,10 @@ void handle_f1_setup_req(f1ap_setup_req_t *f1_setup_req) {
if (rrc->carrier[0].SIB23) {
F1AP_SETUP_RESP (msg_p).SI_container[cu_cell_ind][num_SI] = rrc->carrier[0].SIB23;
F1AP_SETUP_RESP (msg_p).SI_container_length[cu_cell_ind][num_SI] = rrc->carrier[0].sizeof_SIB23;
printf("SI %d: ",0);
for (int n=0;n<F1AP_SETUP_RESP (msg_p).SI_container_length[j][num_SI];n++) printf("%2x ",F1AP_SETUP_RESP (msg_p).SI_container[0][num_SI][n]);
printf("\n");
//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("\n");
num_SI++;
}
F1AP_SETUP_RESP (msg_p).num_SI[cu_cell_ind] = 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