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