FlexRAN: Circumvent different RRC/MAC layer user ID sorting

* RRC and MAC might sort users differently
* therefore, we have to "reverse lookup" the MAC ID from the RNTI when filling
  user info
* For this purpose, add RAN API function flexran_get_mac_ue_id_rnti()
This commit is contained in:
Robert Schmidt
2018-12-05 11:46:26 +01:00
parent 8d862dace4
commit 62b89f828a
4 changed files with 22 additions and 3 deletions
+15
View File
@@ -129,6 +129,21 @@ int flexran_get_num_ue_lcs(mid_t mod_id, mid_t ue_id)
return 3;
}
int flexran_get_mac_ue_id_rnti(mid_t mod_id, rnti_t rnti)
{
int n;
if (!mac_is_present(mod_id)) return 0;
/* get the (active) UE with RNTI i */
for (n = 0; n < MAX_MOBILES_PER_ENB; ++n) {
if (RC.mac[mod_id]->UE_list.active[n] == TRUE
&& rnti == UE_RNTI(mod_id, n)) {
return n;
}
}
return 0;
}
int flexran_get_mac_ue_id(mid_t mod_id, int i)
{
int n;