You are on page 1of 2

lte_enb_as.RB_STATUS_CHECK.

Enter Executives
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56

11:33:54 Nov 09 2011 1/2

/* /* /* /* /* /*

We are in this state, because a self interrupt was scheduled for a radio bearer belonging to some UE. If the bearer is inactive for a certain specified time, it should be released to free up resources in the system. Otherwise, a suitable time is decided to schedule another self interrupt with the same incoming code to make further evaluation of the bearer status.

*/ */ */ */ */ */

/* Get the c_rnti and rb_id. Access the ue_context_ptr and the */ /* appropriate enb_rb_context_ptr from this information. */ rcvd_rnti_int = (intrpt_code >> (LteC_Intrpt_Purpose_Num_Bits + LteC_Intrpt_RB_ID_Num_Bits)); rcvd_rnti = rcvd_rnti_int; rcvd_rb_id = (intrpt_code >> LteC_Intrpt_Purpose_Num_Bits) & 0xFF; ue_context_ptr = lte_enb_as_ue_context_by_rnti_get (&rcvd_rnti); /* /* /* /* if If we did NOT find a ue_context_ptr, abort. This is a serious */ error. If this interrupt was executed, the UE must exist in this */ ENB. If the UE has moved away, this interrupt should have been */ cancelled. */ (ue_context_ptr == PRGC_NIL) { lte_enb_as_error_msg ("Aborting from the ENTER executives of the state RB_STATUS_CHECK of lte_enb_as process", "RB status is being evaluated for a UE that does not exist with this ENB. Check again", OPC_SIM_ERROR_ABORT); } */

/* Access the proper ENB RB context from the rcvd_rb_id. enb_rb_context_ptr = ue_context_ptr->rb_context_ptr_arr [rcvd_rb_id];

/* Decide if this bearer has been inactive for the specified */ /* duration. If so, start deleting it by contacting the EPC. */ if (enb_rb_context_ptr->latest_data_forward_time + admit_control_config_ptr->rb_timeout < op_sim_time () && enb_rb_context_ptr->release_requested == OPC_FALSE) { /* Delete this RB from the admission control module. */ lte_admit_control_support_radio_bearer_remove (admit_control_info_ptr, enb_rb_context_ptr); /* Write appropriate admission control statistics. */ op_stat_write (admitted_ul_gbr_stathandle, (double) (admit_control_info_ptr->admitted_tbps_ul)); op_stat_write (admitted_dl_gbr_stathandle, (double) (admit_control_info_ptr->admitted_tbps_dl)); op_stat_write (num_active_gbr_stathandle, (double) (admit_control_info_ptr->num_active_rbs)); /* Construct an ICI to communicate this deletion to the S1 /* module. ici_to_s1 = op_ici_create ("lte_s1_req"); */ */

/* Set the IMSI field, and the command. */ op_ici_attr_set_int32 (ici_to_s1, "imsi", ue_context_ptr->imsi); op_ici_attr_set_int32 (ici_to_s1, "command", LteC_Release_EPS_Bearer); /* Create a list. Create elements that carry the EPS bearer IDs /* of the preempted elements inside the list. eps_bearer_id_lptr = op_prg_list_create (); /* Only a single RB is released. Create only 1 element and /* insert it into this list. eps_bearer_id_ptr = (int*) op_prg_mem_alloc (sizeof (int)); */ */ */ */

lte_enb_as.RB_STATUS_CHECK.Enter Executives
57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79

11:33:54 Nov 09 2011 2/2

*eps_bearer_id_ptr = rcvd_rb_id - LteC_Num_SRBs; op_prg_list_insert (eps_bearer_id_lptr, eps_bearer_id_ptr, OPC_LISTPOS_TAIL); /* Set the list carrying EPS bearer IDs on the ICI to S1. */ op_ici_attr_set_ptr (ici_to_s1, "eps_bearer_list", eps_bearer_id_lptr); /* Send a remote interrupt to the S1 module with this ICI. op_ici_install (ici_to_s1); op_intrpt_schedule_remote (op_sim_time (), 0, s1_module_id); op_ici_install (OPC_NIL); /* Record that we have started the bearer's release procedure. enb_rb_context_ptr->release_requested = OPC_TRUE; } */

*/

else if (enb_rb_context_ptr->release_requested == OPC_FALSE) { /* Schedule a new self interrupt to evaluate this bearer at a */ /* future time. Add a small guard time of 1 microsecond. */ enb_rb_context_ptr->expiration_evhandle = op_intrpt_schedule_self (admit_control_config_ptr->rb_timeout + enb_rb_context_ptr->latest_data_forward_time + 0.000001, intrpt_code); }

You might also like