Commit 2b44c0c8 authored by francescomani's avatar francescomani

set default timers at init and add logging when timer expires

parent 513f060f
...@@ -311,6 +311,7 @@ NR_UE_RRC_INST_t* nr_rrc_init_ue(char* uecap_file, int nb_inst) ...@@ -311,6 +311,7 @@ NR_UE_RRC_INST_t* nr_rrc_init_ue(char* uecap_file, int nb_inst)
rrc->uecap_file = uecap_file; rrc->uecap_file = uecap_file;
memset(&rrc->timers_and_constants, 0, sizeof(rrc->timers_and_constants)); memset(&rrc->timers_and_constants, 0, sizeof(rrc->timers_and_constants));
set_default_timers_and_constants(&rrc->timers_and_constants);
for (int i = 0; i < NB_CNX_UE; i++) { for (int i = 0; i < NB_CNX_UE; i++) {
rrcPerNB_t *ptr = &rrc->perNB[i]; rrcPerNB_t *ptr = &rrc->perNB[i];
......
...@@ -120,11 +120,14 @@ void nr_rrc_handle_timers(NR_UE_RRC_INST_t *rrc) ...@@ -120,11 +120,14 @@ void nr_rrc_handle_timers(NR_UE_RRC_INST_t *rrc)
NR_UE_Timers_Constants_t *timers = &rrc->timers_and_constants; NR_UE_Timers_Constants_t *timers = &rrc->timers_and_constants;
bool t300_expired = nr_timer_tick(&timers->T300); bool t300_expired = nr_timer_tick(&timers->T300);
if(t300_expired) if(t300_expired) {
LOG_W(NR_RRC, "Timer T300 expired\n");
handle_t300_expiry(rrc); handle_t300_expiry(rrc);
}
bool t304_expired = nr_timer_tick(&timers->T304); bool t304_expired = nr_timer_tick(&timers->T304);
if(t304_expired) { if(t304_expired) {
LOG_W(NR_RRC, "Timer T304 expired\n");
// TODO // TODO
// For T304 of MCG, in case of the handover from NR or intra-NR // For T304 of MCG, in case of the handover from NR or intra-NR
// handover, initiate the RRC re-establishment procedure; // handover, initiate the RRC re-establishment procedure;
...@@ -134,6 +137,7 @@ void nr_rrc_handle_timers(NR_UE_RRC_INST_t *rrc) ...@@ -134,6 +137,7 @@ void nr_rrc_handle_timers(NR_UE_RRC_INST_t *rrc)
bool t310_expired = nr_timer_tick(&timers->T310); bool t310_expired = nr_timer_tick(&timers->T310);
if(t310_expired) { if(t310_expired) {
LOG_W(NR_RRC, "Timer T310 expired\n");
// TODO // TODO
// handle detection of radio link failure // handle detection of radio link failure
// as described in 5.3.10.3 of 38.331 // as described in 5.3.10.3 of 38.331
...@@ -142,6 +146,7 @@ void nr_rrc_handle_timers(NR_UE_RRC_INST_t *rrc) ...@@ -142,6 +146,7 @@ void nr_rrc_handle_timers(NR_UE_RRC_INST_t *rrc)
bool t311_expired = nr_timer_tick(&timers->T311); bool t311_expired = nr_timer_tick(&timers->T311);
if(t311_expired) { if(t311_expired) {
LOG_W(NR_RRC, "Timer T311 expired\n");
// Upon T311 expiry, the UE shall perform the actions upon going to RRC_IDLE // Upon T311 expiry, the UE shall perform the actions upon going to RRC_IDLE
// with release cause 'RRC connection failure' // with release cause 'RRC connection failure'
nr_rrc_going_to_IDLE(rrc, RRC_CONNECTION_FAILURE, NULL); nr_rrc_going_to_IDLE(rrc, RRC_CONNECTION_FAILURE, NULL);
......
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