Commit 287010f8 authored by Louis Adrien Dufrene's avatar Louis Adrien Dufrene

RRC timer: last format done. Timer reset in scheduling of DTCH (DL/UL). Commit to test.

parent 76e16362
......@@ -65,7 +65,7 @@ typedef int32_t sdu_size_t;
typedef uint32_t frame_t;
typedef int32_t sframe_t;
typedef uint32_t sub_frame_t;
typedef uint16_t module_id_t;
typedef uint16_t module_id_t;
typedef uint8_t slice_id_t;
typedef uint8_t eNB_index_t;
typedef uint16_t ue_id_t;
......
......@@ -43,6 +43,10 @@
#include "RRC/LTE/rrc_extern.h"
#include "RRC/L2_INTERFACE/openair_rrc_L2_interface.h"
/************************************************/
//#include "RRC/LTE/rrc_eNB_UE_context.h"
//#include "RRC/LTE/rrc_defs.h"
/************************************************/
//#include "LAYER2/MAC/pre_processor.c"
#include "pdcp.h"
......@@ -466,6 +470,8 @@ schedule_ue_spec(module_id_t module_idP, int slice_idxP,
int header_length_last;
int header_length_total;
rrc_eNB_ue_context_t *ue_contextP; // added by LA
start_meas(&eNB->schedule_dlsch);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_SCHEDULE_DLSCH, VCD_FUNCTION_IN);
......@@ -1106,6 +1112,17 @@ schedule_ue_spec(module_id_t module_idP, int slice_idxP,
UE_list->UE_sched_ctrl[UE_id].uplane_inactivity_timer = 0;
// reset RRC inactivity timer after uplane activity
ue_contextP = rrc_eNB_get_ue_context(RC.rrc[module_idP], rnti);
ue_contextP->ue_context.ue_rrc_inactivity_timer = 1;
LOG_W(RRC, "After reset, rrc_inactivity_timer is %d, of UE rntiP %d, ue_context_rnti %d, UE_id %d, ue_initial_id %d\n",
ue_contextP->ue_context.ue_rrc_inactivity_timer,
rnti,
ue_contextP->ue_id_rnti,
UE_id,
ue_contextP->ue_context.ue_initial_id);
} // end if (rlc_status.bytes_in_buffer > 0)
} else { // no TBS left
break; // break for (lcid = NB_RB_MAX - 1; lcid >= DTCH; lcid--)
......
......@@ -45,6 +45,10 @@
#include "RRC/LTE/rrc_extern.h"
#include "RRC/L2_INTERFACE/openair_rrc_L2_interface.h"
/************************************************/
//#include "RRC/LTE/rrc_eNB_UE_context.h"
//#include "RRC/LTE/rrc_defs.h"
/************************************************/
#include "assertions.h"
//#include "LAYER2/MAC/pre_processor.c"
......@@ -111,6 +115,8 @@ rx_sdu(const module_id_t enb_mod_idP,
(RA_t *) & RC.mac[enb_mod_idP]->common_channels[CC_idP].ra[0];
int first_rb = 0;
rrc_eNB_ue_context_t *ue_contextP; // added by LA
start_meas(&mac->rx_ulsch_sdu);
if ((UE_id > MAX_MOBILES_PER_ENB) || (UE_id == -1))
......@@ -732,6 +738,18 @@ rx_sdu(const module_id_t enb_mod_idP,
//clear uplane_inactivity_timer
UE_list->UE_sched_ctrl[UE_id].uplane_inactivity_timer = 0;
// reset RRC inactivity timer after uplane activity
ue_contextP = rrc_eNB_get_ue_context(RC.rrc[enb_mod_idP], rntiP);
ue_contextP->ue_context.ue_rrc_inactivity_timer = 1;
LOG_W(RRC, "After reset, rrc_inactivity_timer is %d, of UE rntiP %d, ue_context_rnti %d, UE_id %d, ue_initial_id %d\n",
ue_contextP->ue_context.ue_rrc_inactivity_timer,
rntiP,
ue_contextP->ue_id_rnti,
UE_id,
ue_contextP->ue_context.ue_initial_id);
} else { /* rx_length[i] */
UE_list->eNB_UE_stats[CC_idP][UE_id].num_errors_rx += 1;
......@@ -743,7 +761,7 @@ rx_sdu(const module_id_t enb_mod_idP,
UE_id);
}
} else { /*(UE_id != -1 */
} else { // end if (UE_id != -1)
LOG_E(MAC,"[eNB %d] CC_id %d Frame %d : received unsupported or unknown LCID %d from UE %d ",
enb_mod_idP,
CC_idP,
......
......@@ -1036,7 +1036,7 @@ rrc_eNB_process_RRCConnectionSetupComplete(
ue_context_pP->ue_context.Srb1.Active = 1;
ue_context_pP->ue_context.Status = RRC_CONNECTED;
ue_context_pP->ue_context.ue_rrc_inactivity_timer = 1; // set rrc inactivity when UE goes into RRC_CONNECTED
ue_context_pP->ue_context.ue_rrc_inactivity_timer_thres = 10000; // SHOULD NOT BE DONE HERE !!!!!
ue_context_pP->ue_context.ue_rrc_inactivity_timer_thres = 10000; // The value should come from config file
T(T_ENB_RRC_CONNECTION_SETUP_COMPLETE, T_INT(ctxt_pP->module_id), T_INT(ctxt_pP->frame),
T_INT(ctxt_pP->subframe), T_INT(ctxt_pP->rnti));
......@@ -1369,6 +1369,8 @@ rrc_eNB_process_RRCConnectionReestablishmentComplete(
uint8_t next_xid = rrc_eNB_get_next_transaction_identifier(ctxt_pP->module_id);
ue_context_pP->ue_context.Status = RRC_CONNECTED;
ue_context_pP->ue_context.ue_rrc_inactivity_timer = 1; // set rrc inactivity when UE goes into RRC_CONNECTED
ue_context_pP->ue_context.ue_rrc_inactivity_timer_thres = 10000; // The value should come from config file
ue_context_pP->ue_context.reestablishment_xid = next_xid;
SRB_configList2 = &ue_context_pP->ue_context.SRB_configList2[xid];
......
......@@ -167,7 +167,8 @@ void extract_imsi(uint8_t *pdu_buf, uint32_t pdu_len, rrc_eNB_ue_context_t *ue_c
# if defined(ENABLE_ITTI)
//------------------------------------------------------------------------------
/*
* TODO
* Get the UE S1 struct containing hashtables S1_id/UE_id.
* Is also used to set the S1_id of the UE, depending on inputs.
*/
struct rrc_ue_s1ap_ids_s*
rrc_eNB_S1AP_get_ue_ids(
......@@ -305,7 +306,7 @@ rrc_eNB_S1AP_get_ue_ids(
//------------------------------------------------------------------------------
/*
* TODO
* Remove UE ids (ue_initial_id and S1_id) from hashtables.
*/
void
rrc_eNB_S1AP_remove_ue_ids(
......@@ -789,7 +790,7 @@ void rrc_eNB_send_S1AP_UE_CAPABILITIES_IND(
//------------------------------------------------------------------------------
/*
* TODO
* Initial UE NAS message on S1AP.
*/
void
rrc_eNB_send_S1AP_NAS_FIRST_REQ(
......
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