Commit 56f2203b authored by Melissa Elkadi's avatar Melissa Elkadi

WIP: Encoding is succeeding. Hacked phy_id.

parent 997c2e07
......@@ -4232,6 +4232,7 @@ ssize_t do_nrMeasurementReport(uint8_t *buffer,
#error EMIT_ASN_DEBUG is disabled
#endif
LTE_UL_DCCH_Message_t ul_dcch_msg;
memset(&ul_dcch_msg, 0, sizeof(ul_dcch_msg));
ul_dcch_msg.message.present = LTE_UL_DCCH_MessageType_PR_c1;
......@@ -4240,16 +4241,18 @@ ssize_t do_nrMeasurementReport(uint8_t *buffer,
LTE_MeasurementReport_t *measurementReport = &ul_dcch_msg.message.choice.c1.choice.measurementReport;
measurementReport->criticalExtensions.present = LTE_MeasurementReport__criticalExtensions_PR_c1;
measurementReport->criticalExtensions.choice.c1.present = LTE_MeasurementReport__criticalExtensions__c1_PR_measurementReport_r8;
measurementReport->criticalExtensions.choice.c1.choice.measurementReport_r8.measResults.measId = measid;
measurementReport->criticalExtensions.choice.c1.choice.measurementReport_r8.measResults.measResultPCell.rsrpResult = rsrp_s;
measurementReport->criticalExtensions.choice.c1.choice.measurementReport_r8.measResults.measResultPCell.rsrqResult = rsrq_s;
#if 0
LTE_MeasResults_t *mr_r8 = &measurementReport->criticalExtensions.choice.c1.choice.measurementReport_r8.measResults;
//mr_r8 = CALLOC(1, sizeof(*mr_r8));
mr_r8->measId = measid;
mr_r8->measResultPCell.rsrpResult = rsrp_s;
mr_r8->measResultPCell.rsrqResult = rsrq_s;
mr_r8->measResultNeighCells = CALLOC(1, sizeof(*mr_r8->measResultNeighCells));
mr_r8->measResultNeighCells->present = LTE_MeasResults__measResultNeighCells_PR_measResultNeighCellListNR_r15;
//mr_r8->ext4 = CALLOC(1, sizeof(*mr_r8->ext4));
//mr_r8->ext4->measResultPCell_v1310->rs_sinr_Result_r13 = NULL;
LTE_MeasResultNR_r15_t *measResultNR_r15;
measResultNR_r15 = CALLOC(1, sizeof(*measResultNR_r15));
......@@ -4259,16 +4262,18 @@ ssize_t do_nrMeasurementReport(uint8_t *buffer,
LTE_MeasResultCellNR_r15_t *measResultCellNR_r15;
measResultCellNR_r15 = CALLOC(1, sizeof(*measResultCellNR_r15));
measResultCellNR_r15->pci_r15 = phy_id;
ASN_SEQUENCE_ADD(&measResultCellNR_r15->measResultCell_r15, measResultNR_r15);
measResultCellNR_r15->measResultCell_r15.rsrpResult_r15 = &rsrp_tar;
measResultCellNR_r15->measResultCell_r15.rsrqResult_r15 = &rsrq_tar;
LTE_MeasResultCellListNR_r15_t *measResultListNR_r15;
measResultListNR_r15 = CALLOC(1, sizeof(*measResultListNR_r15));
ASN_SEQUENCE_ADD(&measResultListNR_r15->list, measResultCellNR_r15);
LTE_MeasResultCellListNR_r15_t *mr_cl = &mr_r8->measResultNeighCells->choice.measResultNeighCellListNR_r15;
ASN_SEQUENCE_ADD(&mr_cl->list, measResultListNR_r15);
ASN_SEQUENCE_ADD(&mr_r8->measResultNeighCells->choice.measResultNeighCellListNR_r15.list, measResultListNR_r15);
//xer_fprint(stdout, &asn_DEF_LTE_UL_DCCH_Message, &ul_dcch_msg);
#endif
asn_enc_rval_t enc_rval = uper_encode_to_buffer(&asn_DEF_LTE_UL_DCCH_Message,
NULL,
&ul_dcch_msg,
......
......@@ -4124,6 +4124,15 @@ void rrc_ue_generate_nrMeasurementReport(protocol_ctxt_t *const ctxt_pP, uint8_t
AssertFatal(size >= 0, "do_nrMeasurementReport failed \n");
LOG_I(RRC, "Melissa [UE %d] Frame %d : Generating Measurement Report for eNB %d\n",
ctxt_pP->module_id, ctxt_pP->frame, eNB_index);
#if 0
rrc_data_req (ctxt_pP,
DCCH,
rrc_mui++,
SDU_CONFIRM_NO,
(enc_rval.encoded + 7) / 8,
buffer,
PDCP_TRANSMISSION_MODE_CONTROL);
#endif
int result = pdcp_data_req(ctxt_pP, SRB_FLAG_YES, DCCH, rrc_mui++, 0, size, buffer, PDCP_TRANSMISSION_MODE_DATA,NULL, NULL);
AssertFatal (result == TRUE, "PDCP data request failed!\n");
}
......
......@@ -4612,8 +4612,8 @@ rrc_eNB_process_MeasurementReport(
X2AP_ENDC_SGNB_ADDITION_REQ(msg).target_physCellId
= measResults2->measResultNeighCells->choice.measResultListEUTRA.list.array[0]->physCellId; //Melissa
#endif
X2AP_ENDC_SGNB_ADDITION_REQ(msg).target_physCellId
= measResults2->measResultNeighCells->choice.measResultNeighCellListNR_r15.list.array[0]->pci_r15;
X2AP_ENDC_SGNB_ADDITION_REQ(msg).target_physCellId = 0;
// = measResults2->measResultNeighCells->choice.measResultNeighCellListNR_r15.list.array[0]->pci_r15;
//For the moment we have a single E-RAB which will be the one to be added to the gNB
//Not sure how to select bearers to be added if there are multiple.
X2AP_ENDC_SGNB_ADDITION_REQ(msg).nb_e_rabs_tobeadded = 1;
......
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