Create RAN API flexran_get_num_ue_lcs() [no dedicated bearers detection]

This commit is contained in:
Robert Schmidt
2018-11-07 10:48:35 +01:00
parent 89d8afb612
commit 369e89ee2a
2 changed files with 18 additions and 0 deletions
+14
View File
@@ -114,6 +114,20 @@ int flexran_get_num_ues(mid_t mod_id)
return RC.mac[mod_id]->UE_list.num_UEs;
}
int flexran_get_num_ue_lcs(mid_t mod_id, mid_t ue_id)
{
if (!mac_is_present(mod_id)) return 0;
// Not sure whether this is needed: if (!rrc_is_present(mod_id)) return 0;
const rnti_t rnti = flexran_get_ue_crnti(mod_id, ue_id);
const int s = mac_eNB_get_rrc_status(mod_id, rnti);
if (s < RRC_CONNECTED)
return 0;
else if (s == RRC_CONNECTED)
return 1;
else
return 3;
}
rnti_t flexran_get_ue_crnti(mid_t mod_id, mid_t ue_id)
{
if (!mac_is_present(mod_id)) return 0;
+4
View File
@@ -73,6 +73,10 @@ uint16_t flexran_get_future_sfn_sf(mid_t mod_id, int ahead_of_time);
/* Return the number of attached UEs */
int flexran_get_num_ues(mid_t mod_id);
/* Get the number of logical channels per UE. This function does not consider
* dedicated bearers yet */
int flexran_get_num_ue_lcs(mid_t mod_id, mid_t ue_id);
/* Get the rnti of a UE with id ue_id */
rnti_t flexran_get_ue_crnti(mid_t mod_id, mid_t ue_id);