Commit 369e89ee authored by Robert Schmidt's avatar Robert Schmidt

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

parent 89d8afb6
......@@ -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;
......
......@@ -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);
......
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