Commit 09fb68de authored by Melissa Elkadi's avatar Melissa Elkadi

Cleaned up trigger function for meas reports

Also removed several warnings by properly
declaring nr-nFAPI functions and removed
declaration of unused functions. Also, reverted
eNB configuration file changes.
parent 9ac06d4b
......@@ -191,10 +191,10 @@ eNBs =
NETWORK_INTERFACES :
{
ENB_INTERFACE_NAME_FOR_S1_MME = "ctrl0";
ENB_IPV4_ADDRESS_FOR_S1_MME = "192.168.61.3";
ENB_INTERFACE_NAME_FOR_S1U = "ctrl0";
ENB_IPV4_ADDRESS_FOR_S1U = "192.168.61.5";
ENB_INTERFACE_NAME_FOR_S1_MME = "lo";
ENB_IPV4_ADDRESS_FOR_S1_MME = "127.0.0.1";
ENB_INTERFACE_NAME_FOR_S1U = "lo";
ENB_IPV4_ADDRESS_FOR_S1U = "127.0.0.1";
ENB_PORT_FOR_S1U = 2152; # Spec 2152
ENB_IPV4_ADDRESS_FOR_X2C = "127.0.0.1";
ENB_PORT_FOR_X2C = 36422; # Spec 36422
......
......@@ -395,7 +395,7 @@ set (FIRMWARE_VERSION "No svn information")
add_definitions("-DFIRMWARE_VERSION=\"${FIRMWARE_VERSION}\"")
add_definitions("-DPACKAGE_VERSION=\"Branch: ${GIT_BRANCH} Abrev. Hash: ${GIT_COMMIT_HASH} Date: ${GIT_COMMIT_DATE}\"")
add_definitions("-DPACKAGE_BUGREPORT=\"openair4g-devel@lists.eurecom.fr\"")
add_definitions("-DASN_EMIT_DEBUG=1")
#add_definitions("-DASN_EMIT_DEBUG=1")
# Debug related options
......
......@@ -6433,7 +6433,7 @@ static uint8_t unpack_nr_crc_indication_body(void* tlv, uint8_t **ppReadPackedMs
static uint8_t unpack_nr_crc_indication(uint8_t **ppReadPackedMsg, uint8_t *end, void *msg, nfapi_p7_codec_config_t* config)
{
uint8_t *ptr = *ppReadPackedMsg;
//uint8_t *ptr = *ppReadPackedMsg;
// printf("\n Read P7 message indication unpack: ");
// while(ptr < end){
// printf(" %d ", *ptr);
......
......@@ -148,6 +148,7 @@ typedef struct {
int pnf_p7_message_pump(pnf_p7_t* pnf_p7);
int pnf_nr_p7_message_pump(pnf_p7_t* pnf_p7);
int pnf_p7_pack_and_send_p7_message(pnf_p7_t* pnf_p7, nfapi_p7_message_header_t* msg, uint32_t msg_len);
int pnf_nr_p7_pack_and_send_p7_message(pnf_p7_t* pnf_p7, nfapi_p7_message_header_t* header, uint32_t msg_len);
int pnf_p7_send_message(pnf_p7_t* pnf_p7, uint8_t* msg, uint32_t msg_len);
......
......@@ -800,6 +800,7 @@ int nfapi_pnf_p7_harq_ind(nfapi_pnf_p7_config_t* config, nfapi_harq_indication_t
* \return 0 means success, -1 means failure
*/
int nfapi_pnf_p7_crc_ind(nfapi_pnf_p7_config_t* config, nfapi_crc_indication_t* ind);
int nfapi_pnf_p7_nr_crc_ind(nfapi_pnf_p7_config_t* config, nfapi_nr_crc_indication_t* ind);
/*! Send the RX.indication
* \param config A pointer to a PNF P7 config
......@@ -807,6 +808,7 @@ int nfapi_pnf_p7_crc_ind(nfapi_pnf_p7_config_t* config, nfapi_crc_indication_t*
* \return 0 means success, -1 means failure
*/
int nfapi_pnf_p7_rx_ind(nfapi_pnf_p7_config_t* config, nfapi_rx_indication_t* ind);
int nfapi_pnf_p7_nr_rx_data_ind(nfapi_pnf_p7_config_t* config, nfapi_nr_rx_data_indication_t* ind);
/*! Send the RACH.indication
* \param config A pointer to a PNF P7 config
......@@ -821,6 +823,7 @@ int nfapi_pnf_p7_rach_ind(nfapi_pnf_p7_config_t* config, nfapi_rach_indication_t
* \return 0 means success, -1 means failure
*/
int nfapi_pnf_p7_srs_ind(nfapi_pnf_p7_config_t* config, nfapi_srs_indication_t* ind);
int nfapi_pnf_p7_nr_srs_ind(nfapi_pnf_p7_config_t* config, nfapi_nr_srs_indication_t* ind);
/*! Send the SR.indication
* \param config A pointer to a PNF P7 config
......@@ -842,6 +845,7 @@ int nfapi_pnf_p7_cqi_ind(nfapi_pnf_p7_config_t* config, nfapi_cqi_indication_t*
* \return 0 means success, -1 means failure
*/
int nfapi_pnf_p7_lbt_dl_ind(nfapi_pnf_p7_config_t* config, nfapi_lbt_dl_indication_t* ind);
int nfapi_pnf_p7_nr_uci_ind(nfapi_pnf_p7_config_t* config, nfapi_nr_uci_indication_t* ind);
/*! Send the NB_HARQ.indication
* \param config A pointer to a PNF P7 config
......@@ -856,6 +860,7 @@ int nfapi_pnf_p7_nb_harq_ind(nfapi_pnf_p7_config_t* config, nfapi_nb_harq_indica
* \return 0 means success, -1 means failure
*/
int nfapi_pnf_p7_nrach_ind(nfapi_pnf_p7_config_t* config, nfapi_nrach_indication_t* ind);
int nfapi_pnf_p7_nr_rach_ind(nfapi_pnf_p7_config_t* config, nfapi_nr_rach_indication_t* ind);
/*! Send a vendor exntesion message
......
......@@ -288,6 +288,7 @@ void nr_csi_meas_reporting(int Mod_idP,
}
}
__attribute__((unused))
static void handle_dl_harq(module_id_t mod_id,
int UE_id,
int8_t harq_pid,
......@@ -392,7 +393,7 @@ void handle_nr_uci_pucch_2_3_4(module_id_t mod_id,
// NR_ServingCellConfigCommon_t *scc = RC.nrmac[mod_id]->common_channels->ServingCellConfigCommon;
// const int num_slots = nr_slots_per_frame[*scc->ssbSubcarrierSpacing];
const int num_slots = 20;
//const int num_slots = 20;
// if ((uci_234->pduBitmap >> 1) & 0x01) {
// // iterate over received harq bits
// for (int harq_bit = 0; harq_bit < uci_234->harq.harq_bit_len; harq_bit++) {
......
......@@ -176,7 +176,7 @@ static uint8_t check_trigger_meas_event(
uint8_t ue_cnx_index,
uint8_t meas_index,
LTE_Q_OffsetRange_t ofn, LTE_Q_OffsetRange_t ocn, LTE_Hysteresis_t hys,
LTE_Q_OffsetRange_t ofs, LTE_Q_OffsetRange_t ocs, LTE_TimeToTrigger_t ttt);
LTE_Q_OffsetRange_t ofs, LTE_Q_OffsetRange_t ocs, long a3_offset, LTE_TimeToTrigger_t ttt);
static void decode_MBSFNAreaConfiguration(module_id_t module_idP, uint8_t eNB_index, frame_t frameP,uint8_t mbsfn_sync_area);
static void decode_MBMSCountingRequest(module_id_t module_idP, uint8_t eNB_index, frame_t frameP,uint8_t mbsfn_sync_area);
......@@ -825,6 +825,7 @@ rrc_ue_process_measConfig(
measObj->measObject.choice.measObjectEUTRA.presenceAntennaPort1,
measObj->measObject.choice.measObjectEUTRA.neighCellConfig.buf[0]);
} else if (measObj->measObject.present == LTE_MeasObjectToAddMod__measObject_PR_measObjectNR_r15) {
ue->subframeCount = 0;
LOG_I(RRC, "NR_r15 Measurement: carrierFreq: %ld\n",
measObj->measObject.choice.measObjectNR_r15.carrierFreq_r15);
if (!get_softmodem_params()->nsa) {
......@@ -4436,10 +4437,6 @@ void ue_measurement_report_triggering(protocol_ctxt_t *const ctxt_pP, const uint
LTE_MeasObjectId_t measObjId;
LTE_ReportConfigId_t reportConfigId;
UE_RRC_INST *ue = &UE_rrc_inst[ctxt_pP->module_id];
bool is_in_period = false;
bool is_state_connected = false;
bool is_t304_inactive = false;
bool have_meas_flag = false;
for(i=0 ; i<NB_CNX_UE ; i++) {
for(j=0 ; j<MAX_MEAS_ID ; j++) {
if(ue->MeasId[i][j] != NULL) {
......@@ -4485,7 +4482,7 @@ void ue_measurement_report_triggering(protocol_ctxt_t *const ctxt_pP, const uint
ctxt_pP->module_id,
ctxt_pP->frame,
eNB_index,
i,j,ofn,ocn,hys,ofs,ocs,ttt_ms)) &&
i,j,ofn,ocn,hys,ofs,ocs,a3_offset,ttt_ms)) &&
(ue->Info[0].State >= RRC_CONNECTED) &&
(ue->Info[0].T304_active == 0 ) &&
(ue->HandoverInfoUe.measFlag == 1)) {
......@@ -4530,25 +4527,19 @@ void ue_measurement_report_triggering(protocol_ctxt_t *const ctxt_pP, const uint
if (ue->MeasObj[i][measObjId-1]->measObject.present == LTE_MeasObjectToAddMod__measObject_PR_measObjectNR_r15) {
if (!does_rrcConnReconfig_have_nr(ue))
break;
LTE_TimeToTrigger_t trig_per = ue->ReportConfig[i][reportConfigId-1]->reportConfig.choice.reportConfigInterRAT.triggerType.choice.event.timeToTrigger;
LTE_ReportConfigInterRAT_t *rc = &ue->ReportConfig[i][reportConfigId-1]->reportConfig.choice.reportConfigInterRAT;
LTE_TimeToTrigger_t trig_per = rc->triggerType.choice.event.timeToTrigger;
ttt_ms = timeToTrigger_ms[trig_per];
LOG_I(RRC, "[UE %d] Frame %d: B1_NR_r15 event. nr_meas %d, period %d, state %d, t304 %d, measfalg %d count %ld, ttt %ld\n",
ctxt_pP->module_id, ctxt_pP->frame,
does_rrcConnReconfig_have_nr(ue),
is_in_period,
is_state_connected,
is_t304_inactive,
have_meas_flag,
ue->ReportConfig[eNB_index][reportConfigId-1]->reportConfig.choice.reportConfigInterRAT.subframeCount,
ttt_ms);
if (ue->ReportConfig[eNB_index][reportConfigId-1]->reportConfig.choice.reportConfigInterRAT.subframeCount < ttt_ms) {
ue->ReportConfig[eNB_index][reportConfigId-1]->reportConfig.choice.reportConfigInterRAT.subframeCount = ue->ReportConfig[eNB_index][reportConfigId-1]->reportConfig.choice.reportConfigInterRAT.subframeCount + 1;
LOG_I(RRC, "[UE %d] Frame %d: B1_NR_r15 event. count %d, ttt %ld\n",
ctxt_pP->module_id, ctxt_pP->frame, ue->subframeCount, ttt_ms);
if (ue->subframeCount < ttt_ms) {
++ue->subframeCount;
break;
}
else {
ue->ReportConfig[eNB_index][reportConfigId-1]->reportConfig.choice.reportConfigInterRAT.subframeCount = 0;
is_in_period = true;
}
ue->subframeCount = 0;
bool is_state_connected = false;
bool is_t304_inactive = false;
bool have_meas_flag = false;
if (ue->Info[0].State >= RRC_CONNECTED)
is_state_connected = true;
if (ue->Info[0].T304_active == 0)
......@@ -4556,9 +4547,9 @@ void ue_measurement_report_triggering(protocol_ctxt_t *const ctxt_pP, const uint
if (ue->HandoverInfoUe.measFlag == 1);
have_meas_flag = true;
if (does_rrcConnReconfig_have_nr(ue) && is_in_period && is_state_connected && is_t304_inactive && have_meas_flag) {
LOG_I(RRC,"[UE %d] MELISSA ELAKDI! Frame %d: Triggering generation of Meas Report for NR_r15. count = %d\n",
ctxt_pP->module_id, ctxt_pP->frame, ue->ReportConfig[eNB_index][reportConfigId-1]->reportConfig.choice.reportConfigInterRAT.subframeCount);
if (is_state_connected && is_t304_inactive && have_meas_flag) {
LOG_I(RRC,"[UE %d] Frame %d: Triggering generation of Meas Report for NR_r15. count = %d\n",
ctxt_pP->module_id, ctxt_pP->frame, ue->subframeCount);
if (ue->measReportList[i][j] == NULL) {
ue->measReportList[i][j] = malloc(sizeof(MEAS_REPORT_LIST));
......@@ -4596,6 +4587,7 @@ uint8_t check_trigger_meas_event(
LTE_Hysteresis_t hys,
LTE_Q_OffsetRange_t ofs,
LTE_Q_OffsetRange_t ocs,
long a3_offset,
LTE_TimeToTrigger_t ttt ) {
uint8_t eNB_offset;
// uint8_t currentCellIndex = frame_parms->Nid_cell;
......
......@@ -937,6 +937,7 @@ typedef struct UE_RRC_INST_s {
float rsrq_db[7];
float rsrp_db_filtered[7];
float rsrq_db_filtered[7];
int subframeCount;
/* KeNB as computed from parameters within USIM card */
uint8_t kenb[32];
uint8_t nh[32];
......
......@@ -3451,7 +3451,6 @@ void rrc_eNB_generate_defaultRRCConnectionReconfiguration(const protocol_ctxt_t
ReportConfig_NR->reportConfig.choice.reportConfigInterRAT.triggerType.choice.event.timeToTrigger = LTE_TimeToTrigger_ms80;
ReportConfig_NR->reportConfig.choice.reportConfigInterRAT.maxReportCells = 4;
ReportConfig_NR->reportConfig.choice.reportConfigInterRAT.reportInterval = LTE_ReportInterval_ms120;
ReportConfig_NR->reportConfig.choice.reportConfigInterRAT.subframeCount = 0;
ReportConfig_NR->reportConfig.choice.reportConfigInterRAT.reportAmount = LTE_ReportConfigInterRAT__reportAmount_infinity;
ReportConfig_NR->reportConfig.choice.reportConfigInterRAT.ext7 = calloc(1, sizeof(struct LTE_ReportConfigInterRAT__ext7));
......
......@@ -112,10 +112,6 @@ int s1ap_eNB_handle_s1_ENDC_e_rab_modification_confirm(uint32_t as
uint32_t stream,
S1AP_S1AP_PDU_t *pdu);
static int s1ap_eNB_snd_s1_setup_request(
s1ap_eNB_instance_t *instance_p,
s1ap_eNB_mme_data_t *s1ap_mme_data_p);
int s1ap_timer_setup(
uint32_t interval_sec,
uint32_t interval_us,
......
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