Commit f934f4c4 authored by francescomani's avatar francescomani

RRC processing frame instead of slot for timers

parent b6780803
...@@ -928,7 +928,8 @@ void *UE_thread(void *arg) ...@@ -928,7 +928,8 @@ void *UE_thread(void *arg)
timing_advance = UE->timing_advance; timing_advance = UE->timing_advance;
} }
nr_ue_rrc_timer_trigger(UE->Mod_id, curMsg.proc.frame_tx, curMsg.proc.nr_slot_tx, curMsg.proc.gNB_id); if (curMsg.proc.nr_slot_tx == 0)
nr_ue_rrc_timer_trigger(UE->Mod_id, curMsg.proc.frame_tx, curMsg.proc.gNB_id);
// Start TX slot processing here. It runs in parallel with RX slot processing // Start TX slot processing here. It runs in parallel with RX slot processing
notifiedFIFO_elt_t *newElt = newNotifiedFIFO_elt(sizeof(nr_rxtx_thread_data_t), curMsg.proc.nr_slot_tx, &txFifo, processSlotTX); notifiedFIFO_elt_t *newElt = newNotifiedFIFO_elt(sizeof(nr_rxtx_thread_data_t), curMsg.proc.nr_slot_tx, &txFifo, processSlotTX);
......
...@@ -79,7 +79,7 @@ MESSAGE_DEF(NAS_DOWNLINK_DATA_IND, MESSAGE_PRIORITY_MED, NasDlDataInd ...@@ -79,7 +79,7 @@ MESSAGE_DEF(NAS_DOWNLINK_DATA_IND, MESSAGE_PRIORITY_MED, NasDlDataInd
// eNB: realtime -> RRC messages // eNB: realtime -> RRC messages
MESSAGE_DEF(RRC_SUBFRAME_PROCESS, MESSAGE_PRIORITY_MED, RrcSubframeProcess, rrc_subframe_process) MESSAGE_DEF(RRC_SUBFRAME_PROCESS, MESSAGE_PRIORITY_MED, RrcSubframeProcess, rrc_subframe_process)
MESSAGE_DEF(NRRRC_SLOT_PROCESS, MESSAGE_PRIORITY_MED, NRRrcSlotProcess, nr_rrc_slot_process) MESSAGE_DEF(NRRRC_FRAME_PROCESS, MESSAGE_PRIORITY_MED, NRRrcFrameProcess, nr_rrc_frame_process)
// eNB: RLC -> RRC messages // eNB: RLC -> RRC messages
MESSAGE_DEF(RLC_SDU_INDICATION, MESSAGE_PRIORITY_MED, RlcSduIndication, rlc_sdu_indication) MESSAGE_DEF(RLC_SDU_INDICATION, MESSAGE_PRIORITY_MED, RlcSduIndication, rlc_sdu_indication)
...@@ -88,7 +88,7 @@ ...@@ -88,7 +88,7 @@
#define NAS_DOWNLINK_DATA_IND(mSGpTR) (mSGpTR)->ittiMsg.nas_dl_data_ind #define NAS_DOWNLINK_DATA_IND(mSGpTR) (mSGpTR)->ittiMsg.nas_dl_data_ind
#define RRC_SUBFRAME_PROCESS(mSGpTR) (mSGpTR)->ittiMsg.rrc_subframe_process #define RRC_SUBFRAME_PROCESS(mSGpTR) (mSGpTR)->ittiMsg.rrc_subframe_process
#define NRRRC_SLOT_PROCESS(mSGpTR) (mSGpTR)->ittiMsg.nr_rrc_slot_process #define NRRRC_FRAME_PROCESS(mSGpTR) (mSGpTR)->ittiMsg.nr_rrc_frame_process
#define RLC_SDU_INDICATION(mSGpTR) (mSGpTR)->ittiMsg.rlc_sdu_indication #define RLC_SDU_INDICATION(mSGpTR) (mSGpTR)->ittiMsg.rlc_sdu_indication
#define NRDuDlReq(mSGpTR) (mSGpTR)->ittiMsg.nr_du_dl_req #define NRDuDlReq(mSGpTR) (mSGpTR)->ittiMsg.nr_du_dl_req
...@@ -464,11 +464,10 @@ typedef struct rrc_subframe_process_s { ...@@ -464,11 +464,10 @@ typedef struct rrc_subframe_process_s {
int CC_id; int CC_id;
} RrcSubframeProcess; } RrcSubframeProcess;
typedef struct nrrrc_slot_process_s { typedef struct nrrrc_frame_process_s {
int frame; int frame;
int slot;
int gnb_id; int gnb_id;
} NRRrcSlotProcess; } NRRrcFrameProcess;
// eNB: RLC -> RRC messages // eNB: RLC -> RRC messages
typedef struct rlc_sdu_indication_s { typedef struct rlc_sdu_indication_s {
......
...@@ -2029,12 +2029,13 @@ void *rrc_nrue_task(void *args_p) ...@@ -2029,12 +2029,13 @@ void *rrc_nrue_task(void *args_p)
handle_rlf_sync(tac, sync_msg); handle_rlf_sync(tac, sync_msg);
break; break;
case NRRRC_SLOT_PROCESS: case NRRRC_FRAME_PROCESS:
LOG_D(NR_RRC, "[UE %d] Received %s: frame %d slot %d\n", LOG_D(NR_RRC, "[UE %d] Received %s: frame %d\n",
ue_mod_id, ITTI_MSG_NAME (msg_p), NRRRC_SLOT_PROCESS (msg_p).frame, NRRRC_SLOT_PROCESS (msg_p).slot); ue_mod_id, ITTI_MSG_NAME (msg_p), NRRRC_FRAME_PROCESS (msg_p).frame);
// increase the timers every 10ms (every new frame)
NR_UE_Timers_Constants_t *timers = &NR_UE_rrc_inst[ue_mod_id].timers_and_constants; NR_UE_Timers_Constants_t *timers = &NR_UE_rrc_inst[ue_mod_id].timers_and_constants;
nr_rrc_handle_timers(timers); nr_rrc_handle_timers(timers);
NR_UE_RRC_SI_INFO *SInfo = &NR_UE_rrc_inst[ue_mod_id].SInfo[NRRRC_SLOT_PROCESS (msg_p).gnb_id]; NR_UE_RRC_SI_INFO *SInfo = &NR_UE_rrc_inst[ue_mod_id].SInfo[NRRRC_FRAME_PROCESS (msg_p).gnb_id];
nr_rrc_SI_timers(SInfo); nr_rrc_SI_timers(SInfo);
break; break;
...@@ -2528,13 +2529,12 @@ void process_lte_nsa_msg(nsa_msg_t *msg, int msg_len) ...@@ -2528,13 +2529,12 @@ void process_lte_nsa_msg(nsa_msg_t *msg, int msg_len)
} }
} }
void nr_ue_rrc_timer_trigger(int module_id, int frame, int slot, int gnb_id) void nr_ue_rrc_timer_trigger(int module_id, int frame, int gnb_id)
{ {
MessageDef *message_p; MessageDef *message_p;
message_p = itti_alloc_new_message(TASK_RRC_NRUE, 0, NRRRC_SLOT_PROCESS); message_p = itti_alloc_new_message(TASK_RRC_NRUE, 0, NRRRC_FRAME_PROCESS);
NRRRC_SLOT_PROCESS(message_p).frame = frame; NRRRC_FRAME_PROCESS(message_p).frame = frame;
NRRRC_SLOT_PROCESS(message_p).slot = slot; NRRRC_FRAME_PROCESS(message_p).gnb_id = gnb_id;
NRRRC_SLOT_PROCESS(message_p).gnb_id = gnb_id; LOG_D(NR_RRC, "RRC timer trigger: frame %d\n", frame);
LOG_D(NR_RRC, "RRC timer trigger: frame %d slot %d \n", frame, slot);
itti_send_msg_to_task(TASK_RRC_NRUE, GNB_MODULE_ID_TO_INSTANCE(module_id), message_p); itti_send_msg_to_task(TASK_RRC_NRUE, GNB_MODULE_ID_TO_INSTANCE(module_id), message_p);
} }
...@@ -161,7 +161,7 @@ int get_from_lte_ue_fd(); ...@@ -161,7 +161,7 @@ int get_from_lte_ue_fd();
void nr_rrc_SI_timers(NR_UE_RRC_SI_INFO *SInfo); void nr_rrc_SI_timers(NR_UE_RRC_SI_INFO *SInfo);
void nr_ue_rrc_timer_trigger(int module_id, int frame, int slot, int gnb_id); void nr_ue_rrc_timer_trigger(int module_id, int frame, int gnb_id);
void configure_spcell(NR_UE_RRC_INST_t *rrc, NR_SpCellConfig_t *spcell_config); void configure_spcell(NR_UE_RRC_INST_t *rrc, NR_SpCellConfig_t *spcell_config);
void reset_rlf_timers_and_constants(NR_UE_Timers_Constants_t *tac); void reset_rlf_timers_and_constants(NR_UE_Timers_Constants_t *tac);
......
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