Commit cdbf65f5 authored by Robert Schmidt's avatar Robert Schmidt

revise RAN API

- when changing values RC.rrc[i]->configuration should be changed too
- then, RRC_RECONFIGURATION_REQ will pass the changed conf down until PHY
- give warnings at functions that are not implemented

- rename functions
flexran_get_tdd_ack_nack_feedback() -> flexran_get_tdd_ack_nack_feedback_mode()
flexran_get_ue_pmi() -> flexran_get_ue_wpmi()
parent 6198a673
...@@ -21,237 +21,196 @@ ...@@ -21,237 +21,196 @@
/*! \file flexran_agent_ran_api.c /*! \file flexran_agent_ran_api.c
* \brief FlexRAN RAN API abstraction * \brief FlexRAN RAN API abstraction
* \author N. Nikaein, X. Foukas and S. SHARIAT BAGHERI * \author N. Nikaein, X. Foukas, S. SHARIAT BAGHERI and R. Schmidt
* \date 2017 * \date 2017
* \version 0.1 * \version 0.1
*/ */
#include "flexran_agent_ran_api.h" #include "flexran_agent_ran_api.h"
/* /*
* generic info from RAN * generic info from RAN
*/ */
PHY_VARS_eNB *phy[NUM_MAX_ENB][MAX_NUM_CCs] = { NULL };
eNB_MAC_INST *mac[NUM_MAX_ENB] = { NULL };
eNB_RRC_INST *rrc[NUM_MAX_ENB] = { NULL };
UE_list_t *UE_list[NUM_MAX_ENB] = { NULL };
void flexran_set_RC_vars(mid_t mod_id, ran_name_t ran)
void * enb[NUM_MAX_ENB];
void * enb_ue[NUM_MAX_ENB];
void * enb_rrc[NUM_MAX_ENB];
Enb_properties_array_t* enb_properties;
void flexran_set_enb_vars(mid_t mod_id, ran_name_t ran){
switch (ran){
case RAN_LTE_OAI :
enb_properties = enb_config_get();
if(eNB_mac_inst == NULL){
enb[mod_id] = NULL;
enb_ue[mod_id] = NULL;
enb_rrc[mod_id] = NULL;
}else{
enb[mod_id] = (void *)&eNB_mac_inst[mod_id];
enb_ue[mod_id] = (void *)&eNB_mac_inst[mod_id].UE_list;
enb_rrc[mod_id] = (void *)&eNB_rrc_inst[mod_id];
}
break;
default :
goto error;
}
return;
error:
LOG_E(FLEXRAN_AGENT, "unknown RAN name %d\n", ran);
}
static int mac_xface_not_ready(void)
{ {
if (mac_xface == NULL) { int i;
return 1; if (ran == RAN_LTE_OAI) {
if (RC.eNB && mod_id < RC.nb_RU && RC.eNB[mod_id] && RC.nb_CC)
for (i = 0; i < *RC.nb_CC; i++)
phy[mod_id][i] = RC.eNB[mod_id][i];
if (RC.mac && mod_id < RC.nb_macrlc_inst && RC.mac[mod_id]) {
mac[mod_id] = RC.mac[mod_id];
UE_list[mod_id] = &RC.mac[mod_id]->UE_list;
}
if (RC.rrc && mod_id < RC.nb_macrlc_inst && RC.rrc[mod_id])
rrc[mod_id] = RC.rrc[mod_id];
} }
else { else {
//printf("max_xface %p %d \n", mac_xface, mac_xface->active); LOG_E(FLEXRAN_AGENT, "unknown RAN name %d when setting RAN API variables\n", ran);
return 0;// !mac_xface->active;
} }
} }
static int eNB_rrc_inst_not_ready(void) uint32_t flexran_get_current_time_ms(mid_t mod_id, int subframe_flag)
{ {
if (NULL == eNB_rrc_inst) { if (!mac[mod_id]) return 0;
return 1; if (subframe_flag == 1)
} return mac[mod_id]->frame*10 + mac[mod_id]->subframe;
else { else
return 0; return mac[mod_id]->frame*10;
}
} }
int flexran_get_current_time_ms (mid_t mod_id, int subframe_flag){ frame_t flexran_get_current_frame(mid_t mod_id)
if (enb[mod_id] == NULL) return 0; {
if (subframe_flag == 1){ if (!mac[mod_id]) return 0;
return ((eNB_MAC_INST *)enb[mod_id])->frame*10 + ((eNB_MAC_INST *)enb[mod_id])->subframe;
}else {
return ((eNB_MAC_INST *)enb[mod_id])->frame*10;
}
}
unsigned int flexran_get_current_frame (mid_t mod_id) {
if (enb[mod_id] == NULL) return 0;
// #warning "SFN will not be in [0-1023] when oaisim is used" // #warning "SFN will not be in [0-1023] when oaisim is used"
return ((eNB_MAC_INST *)enb[mod_id])->frame; return mac[mod_id]->frame;
} }
unsigned int flexran_get_current_system_frame_num(mid_t mod_id) { frame_t flexran_get_current_system_frame_num(mid_t mod_id)
return (flexran_get_current_frame(mod_id) %1024); {
return flexran_get_current_frame(mod_id) % 1024;
} }
unsigned int flexran_get_current_subframe (mid_t mod_id) { sub_frame_t flexran_get_current_subframe(mid_t mod_id)
if (enb[mod_id] == NULL) return 0; {
return ((eNB_MAC_INST *)enb[mod_id])->subframe; if (!mac[mod_id]) return 0;
return mac[mod_id]->subframe;
} }
uint16_t flexran_get_sfn_sf (mid_t mod_id) { /* Why uint16_t, frame_t and sub_frame_t are defined as uint32_t? */
uint16_t flexran_get_sfn_sf(mid_t mod_id)
frame_t frame; {
sub_frame_t subframe; frame_t frame = flexran_get_current_system_frame_num(mod_id);
sub_frame_t subframe = flexran_get_current_subframe(mod_id);
uint16_t sfn_sf, frame_mask, sf_mask; uint16_t sfn_sf, frame_mask, sf_mask;
frame = (frame_t) flexran_get_current_system_frame_num(mod_id); frame_mask = (1 << 12) - 1;
subframe = (sub_frame_t) flexran_get_current_subframe(mod_id); sf_mask = (1 << 4) - 1;
frame_mask = ((1<<12) - 1);
sf_mask = ((1<<4) - 1);
sfn_sf = (subframe & sf_mask) | ((frame & frame_mask) << 4); sfn_sf = (subframe & sf_mask) | ((frame & frame_mask) << 4);
return sfn_sf; return sfn_sf;
} }
uint16_t flexran_get_future_sfn_sf (mid_t mod_id, int ahead_of_time) { uint16_t flexran_get_future_sfn_sf(mid_t mod_id, int ahead_of_time)
{
frame_t frame; frame_t frame = flexran_get_current_system_frame_num(mod_id);
sub_frame_t subframe; sub_frame_t subframe = flexran_get_current_subframe(mod_id);
uint16_t sfn_sf, frame_mask, sf_mask; uint16_t sfn_sf, frame_mask, sf_mask;
int additional_frames;
frame = (frame_t) flexran_get_current_system_frame_num(mod_id); subframe = (subframe + ahead_of_time) % 10;
subframe = (sub_frame_t) flexran_get_current_subframe(mod_id);
subframe = ((subframe + ahead_of_time) % 10);
if (subframe < flexran_get_current_subframe(mod_id)) { if (subframe < flexran_get_current_subframe(mod_id))
frame = (frame + 1) % 1024; frame = (frame + 1) % 1024;
}
int additional_frames = ahead_of_time / 10; additional_frames = ahead_of_time / 10;
frame = (frame + additional_frames) % 1024; frame = (frame + additional_frames) % 1024;
frame_mask = ((1<<12) - 1); frame_mask = (1 << 12) - 1;
sf_mask = ((1<<4) - 1); sf_mask = (1 << 4) - 1;
sfn_sf = (subframe & sf_mask) | ((frame & frame_mask) << 4); sfn_sf = (subframe & sf_mask) | ((frame & frame_mask) << 4);
return sfn_sf; return sfn_sf;
} }
int flexran_get_num_ues (mid_t mod_id){ int flexran_get_num_ues(mid_t mod_id)
if (enb_ue[mod_id] == NULL) return 0; {
return ((UE_list_t *)enb_ue[mod_id])->num_UEs; if (!UE_list[mod_id]) return 0;
return UE_list[mod_id]->num_UEs;
} }
int flexran_get_ue_crnti (mid_t mod_id, mid_t ue_id) { rnti_t flexran_get_ue_crnti(mid_t mod_id, mid_t ue_id)
{
return UE_RNTI(mod_id, ue_id); return UE_RNTI(mod_id, ue_id);
} }
int flexran_get_ue_bsr (mid_t mod_id, mid_t ue_id, lcid_t lcid) { uint8_t flexran_get_ue_bsr(mid_t mod_id, mid_t ue_id, lcid_t lcid)
if (enb_ue[mod_id] == NULL) return 0; {
return ((UE_list_t *)enb_ue[mod_id])->UE_template[UE_PCCID(mod_id,ue_id)][ue_id].bsr_info[lcid]; if (!UE_list[mod_id]) return 0;
return UE_list[mod_id]->UE_template[UE_PCCID(mod_id, ue_id)][ue_id].bsr_info[lcid];
} }
int flexran_get_ue_phr (mid_t mod_id, mid_t ue_id) { int8_t flexran_get_ue_phr(mid_t mod_id, mid_t ue_id)
if (enb_ue[mod_id] == NULL) return 0; {
return ((UE_list_t *)enb_ue[mod_id])->UE_template[UE_PCCID(mod_id,ue_id)][ue_id].phr_info; if (!UE_list[mod_id]) return 0;
return UE_list[mod_id]->UE_template[UE_PCCID(mod_id, ue_id)][ue_id].phr_info;
} }
int flexran_get_ue_wcqi (mid_t mod_id, mid_t ue_id) { uint8_t flexran_get_ue_wcqi(mid_t mod_id, mid_t ue_id)
LTE_eNB_UE_stats *eNB_UE_stats = NULL; {
if (mac_xface_not_ready()) return 0 ; if (!phy[mod_id][0]) return 0;
return phy[mod_id][0]->UE_stats[ue_id].DL_cqi[0];
eNB_UE_stats = mac_xface->get_eNB_UE_stats(mod_id, 0, UE_RNTI(mod_id, ue_id));
return eNB_UE_stats->DL_cqi[0];
// return ((UE_list_t *)enb_ue[mod_id])->eNB_UE_stats[UE_PCCID(mod_id,ue_id)][ue_id].dl_cqi;
} }
int flexran_get_tx_queue_size(mid_t mod_id, mid_t ue_id, logical_chan_id_t channel_id) { rlc_buffer_occupancy_t flexran_get_tx_queue_size(mid_t mod_id, mid_t ue_id, logical_chan_id_t channel_id)
rnti_t rnti = flexran_get_ue_crnti(mod_id,ue_id); {
uint16_t frame = (uint16_t) flexran_get_current_frame(mod_id); rnti_t rnti = flexran_get_ue_crnti(mod_id, ue_id);
uint16_t subframe = (uint16_t) flexran_get_current_subframe(mod_id); frame_t frame = flexran_get_current_frame(mod_id);
sub_frame_t subframe = flexran_get_current_subframe(mod_id);
mac_rlc_status_resp_t rlc_status = mac_rlc_status_ind(mod_id,rnti, mod_id, frame, subframe, ENB_FLAG_YES,MBMS_FLAG_NO, channel_id, 0); mac_rlc_status_resp_t rlc_status = mac_rlc_status_ind(mod_id,rnti, mod_id, frame, subframe, ENB_FLAG_YES,MBMS_FLAG_NO, channel_id, 0);
return rlc_status.bytes_in_buffer; return rlc_status.bytes_in_buffer;
} }
rlc_buffer_occupancy_t flexran_get_num_pdus_buffer(mid_t mod_id, mid_t ue_id, logical_chan_id_t channel_id)
int flexran_get_num_pdus_buffer(mid_t mod_id, mid_t ue_id, logical_chan_id_t channel_id) { {
rnti_t rnti = flexran_get_ue_crnti(mod_id,ue_id); rnti_t rnti = flexran_get_ue_crnti(mod_id,ue_id);
uint16_t frame = (uint16_t) flexran_get_current_frame(mod_id); frame_t frame = flexran_get_current_frame(mod_id);
uint16_t subframe = (uint16_t) flexran_get_current_subframe(mod_id); sub_frame_t subframe = flexran_get_current_subframe(mod_id);
mac_rlc_status_resp_t rlc_status = mac_rlc_status_ind(mod_id,rnti, mod_id, frame, subframe, ENB_FLAG_YES,MBMS_FLAG_NO, channel_id, 0); mac_rlc_status_resp_t rlc_status = mac_rlc_status_ind(mod_id,rnti, mod_id, frame, subframe, ENB_FLAG_YES,MBMS_FLAG_NO, channel_id, 0);
return rlc_status.pdus_in_buffer; return rlc_status.pdus_in_buffer;
} }
frame_t flexran_get_hol_delay(mid_t mod_id, mid_t ue_id, logical_chan_id_t channel_id)
{
int flexran_get_hol_delay(mid_t mod_id, mid_t ue_id, logical_chan_id_t channel_id) {
rnti_t rnti = flexran_get_ue_crnti(mod_id,ue_id); rnti_t rnti = flexran_get_ue_crnti(mod_id,ue_id);
uint16_t frame = (uint16_t) flexran_get_current_frame(mod_id); frame_t frame = flexran_get_current_frame(mod_id);
uint16_t subframe = (uint16_t) flexran_get_current_subframe(mod_id); sub_frame_t subframe = flexran_get_current_subframe(mod_id);
mac_rlc_status_resp_t rlc_status = mac_rlc_status_ind(mod_id, rnti, mod_id, frame, subframe, ENB_FLAG_YES, MBMS_FLAG_NO, channel_id, 0); mac_rlc_status_resp_t rlc_status = mac_rlc_status_ind(mod_id, rnti, mod_id, frame, subframe, ENB_FLAG_YES, MBMS_FLAG_NO, channel_id, 0);
return rlc_status.head_sdu_creation_time; return rlc_status.head_sdu_creation_time;
} }
short flexran_get_TA(mid_t mod_id, mid_t ue_id, int CC_id) { int32_t flexran_get_TA(mid_t mod_id, mid_t ue_id, uint8_t cc_id)
{
// UE_list_t *UE_list=&eNB_mac_inst[mod_id].UE_list; if (!phy[mod_id][cc_id]) return 0;
int rnti;
rnti = flexran_get_ue_crnti(mod_id, ue_id);
if (mac_xface_not_ready()) return 0 ;
LTE_eNB_UE_stats *eNB_UE_stats = mac_xface->get_eNB_UE_stats(mod_id, CC_id, rnti); int32_t tau = phy[mod_id][cc_id]->UE_stats[ue_id].timing_advance_update;
//ue_sched_ctl->ta_timer = 20; // wait 20 subframes before taking TA measurement from PHY switch (flexran_get_N_RB_DL(mod_id, cc_id)) {
switch (flexran_get_N_RB_DL(mod_id, CC_id)) {
case 6: case 6:
return eNB_UE_stats->timing_advance_update; return tau;
case 15: case 15:
return eNB_UE_stats->timing_advance_update/2; return tau / 2;
case 25: case 25:
return eNB_UE_stats->timing_advance_update/4; return tau / 4;
case 50: case 50:
return eNB_UE_stats->timing_advance_update/8; return tau / 8;
case 75: case 75:
return eNB_UE_stats->timing_advance_update/12; return tau / 12;
case 100: case 100:
if (flexran_get_threequarter_fs(mod_id, CC_id) == 0) { if (flexran_get_threequarter_fs(mod_id, cc_id) == 0)
return eNB_UE_stats->timing_advance_update/16; return tau / 16;
} else { else
return eNB_UE_stats->timing_advance_update/12; return tau / 12;
}
default: default:
return 0; return 0;
} }
} }
int flexran_get_ue_pmi(mid_t mod_id){ uint8_t flexran_get_ue_wpmi(mid_t mod_id, mid_t ue_id, uint8_t cc_id)
{
/*Xenofon to check this*/ if (!UE_list[mod_id]) return 0;
return UE_list[mod_id]->UE_sched_ctrl[ue_id].periodic_wideband_pmi[cc_id];
return 0;
} }
/* TODO needs to be revised */
void flexran_update_TA(mid_t mod_id, mid_t ue_id, int CC_id) { void flexran_update_TA(mid_t mod_id, mid_t ue_id, uint8_t cc_id)
{
/*
UE_list_t *UE_list=&eNB_mac_inst[mod_id].UE_list; UE_list_t *UE_list=&eNB_mac_inst[mod_id].UE_list;
UE_sched_ctrl *ue_sched_ctl = &UE_list->UE_sched_ctrl[ue_id]; UE_sched_ctrl *ue_sched_ctl = &UE_list->UE_sched_ctrl[ue_id];
...@@ -268,92 +227,79 @@ void flexran_update_TA(mid_t mod_id, mid_t ue_id, int CC_id) { ...@@ -268,92 +227,79 @@ void flexran_update_TA(mid_t mod_id, mid_t ue_id, int CC_id) {
ue_sched_ctl->ta_timer--; ue_sched_ctl->ta_timer--;
ue_sched_ctl->ta_update = 0; // don't trigger a timing advance command ue_sched_ctl->ta_update = 0; // don't trigger a timing advance command
} }
*/
#warning "Implement flexran_update_TA() in RAN API"
} }
int flexran_get_MAC_CE_bitmap_TA(mid_t mod_id, mid_t ue_id,int CC_id) { /* TODO needs to be revised, looks suspicious: why do we need UE stats? */
int flexran_get_MAC_CE_bitmap_TA(mid_t mod_id, mid_t ue_id, uint8_t cc_id)
// UE_list_t *UE_list = &eNB_mac_inst[mod_id].UE_list; {
#warning "Implement flexran_get_MAC_CE_bitmap_TA() in RAN API"
rnti_t rnti = flexran_get_ue_crnti(mod_id,ue_id); if (!phy[mod_id][cc_id]) return 0;
if (mac_xface_not_ready()) return 0 ;
/* UE_stats can not be null, they are an array in RC
LTE_eNB_UE_stats *eNB_UE_stats = mac_xface->get_eNB_UE_stats(mod_id,CC_id,rnti); LTE_eNB_UE_stats *eNB_UE_stats = mac_xface->get_eNB_UE_stats(mod_id,CC_id,rnti);
if (eNB_UE_stats == NULL) { if (eNB_UE_stats == NULL) {
return 0; return 0;
} }
*/
if (flexran_get_TA(mod_id, ue_id, CC_id) != 0) { if (flexran_get_TA(mod_id, ue_id, cc_id) != 0) {
return PROTOCOL__FLEX_CE_TYPE__FLPCET_TA; return PROTOCOL__FLEX_CE_TYPE__FLPCET_TA;
} else { } else {
return 0; return 0;
} }
} }
int flexran_get_active_CC(mid_t mod_id, mid_t ue_id) { int flexran_get_active_CC(mid_t mod_id, mid_t ue_id)
if (enb_ue[mod_id] == NULL) return 0; {
return ((UE_list_t *)enb_ue[mod_id])->numactiveCCs[ue_id]; if (!UE_list[mod_id]) return 0;
return UE_list[mod_id]->numactiveCCs[ue_id];
} }
int flexran_get_current_RI(mid_t mod_id, mid_t ue_id, int CC_id) { uint8_t flexran_get_current_RI(mid_t mod_id, mid_t ue_id, uint8_t cc_id)
LTE_eNB_UE_stats *eNB_UE_stats = NULL; {
if (mac_xface_not_ready()) return 0 ; if (!phy[mod_id][cc_id]) return 0;
return phy[mod_id][cc_id]->UE_stats[ue_id].rank;
rnti_t rnti = flexran_get_ue_crnti(mod_id,ue_id);
eNB_UE_stats = mac_xface->get_eNB_UE_stats(mod_id,CC_id,rnti);
if (eNB_UE_stats == NULL) {
return 0;
}
return eNB_UE_stats[CC_id].rank;
} }
int flexran_get_tpc(mid_t mod_id, mid_t ue_id) { int flexran_get_tpc(mid_t mod_id, mid_t ue_id, uint8_t cc_id)
LTE_eNB_UE_stats *eNB_UE_stats = NULL; {
int32_t normalized_rx_power, target_rx_power; if (!phy[mod_id][cc_id]) return 0;
int tpc = 1;
/* before: tested that UL_rssi != NULL and set parameter ([0]), but it is a
* static array -> target_rx_power is useless in old ifs?! */
int pCCid = UE_PCCID(mod_id,ue_id); int pCCid = UE_PCCID(mod_id,ue_id);
rnti_t rnti = flexran_get_ue_crnti(mod_id,ue_id); int32_t target_rx_power = phy[mod_id][pCCid]->frame_parms.ul_power_control_config_common.p0_NominalPUSCH;
if (mac_xface_not_ready()) return 0 ; int32_t normalized_rx_power = phy[mod_id][cc_id]->UE_stats[ue_id].UL_rssi[0];
eNB_UE_stats = mac_xface->get_eNB_UE_stats(mod_id, pCCid, rnti); int tpc;
if (normalized_rx_power > target_rx_power + 1)
target_rx_power = mac_xface->get_target_pusch_rx_power(mod_id,pCCid);
if (eNB_UE_stats == NULL) {
normalized_rx_power = target_rx_power;
} else if (eNB_UE_stats->UL_rssi != NULL) {
normalized_rx_power = eNB_UE_stats->UL_rssi[0];
} else {
normalized_rx_power = target_rx_power;
}
if (normalized_rx_power>(target_rx_power+1)) {
tpc = 0; //-1 tpc = 0; //-1
} else if (normalized_rx_power<(target_rx_power-1)) { else if (normalized_rx_power < target_rx_power - 1)
tpc = 2; //+1 tpc = 2; //+1
} else { else
tpc = 1; //0 tpc = 1; //0
}
return tpc; return tpc;
} }
int flexran_get_harq(const mid_t mod_id, int flexran_get_harq(mid_t mod_id,
const uint8_t CC_id, uint8_t cc_id,
const mid_t ue_id, mid_t ue_id,
const int frame, frame_t frame,
const uint8_t subframe, sub_frame_t subframe,
uint8_t *pid, uint8_t *pid,
uint8_t *round, uint8_t *round,
const uint8_t harq_flag) { //flag_id_status = 0 then id, else status uint8_t harq_flag)
/*TODO: Add int TB in function parameters to get the status of the second TB. This can be done to by editing in {
* get_ue_active_harq_pid function in line 272 file: phy_procedures_lte_eNB.c to add /* TODO: Add int TB in function parameters to get the status of the second
* DLSCH_ptr = PHY_vars_eNB_g[Mod_id][CC_id]->dlsch_eNB[(uint32_t)UE_id][1];*/ * TB. This can be done to by editing in get_ue_active_harq_pid function in
* line 272 file: phy_procedures_lte_eNB.c to add DLSCH_ptr =
* PHY_vars_eNB_g[Mod_id][CC_id]->dlsch_eNB[(uint32_t)UE_id][1];*/
/* TODO IMPLEMENT */
/*
uint8_t harq_pid; uint8_t harq_pid;
uint8_t harq_round; uint8_t harq_round;
...@@ -375,61 +321,39 @@ int flexran_get_harq(const mid_t mod_id, ...@@ -375,61 +321,39 @@ int flexran_get_harq(const mid_t mod_id,
*pid = harq_pid; *pid = harq_pid;
*round = harq_round; *round = harq_round;*/
/* if (round > 0) { */ /* if (round > 0) { */
/* *status = 1; */ /* *status = 1; */
/* } else { */ /* } else { */
/* *status = 0; */ /* *status = 0; */
/* } */ /* } */
/*return *round;*/
/* return 0; */ #warning "Implement flexran_get_harq() in RAN API"
return *round; return 0;
} }
int flexran_get_p0_pucch_dbm(mid_t mod_id, mid_t ue_id, int CC_id) { int32_t flexran_get_p0_pucch_dbm(mid_t mod_id, mid_t ue_id, uint8_t cc_id)
LTE_eNB_UE_stats *eNB_UE_stats = NULL; {
uint32_t rnti = flexran_get_ue_crnti(mod_id,ue_id); if (!phy[mod_id][cc_id]) return 0;
if (mac_xface_not_ready()) return 0 ; return phy[mod_id][cc_id]->UE_stats[ue_id].Po_PUCCH_dBm;
eNB_UE_stats = mac_xface->get_eNB_UE_stats(mod_id, CC_id, rnti);
if (eNB_UE_stats == NULL) {
return -1;
}
// if(eNB_UE_stats->Po_PUCCH_update == 1) {
return eNB_UE_stats->Po_PUCCH_dBm;
//}
//else
// return -1;
} }
int flexran_get_p0_nominal_pucch(mid_t mod_id, int CC_id) { int8_t flexran_get_p0_nominal_pucch(mid_t mod_id, uint8_t cc_id)
if (mac_xface_not_ready()) return 0 ; {
if (!phy[mod_id][cc_id]) return 0;
int32_t pucch_rx_received = mac_xface->get_target_pucch_rx_power(mod_id, CC_id); return phy[mod_id][cc_id]->frame_parms.ul_power_control_config_common.p0_NominalPUCCH;
return pucch_rx_received;
} }
int flexran_get_p0_pucch_status(mid_t mod_id, mid_t ue_id, int CC_id) { int32_t flexran_get_p0_pucch_status(mid_t mod_id, mid_t ue_id, uint8_t cc_id)
if (mac_xface_not_ready()) return 0 ; {
if (!phy[mod_id][cc_id]) return 0;
LTE_eNB_UE_stats *eNB_UE_stats = NULL; return phy[mod_id][cc_id]->UE_stats[ue_id].Po_PUCCH_update;
uint32_t rnti = flexran_get_ue_crnti(mod_id,ue_id);
eNB_UE_stats = mac_xface->get_eNB_UE_stats(mod_id, CC_id, rnti);
return eNB_UE_stats->Po_PUCCH_update;
} }
int flexran_update_p0_pucch(mid_t mod_id, mid_t ue_id, int CC_id) { int flexran_update_p0_pucch(mid_t mod_id, mid_t ue_id, uint8_t cc_id)
if (mac_xface_not_ready()) return 0 ; {
if (!phy[mod_id][cc_id]) return 0;
LTE_eNB_UE_stats *eNB_UE_stats = NULL; phy[mod_id][cc_id]->UE_stats[ue_id].Po_PUCCH_update = 0;
uint32_t rnti = flexran_get_ue_crnti(mod_id,ue_id);
eNB_UE_stats = mac_xface->get_eNB_UE_stats(mod_id, CC_id, rnti);
eNB_UE_stats->Po_PUCCH_update = 0;
return 0; return 0;
} }
...@@ -439,243 +363,206 @@ int flexran_update_p0_pucch(mid_t mod_id, mid_t ue_id, int CC_id) { ...@@ -439,243 +363,206 @@ int flexran_update_p0_pucch(mid_t mod_id, mid_t ue_id, int CC_id) {
* Get Messages for eNB Configuration Reply * Get Messages for eNB Configuration Reply
* ************************************ * ************************************
*/ */
int flexran_get_threequarter_fs(mid_t mod_id, int CC_id) { uint8_t flexran_get_threequarter_fs(mid_t mod_id, uint8_t cc_id)
LTE_DL_FRAME_PARMS *frame_parms; {
if (mac_xface_not_ready()) return 0 ; if (!phy[mod_id][cc_id]) return 0;
return phy[mod_id][cc_id]->frame_parms.threequarter_fs;
frame_parms = mac_xface->get_lte_frame_parms(mod_id, CC_id);
return frame_parms->threequarter_fs;
} }
int flexran_get_hopping_offset(mid_t mod_id, int CC_id) { uint8_t flexran_get_hopping_offset(mid_t mod_id, uint8_t cc_id)
LTE_DL_FRAME_PARMS *frame_parms; {
if (mac_xface_not_ready()) return 0 ; if (!phy[mod_id][cc_id]) return 0;
return phy[mod_id][cc_id]->frame_parms.pusch_config_common.pusch_HoppingOffset;
frame_parms = mac_xface->get_lte_frame_parms(mod_id, CC_id);
return frame_parms->pusch_config_common.pusch_HoppingOffset;
} }
int flexran_get_hopping_mode(mid_t mod_id, int CC_id) { PUSCH_HOPPING_t flexran_get_hopping_mode(mid_t mod_id, uint8_t cc_id)
LTE_DL_FRAME_PARMS *frame_parms; {
if (mac_xface_not_ready()) return 0 ; if (!phy[mod_id][cc_id]) return 0;
return phy[mod_id][cc_id]->frame_parms.pusch_config_common.hoppingMode;
frame_parms = mac_xface->get_lte_frame_parms(mod_id, CC_id);
return frame_parms->pusch_config_common.hoppingMode;
} }
int flexran_get_n_SB(mid_t mod_id, int CC_id) { uint8_t flexran_get_n_SB(mid_t mod_id, uint8_t cc_id)
LTE_DL_FRAME_PARMS *frame_parms; {
if (mac_xface_not_ready()) return 0 ; if (!phy[mod_id][cc_id]) return 0;
return phy[mod_id][cc_id]->frame_parms.pusch_config_common.n_SB;
frame_parms = mac_xface->get_lte_frame_parms(mod_id, CC_id);
return frame_parms->pusch_config_common.n_SB;
} }
int flexran_get_enable64QAM(mid_t mod_id, int CC_id) { uint8_t flexran_get_enable64QAM(mid_t mod_id, uint8_t cc_id)
LTE_DL_FRAME_PARMS *frame_parms; {
if (mac_xface_not_ready()) return 0 ; if (!phy[mod_id][cc_id]) return 0;
return phy[mod_id][cc_id]->frame_parms.pusch_config_common.enable64QAM;
frame_parms = mac_xface->get_lte_frame_parms(mod_id, CC_id);
return frame_parms->pusch_config_common.enable64QAM;
} }
int flexran_get_phich_duration(mid_t mod_id, int CC_id) { PHICH_DURATION_t flexran_get_phich_duration(mid_t mod_id, uint8_t cc_id)
LTE_DL_FRAME_PARMS *frame_parms; {
if (mac_xface_not_ready()) return 0 ; if (!phy[mod_id][cc_id]) return 0;
return phy[mod_id][cc_id]->frame_parms.phich_config_common.phich_duration;
frame_parms = mac_xface->get_lte_frame_parms(mod_id, CC_id);
return frame_parms->phich_config_common.phich_duration;
} }
int flexran_get_phich_resource(mid_t mod_id, int CC_id) { int flexran_get_phich_resource(mid_t mod_id, uint8_t cc_id)
LTE_DL_FRAME_PARMS *frame_parms; {
if (mac_xface_not_ready()) return 0 ; if (!phy[mod_id][cc_id]) return 0;
/* TODO why don't we return phich_resource? */
frame_parms = mac_xface->get_lte_frame_parms(mod_id, CC_id); switch (phy[mod_id][cc_id]->frame_parms.phich_config_common.phich_resource) {
if(frame_parms->phich_config_common.phich_resource == oneSixth) case oneSixth:
return 0; return 0;
else if(frame_parms->phich_config_common.phich_resource == half) case half:
return 1; return 1;
else if(frame_parms->phich_config_common.phich_resource == one) case one:
return 2; return 2;
else if(frame_parms->phich_config_common.phich_resource == two) case two:
return 3; return 3;
default:
return -1; return -1;
}
} }
int flexran_get_n1pucch_an(mid_t mod_id, int CC_id) { uint16_t flexran_get_n1pucch_an(mid_t mod_id, uint8_t cc_id)
LTE_DL_FRAME_PARMS *frame_parms; {
if (mac_xface_not_ready()) return 0 ; if (!phy[mod_id][cc_id]) return 0;
return phy[mod_id][cc_id]->frame_parms.pucch_config_common.n1PUCCH_AN;
frame_parms = mac_xface->get_lte_frame_parms(mod_id, CC_id);
return frame_parms->pucch_config_common.n1PUCCH_AN;
} }
int flexran_get_nRB_CQI(mid_t mod_id, int CC_id) { uint8_t flexran_get_nRB_CQI(mid_t mod_id, uint8_t cc_id)
LTE_DL_FRAME_PARMS *frame_parms; {
if (mac_xface_not_ready()) return 0 ; if (!phy[mod_id][cc_id]) return 0;
return phy[mod_id][cc_id]->frame_parms.pucch_config_common.nRB_CQI;
frame_parms = mac_xface->get_lte_frame_parms(mod_id, CC_id);
return frame_parms->pucch_config_common.nRB_CQI;
} }
int flexran_get_deltaPUCCH_Shift(mid_t mod_id, int CC_id) { uint8_t flexran_get_deltaPUCCH_Shift(mid_t mod_id, uint8_t cc_id)
LTE_DL_FRAME_PARMS *frame_parms; {
if (mac_xface_not_ready()) return 0 ; if (!phy[mod_id][cc_id]) return 0;
return phy[mod_id][cc_id]->frame_parms.pucch_config_common.deltaPUCCH_Shift;
frame_parms = mac_xface->get_lte_frame_parms(mod_id, CC_id);
return frame_parms->pucch_config_common.deltaPUCCH_Shift;
} }
int flexran_get_prach_ConfigIndex(mid_t mod_id, int CC_id) { uint8_t flexran_get_prach_ConfigIndex(mid_t mod_id, uint8_t cc_id)
LTE_DL_FRAME_PARMS *frame_parms; {
if (mac_xface_not_ready()) return 0 ; if (!phy[mod_id][cc_id]) return 0;
return phy[mod_id][cc_id]->frame_parms.prach_config_common.prach_ConfigInfo.prach_ConfigIndex;
frame_parms = mac_xface->get_lte_frame_parms(mod_id, CC_id);
return frame_parms->prach_config_common.prach_ConfigInfo.prach_ConfigIndex;
} }
int flexran_get_prach_FreqOffset(mid_t mod_id, int CC_id) { uint8_t flexran_get_prach_FreqOffset(mid_t mod_id, uint8_t cc_id)
LTE_DL_FRAME_PARMS *frame_parms; {
if (mac_xface_not_ready()) return 0 ; if (!phy[mod_id][cc_id]) return 0;
return phy[mod_id][cc_id]->frame_parms.prach_config_common.prach_ConfigInfo.prach_FreqOffset;
frame_parms = mac_xface->get_lte_frame_parms(mod_id, CC_id);
return frame_parms->prach_config_common.prach_ConfigInfo.prach_FreqOffset;
} }
int flexran_get_maxHARQ_Msg3Tx(mid_t mod_id, int CC_id) { uint8_t flexran_get_maxHARQ_Msg3Tx(mid_t mod_id, uint8_t cc_id)
LTE_DL_FRAME_PARMS *frame_parms; {
if (mac_xface_not_ready()) return 0 ; if (!phy[mod_id][cc_id]) return 0;
return phy[mod_id][cc_id]->frame_parms.maxHARQ_Msg3Tx;
frame_parms = mac_xface->get_lte_frame_parms(mod_id, CC_id);
return frame_parms->maxHARQ_Msg3Tx;
} }
int flexran_get_ul_cyclic_prefix_length(mid_t mod_id, int CC_id) { lte_prefix_type_t flexran_get_ul_cyclic_prefix_length(mid_t mod_id, uint8_t cc_id)
LTE_DL_FRAME_PARMS *frame_parms; {
if (mac_xface_not_ready()) return 0 ; if (!phy[mod_id][cc_id]) return 0;
return phy[mod_id][cc_id]->frame_parms.Ncp_UL;
frame_parms = mac_xface->get_lte_frame_parms(mod_id, CC_id);
return frame_parms->Ncp_UL;
} }
int flexran_get_dl_cyclic_prefix_length(mid_t mod_id, int CC_id) { lte_prefix_type_t flexran_get_dl_cyclic_prefix_length(mid_t mod_id, uint8_t cc_id)
LTE_DL_FRAME_PARMS *frame_parms; {
if (mac_xface_not_ready()) return 0 ; if (!phy[mod_id][cc_id]) return 0;
return phy[mod_id][cc_id]->frame_parms.Ncp;
frame_parms = mac_xface->get_lte_frame_parms(mod_id, CC_id);
return frame_parms->Ncp;
} }
int flexran_get_cell_id(mid_t mod_id, int CC_id) { uint16_t flexran_get_cell_id(mid_t mod_id, uint8_t cc_id)
LTE_DL_FRAME_PARMS *frame_parms; {
if (!phy[mod_id][cc_id]) return 0;
if (mac_xface_not_ready()) return 0; return phy[mod_id][cc_id]->frame_parms.Nid_cell;
frame_parms = mac_xface->get_lte_frame_parms(mod_id, CC_id);
return frame_parms->Nid_cell;
} }
int flexran_get_srs_BandwidthConfig(mid_t mod_id, int CC_id) { uint8_t flexran_get_srs_BandwidthConfig(mid_t mod_id, uint8_t cc_id)
LTE_DL_FRAME_PARMS *frame_parms; {
if (mac_xface_not_ready()) return 0 ; if (!phy[mod_id][cc_id]) return 0;
return phy[mod_id][cc_id]->frame_parms.soundingrs_ul_config_common.srs_BandwidthConfig;
frame_parms = mac_xface->get_lte_frame_parms(mod_id, CC_id);
return frame_parms->soundingrs_ul_config_common.srs_BandwidthConfig;
} }
int flexran_get_srs_SubframeConfig(mid_t mod_id, int CC_id) { uint8_t flexran_get_srs_SubframeConfig(mid_t mod_id, uint8_t cc_id)
LTE_DL_FRAME_PARMS *frame_parms; {
if (mac_xface_not_ready()) return 0 ; if (!phy[mod_id][cc_id]) return 0;
return phy[mod_id][cc_id]->frame_parms.soundingrs_ul_config_common.srs_SubframeConfig;
frame_parms = mac_xface->get_lte_frame_parms(mod_id, CC_id);
return frame_parms->soundingrs_ul_config_common.srs_SubframeConfig;
} }
int flexran_get_srs_MaxUpPts(mid_t mod_id, int CC_id) { uint8_t flexran_get_srs_MaxUpPts(mid_t mod_id, uint8_t cc_id)
LTE_DL_FRAME_PARMS *frame_parms; {
if (mac_xface_not_ready()) return 0 ; if (!phy[mod_id][cc_id]) return 0;
return phy[mod_id][cc_id]->frame_parms.soundingrs_ul_config_common.srs_MaxUpPts;
frame_parms = mac_xface->get_lte_frame_parms(mod_id, CC_id);
return frame_parms->soundingrs_ul_config_common.srs_MaxUpPts;
} }
int flexran_get_N_RB_DL(mid_t mod_id, int CC_id) { uint8_t flexran_get_N_RB_DL(mid_t mod_id, uint8_t cc_id)
LTE_DL_FRAME_PARMS *frame_parms; {
if (mac_xface_not_ready()) return 0 ; if (!phy[mod_id][cc_id]) return 0;
return phy[mod_id][cc_id]->frame_parms.N_RB_DL;
frame_parms = mac_xface->get_lte_frame_parms(mod_id, CC_id);
return frame_parms->N_RB_DL;
} }
int flexran_get_N_RB_UL(mid_t mod_id, int CC_id) { uint8_t flexran_get_N_RB_UL(mid_t mod_id, uint8_t cc_id)
LTE_DL_FRAME_PARMS *frame_parms; {
if (mac_xface_not_ready()) return 0 ; if (!phy[mod_id][cc_id]) return 0;
return phy[mod_id][cc_id]->frame_parms.N_RB_UL;
frame_parms = mac_xface->get_lte_frame_parms(mod_id, CC_id);
return frame_parms->N_RB_UL;
} }
int flexran_get_N_RBG(mid_t mod_id, int CC_id) { uint8_t flexran_get_N_RBG(mid_t mod_id, uint8_t cc_id)
LTE_DL_FRAME_PARMS *frame_parms; {
if (mac_xface_not_ready()) return 0 ; if (!phy[mod_id][cc_id]) return 0;
return phy[mod_id][cc_id]->frame_parms.N_RBG;
frame_parms = mac_xface->get_lte_frame_parms(mod_id, CC_id);
return frame_parms->N_RBG;
} }
int flexran_get_subframe_assignment(mid_t mod_id, int CC_id) { uint8_t flexran_get_subframe_assignment(mid_t mod_id, uint8_t cc_id)
LTE_DL_FRAME_PARMS *frame_parms; {
if (mac_xface_not_ready()) return 0 ; if (!phy[mod_id][cc_id]) return 0;
return phy[mod_id][cc_id]->frame_parms.tdd_config;
frame_parms = mac_xface->get_lte_frame_parms(mod_id, CC_id);
return frame_parms->tdd_config;
} }
int flexran_get_special_subframe_assignment(mid_t mod_id, int CC_id) { uint8_t flexran_get_special_subframe_assignment(mid_t mod_id, uint8_t cc_id)
LTE_DL_FRAME_PARMS *frame_parms; {
if (mac_xface_not_ready()) return 0 ; if (!phy[mod_id][cc_id]) return 0;
return phy[mod_id][cc_id]->frame_parms.tdd_config_S;
frame_parms = mac_xface->get_lte_frame_parms(mod_id, CC_id);
return (frame_parms == NULL)? 0:frame_parms->tdd_config_S;
} }
int flexran_get_ra_ResponseWindowSize(mid_t mod_id, int CC_id) { long flexran_get_ra_ResponseWindowSize(mid_t mod_id, uint8_t cc_id)
return enb_config_get()->properties[mod_id]->rach_raResponseWindowSize[CC_id]; {
if (!rrc[mod_id]) return 0;
return rrc[mod_id]->configuration.rach_raResponseWindowSize[cc_id];
} }
int flexran_get_mac_ContentionResolutionTimer(mid_t mod_id, int CC_id) { long flexran_get_mac_ContentionResolutionTimer(mid_t mod_id, uint8_t cc_id)
return enb_config_get()->properties[mod_id]->rach_macContentionResolutionTimer[CC_id]; {
if (!rrc[mod_id]) return 0;
return rrc[mod_id]->configuration.rach_macContentionResolutionTimer[cc_id];
} }
int flexran_get_duplex_mode(mid_t mod_id, int CC_id) { Protocol__FlexDuplexMode flexran_get_duplex_mode(mid_t mod_id, uint8_t cc_id)
LTE_DL_FRAME_PARMS *frame_parms; {
if (mac_xface_not_ready()) return 0 ; if (!phy[mod_id][cc_id]) return 0;
switch (phy[mod_id][cc_id]->frame_parms.frame_type) {
frame_parms = mac_xface->get_lte_frame_parms(mod_id, CC_id); case TDD:
if (frame_parms == NULL) return -1;
if(frame_parms->frame_type == TDD)
return PROTOCOL__FLEX_DUPLEX_MODE__FLDM_TDD; return PROTOCOL__FLEX_DUPLEX_MODE__FLDM_TDD;
else if (frame_parms->frame_type == FDD) case FDD:
return PROTOCOL__FLEX_DUPLEX_MODE__FLDM_FDD; return PROTOCOL__FLEX_DUPLEX_MODE__FLDM_FDD;
default:
return -1; return -1;
}
} }
long flexran_get_si_window_length(mid_t mod_id, int CC_id) { long flexran_get_si_window_length(mid_t mod_id, uint8_t cc_id)
return ((eNB_RRC_INST *)enb_rrc[mod_id])->carrier[CC_id].sib1->si_WindowLength; {
if (!rrc[mod_id] || !rrc[mod_id]->carrier[cc_id].sib1) return 0;
return rrc[mod_id]->carrier[cc_id].sib1->si_WindowLength;
} }
int flexran_get_sib1_length(mid_t mod_id, int CC_id) { uint8_t flexran_get_sib1_length(mid_t mod_id, uint8_t cc_id)
return ((eNB_RRC_INST *)enb_rrc[mod_id])->carrier[CC_id].sizeof_SIB1; {
if (!rrc[mod_id]) return 0;
return rrc[mod_id]->carrier[cc_id].sizeof_SIB1;
} }
int flexran_get_num_pdcch_symb(mid_t mod_id, int CC_id) { uint8_t flexran_get_num_pdcch_symb(mid_t mod_id, uint8_t cc_id) {
/* TODO: This should return the number of PDCCH symbols initially used by the cell CC_id */ /* TODO: This should return the number of PDCCH symbols initially used by the
return 0; * cell cc_id -> is the correction right? */
//(PHY_vars_UE_g[mod_id][CC_id]->lte_ue_pdcch_vars[mod_id]->num_pdcch_symbols); if (!phy[mod_id][cc_id]) return 0;
return phy[mod_id][cc_id]->pdcch_vars[0].num_pdcch_symbols;
//(PHY_vars_UE_g[mod_id][cc_id]->lte_ue_pdcch_vars[mod_id]->num_pdcch_symbols);
} }
...@@ -687,98 +574,86 @@ int flexran_get_num_pdcch_symb(mid_t mod_id, int CC_id) { ...@@ -687,98 +574,86 @@ int flexran_get_num_pdcch_symb(mid_t mod_id, int CC_id) {
*/ */
int flexran_get_time_alignment_timer(mid_t mod_id, mid_t ue_id) { TimeAlignmentTimer_t flexran_get_time_alignment_timer(mid_t mod_id, mid_t ue_id)
struct rrc_eNB_ue_context_s* ue_context_p = NULL; {
uint32_t rntiP = flexran_get_ue_crnti(mod_id,ue_id); if (!rrc[mod_id]) return -1;
if (eNB_rrc_inst_not_ready()) return -1; rnti_t rnti = flexran_get_ue_crnti(mod_id,ue_id);
struct rrc_eNB_ue_context_s* ue_context_p = rrc_eNB_get_ue_context(rrc[mod_id], rnti);
ue_context_p = rrc_eNB_get_ue_context(&eNB_rrc_inst[mod_id],rntiP); if (!ue_context_p) return -1;
if(ue_context_p != NULL) { if (!ue_context_p->ue_context.mac_MainConfig) return -1;
if(ue_context_p->ue_context.mac_MainConfig != NULL) {
return ue_context_p->ue_context.mac_MainConfig->timeAlignmentTimerDedicated; return ue_context_p->ue_context.mac_MainConfig->timeAlignmentTimerDedicated;
} else {
return -1;
}
} else {
return -1;
}
} }
int flexran_get_meas_gap_config(mid_t mod_id, mid_t ue_id) { Protocol__FlexMeasGapConfigPattern flexran_get_meas_gap_config(mid_t mod_id, mid_t ue_id)
struct rrc_eNB_ue_context_s* ue_context_p = NULL; {
uint32_t rntiP = flexran_get_ue_crnti(mod_id,ue_id); if (!rrc[mod_id]) return -1;
if (eNB_rrc_inst_not_ready()) return -1; rnti_t rnti = flexran_get_ue_crnti(mod_id,ue_id);
struct rrc_eNB_ue_context_s* ue_context_p = rrc_eNB_get_ue_context(rrc[mod_id], rnti);
ue_context_p = rrc_eNB_get_ue_context(&eNB_rrc_inst[mod_id],rntiP); if (!ue_context_p) return -1;
if(ue_context_p != NULL) { if (!ue_context_p->ue_context.measGapConfig) return -1;
if(ue_context_p->ue_context.measGapConfig != NULL) { if (ue_context_p->ue_context.measGapConfig->present != MeasGapConfig_PR_setup) return -1;
if(ue_context_p->ue_context.measGapConfig->present == MeasGapConfig_PR_setup) { switch (ue_context_p->ue_context.measGapConfig->choice.setup.gapOffset.present) {
if (ue_context_p->ue_context.measGapConfig->choice.setup.gapOffset.present == MeasGapConfig__setup__gapOffset_PR_gp0) { case MeasGapConfig__setup__gapOffset_PR_gp0:
return PROTOCOL__FLEX_MEAS_GAP_CONFIG_PATTERN__FLMGCP_GP1; return PROTOCOL__FLEX_MEAS_GAP_CONFIG_PATTERN__FLMGCP_GP1;
} else if (ue_context_p->ue_context.measGapConfig->choice.setup.gapOffset.present == MeasGapConfig__setup__gapOffset_PR_gp1) { case MeasGapConfig__setup__gapOffset_PR_gp1:
return PROTOCOL__FLEX_MEAS_GAP_CONFIG_PATTERN__FLMGCP_GP2; return PROTOCOL__FLEX_MEAS_GAP_CONFIG_PATTERN__FLMGCP_GP2;
} else { default:
return PROTOCOL__FLEX_MEAS_GAP_CONFIG_PATTERN__FLMGCP_OFF; return PROTOCOL__FLEX_MEAS_GAP_CONFIG_PATTERN__FLMGCP_OFF;
} }
}
}
}
return -1;
} }
int flexran_get_meas_gap_config_offset(mid_t mod_id, mid_t ue_id) { long flexran_get_meas_gap_config_offset(mid_t mod_id, mid_t ue_id)
struct rrc_eNB_ue_context_s* ue_context_p = NULL; {
uint32_t rntiP = flexran_get_ue_crnti(mod_id,ue_id); if (!rrc[mod_id]) return -1;
if (eNB_rrc_inst_not_ready()) return -1;
ue_context_p = rrc_eNB_get_ue_context(&eNB_rrc_inst[mod_id],rntiP); rnti_t rnti = flexran_get_ue_crnti(mod_id,ue_id);
struct rrc_eNB_ue_context_s* ue_context_p = rrc_eNB_get_ue_context(rrc[mod_id], rnti);
if(ue_context_p != NULL) { if (!ue_context_p) return -1;
if(ue_context_p->ue_context.measGapConfig != NULL){ if (!ue_context_p->ue_context.measGapConfig) return -1;
if(ue_context_p->ue_context.measGapConfig->present == MeasGapConfig_PR_setup) { if (ue_context_p->ue_context.measGapConfig->present != MeasGapConfig_PR_setup) return -1;
if (ue_context_p->ue_context.measGapConfig->choice.setup.gapOffset.present == MeasGapConfig__setup__gapOffset_PR_gp0) { switch (ue_context_p->ue_context.measGapConfig->choice.setup.gapOffset.present) {
case MeasGapConfig__setup__gapOffset_PR_gp0:
return ue_context_p->ue_context.measGapConfig->choice.setup.gapOffset.choice.gp0; return ue_context_p->ue_context.measGapConfig->choice.setup.gapOffset.choice.gp0;
} else if (ue_context_p->ue_context.measGapConfig->choice.setup.gapOffset.present == MeasGapConfig__setup__gapOffset_PR_gp1) { case MeasGapConfig__setup__gapOffset_PR_gp1:
return ue_context_p->ue_context.measGapConfig->choice.setup.gapOffset.choice.gp0; return ue_context_p->ue_context.measGapConfig->choice.setup.gapOffset.choice.gp1;
} default:
}
}
}
return -1; return -1;
}
} }
/* TODO is there a reason we take the RNTI and not the UE ID? */
/* TODO return type is unsigned, so we cannot return -1 in case of error! */
uint8_t flexran_get_rrc_status(mid_t mod_id, rnti_t rnti)
{
if (!rrc[mod_id]) return 0;
int flexran_get_rrc_status(const mid_t mod_id, const rnti_t rntiP){ struct rrc_eNB_ue_context_s* ue_context_p = rrc_eNB_get_ue_context(rrc[mod_id], rnti);
struct rrc_eNB_ue_context_s* ue_context_p = NULL;
if (eNB_rrc_inst_not_ready()) return -1;
ue_context_p = rrc_eNB_get_ue_context(&eNB_rrc_inst[mod_id],rntiP);
if (ue_context_p != NULL) {
return(ue_context_p->ue_context.Status);
} else {
return RRC_INACTIVE;
}
if (!ue_context_p) return RRC_INACTIVE;
return ue_context_p->ue_context.Status;
} }
int flexran_get_ue_aggregated_max_bitrate_dl (mid_t mod_id, mid_t ue_id) { uint64_t flexran_get_ue_aggregated_max_bitrate_dl(mid_t mod_id, mid_t ue_id)
if (enb_ue[mod_id] == NULL) return 0; {
return ((UE_list_t *)enb_ue[mod_id])->UE_sched_ctrl[ue_id].ue_AggregatedMaximumBitrateDL; if (!UE_list[mod_id]) return 0;
return UE_list[mod_id]->UE_sched_ctrl[ue_id].ue_AggregatedMaximumBitrateDL;
} }
int flexran_get_ue_aggregated_max_bitrate_ul (mid_t mod_id, mid_t ue_id) { uint64_t flexran_get_ue_aggregated_max_bitrate_ul(mid_t mod_id, mid_t ue_id)
if (enb_ue[mod_id] == NULL) return 0; {
return ((UE_list_t *)enb_ue[mod_id])->UE_sched_ctrl[ue_id].ue_AggregatedMaximumBitrateUL; if (!UE_list[mod_id]) return 0;
return UE_list[mod_id]->UE_sched_ctrl[ue_id].ue_AggregatedMaximumBitrateUL;
} }
int flexran_get_half_duplex(mid_t ue_id) { int flexran_get_half_duplex(mid_t ue_id)
{
#warning "Implement flexran_get_half_duplex() in RAN API"
// TODO // TODO
//int halfduplex = 0; //int halfduplex = 0;
//int bands_to_scan = ((UE_RRC_INST *)enb_ue_rrc[ue_id])->UECap->UE_EUTRA_Capability->rf_Parameters.supportedBandListEUTRA.list.count; //int bands_to_scan = ((UE_RRC_INST *)enb_ue_rrc[ue_id])->UECap->UE_EUTRA_Capability->rf_Parameters.supportedBandListEUTRA.list.count;
...@@ -790,14 +665,18 @@ int flexran_get_half_duplex(mid_t ue_id) { ...@@ -790,14 +665,18 @@ int flexran_get_half_duplex(mid_t ue_id) {
return 0; return 0;
} }
int flexran_get_intra_sf_hopping(mid_t ue_id) { int flexran_get_intra_sf_hopping(mid_t ue_id)
{
#warning "Implement flexran_get_intra_sf_hopping() in RAN API"
//TODO:Get proper value //TODO:Get proper value
//temp = (((UE_RRC_INST *)enb_ue_rrc[ue_id])->UECap->UE_EUTRA_Capability->featureGroupIndicators->buf); //temp = (((UE_RRC_INST *)enb_ue_rrc[ue_id])->UECap->UE_EUTRA_Capability->featureGroupIndicators->buf);
//return (0 & ( 1 << (31))); //return (0 & ( 1 << (31)));
return 0; return 0;
} }
int flexran_get_type2_sb_1(mid_t ue_id) { int flexran_get_type2_sb_1(mid_t ue_id)
{
#warning "Implement flexran_get_type2_sb_1() in RAN API"
//TODO:Get proper value //TODO:Get proper value
//uint8_t temp = 0; //uint8_t temp = 0;
//temp = (((UE_RRC_INST *)enb_ue_rrc[ue_id])->UECap->UE_EUTRA_Capability->featureGroupIndicators->buf); //temp = (((UE_RRC_INST *)enb_ue_rrc[ue_id])->UECap->UE_EUTRA_Capability->featureGroupIndicators->buf);
...@@ -805,13 +684,17 @@ int flexran_get_type2_sb_1(mid_t ue_id) { ...@@ -805,13 +684,17 @@ int flexran_get_type2_sb_1(mid_t ue_id) {
return 0; return 0;
} }
int flexran_get_ue_category(mid_t ue_id) { int flexran_get_ue_category(mid_t ue_id)
{
#warning "Implement flexran_get_ue_category() in RAN API"
//TODO:Get proper value //TODO:Get proper value
//return (((UE_RRC_INST *)enb_ue_rrc[ue_id])->UECap->UE_EUTRA_Capability->ue_Category); //return (((UE_RRC_INST *)enb_ue_rrc[ue_id])->UECap->UE_EUTRA_Capability->ue_Category);
return 0; return 0;
} }
int flexran_get_res_alloc_type1(mid_t ue_id) { int flexran_get_res_alloc_type1(mid_t ue_id)
{
#warning "Implement flexran_get_res_alloc_type1() in RAN API"
//TODO:Get proper value //TODO:Get proper value
//uint8_t temp = 0; //uint8_t temp = 0;
//temp = (((UE_RRC_INST *)enb_ue_rrc[ue_id])->UECap->UE_EUTRA_Capability->featureGroupIndicators->buf); //temp = (((UE_RRC_INST *)enb_ue_rrc[ue_id])->UECap->UE_EUTRA_Capability->featureGroupIndicators->buf);
...@@ -819,313 +702,291 @@ int flexran_get_res_alloc_type1(mid_t ue_id) { ...@@ -819,313 +702,291 @@ int flexran_get_res_alloc_type1(mid_t ue_id) {
return 0; return 0;
} }
int flexran_get_ue_transmission_mode(mid_t mod_id, mid_t ue_id) { long flexran_get_ue_transmission_mode(mid_t mod_id, mid_t ue_id)
struct rrc_eNB_ue_context_s* ue_context_p = NULL; {
uint32_t rntiP = flexran_get_ue_crnti(mod_id,ue_id); if (!rrc[mod_id]) return -1;
if (eNB_rrc_inst_not_ready()) return -1;
ue_context_p = rrc_eNB_get_ue_context(&eNB_rrc_inst[mod_id],rntiP); rnti_t rnti = flexran_get_ue_crnti(mod_id,ue_id);
struct rrc_eNB_ue_context_s* ue_context_p = rrc_eNB_get_ue_context(rrc[mod_id], rnti);
if(ue_context_p != NULL) { if (!ue_context_p) return -1;
if(ue_context_p->ue_context.physicalConfigDedicated != NULL){ if (!ue_context_p->ue_context.physicalConfigDedicated) return -1;
if (!ue_context_p->ue_context.physicalConfigDedicated->antennaInfo) return -1;
return ue_context_p->ue_context.physicalConfigDedicated->antennaInfo->choice.explicitValue.transmissionMode; return ue_context_p->ue_context.physicalConfigDedicated->antennaInfo->choice.explicitValue.transmissionMode;
} else {
return -1;
}
} else {
return -1;
}
} }
int flexran_get_tti_bundling(mid_t mod_id, mid_t ue_id) { BOOLEAN_t flexran_get_tti_bundling(mid_t mod_id, mid_t ue_id)
struct rrc_eNB_ue_context_s* ue_context_p = NULL; {
uint32_t rntiP = flexran_get_ue_crnti(mod_id,ue_id); if (!rrc[mod_id]) return -1;
if (eNB_rrc_inst_not_ready()) return -1;
ue_context_p = rrc_eNB_get_ue_context(&eNB_rrc_inst[mod_id],rntiP); rnti_t rnti = flexran_get_ue_crnti(mod_id,ue_id);
if(ue_context_p != NULL) { struct rrc_eNB_ue_context_s* ue_context_p = rrc_eNB_get_ue_context(rrc[mod_id], rnti);
if(ue_context_p->ue_context.mac_MainConfig != NULL){ if (!ue_context_p) return -1;
if (!ue_context_p->ue_context.mac_MainConfig) return -1;
if (!ue_context_p->ue_context.mac_MainConfig->ul_SCH_Config) return -1;
return ue_context_p->ue_context.mac_MainConfig->ul_SCH_Config->ttiBundling; return ue_context_p->ue_context.mac_MainConfig->ul_SCH_Config->ttiBundling;
} else {
return -1;
}
}
else {
return -1;
}
} }
int flexran_get_maxHARQ_TX(mid_t mod_id, mid_t ue_id) { long flexran_get_maxHARQ_TX(mid_t mod_id, mid_t ue_id)
struct rrc_eNB_ue_context_s* ue_context_p = NULL; {
uint32_t rntiP = flexran_get_ue_crnti(mod_id,ue_id); if (!rrc[mod_id]) return -1;
if (eNB_rrc_inst_not_ready()) return -1; rnti_t rnti = flexran_get_ue_crnti(mod_id,ue_id);
struct rrc_eNB_ue_context_s* ue_context_p = rrc_eNB_get_ue_context(rrc[mod_id], rnti);
ue_context_p = rrc_eNB_get_ue_context(&eNB_rrc_inst[mod_id],rntiP); if (!ue_context_p) return -1;
if(ue_context_p != NULL) { if (!ue_context_p->ue_context.mac_MainConfig) return -1;
if(ue_context_p->ue_context.mac_MainConfig != NULL){ if (!ue_context_p->ue_context.mac_MainConfig->ul_SCH_Config) return -1;
return *ue_context_p->ue_context.mac_MainConfig->ul_SCH_Config->maxHARQ_Tx; return *(ue_context_p->ue_context.mac_MainConfig->ul_SCH_Config->maxHARQ_Tx);
}
}
return -1;
} }
int flexran_get_beta_offset_ack_index(mid_t mod_id, mid_t ue_id) { long flexran_get_beta_offset_ack_index(mid_t mod_id, mid_t ue_id)
struct rrc_eNB_ue_context_s* ue_context_p = NULL; {
uint32_t rntiP = flexran_get_ue_crnti(mod_id,ue_id); if (!rrc[mod_id]) return -1;
if (eNB_rrc_inst_not_ready()) return -1; rnti_t rnti = flexran_get_ue_crnti(mod_id,ue_id);
struct rrc_eNB_ue_context_s* ue_context_p = rrc_eNB_get_ue_context(rrc[mod_id], rnti);
ue_context_p = rrc_eNB_get_ue_context(&eNB_rrc_inst[mod_id],rntiP); if (!ue_context_p) return -1;
if(ue_context_p != NULL) { if (!ue_context_p->ue_context.physicalConfigDedicated) return -1;
if(ue_context_p->ue_context.physicalConfigDedicated != NULL){ if (!ue_context_p->ue_context.physicalConfigDedicated->pusch_ConfigDedicated) return -1;
return ue_context_p->ue_context.physicalConfigDedicated->pusch_ConfigDedicated->betaOffset_ACK_Index; return ue_context_p->ue_context.physicalConfigDedicated->pusch_ConfigDedicated->betaOffset_ACK_Index;
} else {
return -1;
}
} else {
return -1;
}
} }
int flexran_get_beta_offset_ri_index(mid_t mod_id, mid_t ue_id) { long flexran_get_beta_offset_ri_index(mid_t mod_id, mid_t ue_id)
struct rrc_eNB_ue_context_s* ue_context_p = NULL; {
uint32_t rntiP = flexran_get_ue_crnti(mod_id,ue_id); if (!rrc[mod_id]) return -1;
if (eNB_rrc_inst_not_ready()) return -1; rnti_t rnti = flexran_get_ue_crnti(mod_id,ue_id);
struct rrc_eNB_ue_context_s* ue_context_p = rrc_eNB_get_ue_context(rrc[mod_id], rnti);
ue_context_p = rrc_eNB_get_ue_context(&eNB_rrc_inst[mod_id],rntiP); if (!ue_context_p) return -1;
if(ue_context_p != NULL) { if (!ue_context_p->ue_context.physicalConfigDedicated) return -1;
if(ue_context_p->ue_context.physicalConfigDedicated != NULL){ if (!ue_context_p->ue_context.physicalConfigDedicated->pusch_ConfigDedicated) return -1;
return ue_context_p->ue_context.physicalConfigDedicated->pusch_ConfigDedicated->betaOffset_RI_Index; return ue_context_p->ue_context.physicalConfigDedicated->pusch_ConfigDedicated->betaOffset_RI_Index;
} else {
return -1;
}
} else {
return -1;
}
} }
int flexran_get_beta_offset_cqi_index(mid_t mod_id, mid_t ue_id) { long flexran_get_beta_offset_cqi_index(mid_t mod_id, mid_t ue_id)
struct rrc_eNB_ue_context_s* ue_context_p = NULL; {
uint32_t rntiP = flexran_get_ue_crnti(mod_id,ue_id); if (!rrc[mod_id]) return -1;
if (eNB_rrc_inst_not_ready()) return -1; rnti_t rnti = flexran_get_ue_crnti(mod_id,ue_id);
struct rrc_eNB_ue_context_s* ue_context_p = rrc_eNB_get_ue_context(rrc[mod_id], rnti);
ue_context_p = rrc_eNB_get_ue_context(&eNB_rrc_inst[mod_id],rntiP); if (!ue_context_p) return -1;
if(ue_context_p != NULL) { if (!ue_context_p->ue_context.physicalConfigDedicated) return -1;
if(ue_context_p->ue_context.physicalConfigDedicated != NULL){ if (!ue_context_p->ue_context.physicalConfigDedicated->pusch_ConfigDedicated) return -1;
return ue_context_p->ue_context.physicalConfigDedicated->pusch_ConfigDedicated->betaOffset_CQI_Index; return ue_context_p->ue_context.physicalConfigDedicated->pusch_ConfigDedicated->betaOffset_CQI_Index;
} else {
return -1;
}
}
else {
return -1;
}
} }
int flexran_get_simultaneous_ack_nack_cqi(mid_t mod_id, mid_t ue_id) { BOOLEAN_t flexran_get_simultaneous_ack_nack_cqi(mid_t mod_id, mid_t ue_id)
struct rrc_eNB_ue_context_s* ue_context_p = NULL; {
uint32_t rntiP = flexran_get_ue_crnti(mod_id,ue_id); if (!rrc[mod_id]) return -1;
if (eNB_rrc_inst_not_ready()) return -1; rnti_t rnti = flexran_get_ue_crnti(mod_id,ue_id);
struct rrc_eNB_ue_context_s* ue_context_p = rrc_eNB_get_ue_context(rrc[mod_id], rnti);
ue_context_p = rrc_eNB_get_ue_context(&eNB_rrc_inst[mod_id],rntiP); if (!ue_context_p) return -1;
if(ue_context_p != NULL) { if (!ue_context_p->ue_context.physicalConfigDedicated) return -1;
if(ue_context_p->ue_context.physicalConfigDedicated != NULL){ if (!ue_context_p->ue_context.physicalConfigDedicated->cqi_ReportConfig) return -1;
if (ue_context_p->ue_context.physicalConfigDedicated->cqi_ReportConfig->cqi_ReportPeriodic != NULL) { if (!ue_context_p->ue_context.physicalConfigDedicated->cqi_ReportConfig->cqi_ReportPeriodic) return -1;
return ue_context_p->ue_context.physicalConfigDedicated->cqi_ReportConfig->cqi_ReportPeriodic->choice.setup.simultaneousAckNackAndCQI; return ue_context_p->ue_context.physicalConfigDedicated->cqi_ReportConfig->cqi_ReportPeriodic->choice.setup.simultaneousAckNackAndCQI;
}
}
}
return -1;
} }
int flexran_get_ack_nack_simultaneous_trans(mid_t mod_id,mid_t ue_id) { BOOLEAN_t flexran_get_ack_nack_simultaneous_trans(mid_t mod_id, mid_t ue_id, uint8_t cc_id)
{
if (eNB_rrc_inst_not_ready()) return -1; if (!rrc[mod_id]) return -1;
if (!rrc[mod_id]->carrier[cc_id].sib2) return -1;
return (&eNB_rrc_inst[mod_id])->carrier[0].sib2->radioResourceConfigCommon.soundingRS_UL_ConfigCommon.choice.setup.ackNackSRS_SimultaneousTransmission; return rrc[mod_id]->carrier[cc_id].sib2->radioResourceConfigCommon.soundingRS_UL_ConfigCommon.choice.setup.ackNackSRS_SimultaneousTransmission;
} }
int flexran_get_aperiodic_cqi_rep_mode(mid_t mod_id,mid_t ue_id) { CQI_ReportModeAperiodic_t flexran_get_aperiodic_cqi_rep_mode(mid_t mod_id,mid_t ue_id)
struct rrc_eNB_ue_context_s* ue_context_p = NULL; {
uint32_t rntiP = flexran_get_ue_crnti(mod_id,ue_id); if (!rrc[mod_id]) return -1;
if (eNB_rrc_inst_not_ready()) return -1;
ue_context_p = rrc_eNB_get_ue_context(&eNB_rrc_inst[mod_id],rntiP); rnti_t rnti = flexran_get_ue_crnti(mod_id,ue_id);
struct rrc_eNB_ue_context_s* ue_context_p = rrc_eNB_get_ue_context(rrc[mod_id], rnti);
if(ue_context_p != NULL) { if (!ue_context_p) return -1;
if(ue_context_p->ue_context.physicalConfigDedicated != NULL){ if (!ue_context_p->ue_context.physicalConfigDedicated) return -1;
if (!ue_context_p->ue_context.physicalConfigDedicated->cqi_ReportConfig) return -1;
return *ue_context_p->ue_context.physicalConfigDedicated->cqi_ReportConfig->cqi_ReportModeAperiodic; return *ue_context_p->ue_context.physicalConfigDedicated->cqi_ReportConfig->cqi_ReportModeAperiodic;
}
}
return -1;
} }
int flexran_get_tdd_ack_nack_feedback(mid_t mod_id, mid_t ue_id) { long flexran_get_tdd_ack_nack_feedback_mode(mid_t mod_id, mid_t ue_id)
// TODO: This needs fixing {
return -1; if (!rrc[mod_id]) return -1;
/* if (eNB_rrc_inst_not_ready()) return -1; */
/* struct rrc_eNB_ue_context_s* ue_context_p = NULL; */
/* uint32_t rntiP = flexran_get_ue_crnti(mod_id,ue_id); */
/* ue_context_p = rrc_eNB_get_ue_context(&eNB_rrc_inst[mod_id],rntiP); */ rnti_t rnti = flexran_get_ue_crnti(mod_id,ue_id);
struct rrc_eNB_ue_context_s* ue_context_p = rrc_eNB_get_ue_context(rrc[mod_id], rnti);
/* if(ue_context_p != NULL) { */ if (!ue_context_p) return -1;
/* if(ue_context_p->ue_context.physicalConfigDedicated != NULL){ */ if (!ue_context_p->ue_context.physicalConfigDedicated) return -1;
/* return ue_context_p->ue_context.physicalConfigDedicated->pucch_ConfigDedicated->tdd_AckNackFeedbackMode; */ if (!ue_context_p->ue_context.physicalConfigDedicated->pucch_ConfigDedicated) return -1;
/* } else { */ if (!ue_context_p->ue_context.physicalConfigDedicated->pucch_ConfigDedicated->tdd_AckNackFeedbackMode) return -1;
/* return -1; */ return *(ue_context_p->ue_context.physicalConfigDedicated->pucch_ConfigDedicated->tdd_AckNackFeedbackMode);
/* } */
/* } else { */
/* return -1; */
/* } */
} }
int flexran_get_ack_nack_repetition_factor(mid_t mod_id, mid_t ue_id) { long flexran_get_ack_nack_repetition_factor(mid_t mod_id, mid_t ue_id)
struct rrc_eNB_ue_context_s* ue_context_p = NULL; {
uint32_t rntiP = flexran_get_ue_crnti(mod_id,ue_id); if (!rrc[mod_id]) return -1;
if (eNB_rrc_inst_not_ready()) return -1; rnti_t rnti = flexran_get_ue_crnti(mod_id,ue_id);
struct rrc_eNB_ue_context_s* ue_context_p = rrc_eNB_get_ue_context(rrc[mod_id], rnti);
ue_context_p = rrc_eNB_get_ue_context(&eNB_rrc_inst[mod_id],rntiP); if (!ue_context_p) return -1;
if(ue_context_p != NULL) { if (!ue_context_p->ue_context.physicalConfigDedicated) return -1;
if(ue_context_p->ue_context.physicalConfigDedicated != NULL){ if (!ue_context_p->ue_context.physicalConfigDedicated->pucch_ConfigDedicated) return -1;
return ue_context_p->ue_context.physicalConfigDedicated->pucch_ConfigDedicated->ackNackRepetition.choice.setup.repetitionFactor; return ue_context_p->ue_context.physicalConfigDedicated->pucch_ConfigDedicated->ackNackRepetition.choice.setup.repetitionFactor;
} else {
return -1;
}
} else {
return -1;
}
} }
int flexran_get_extended_bsr_size(mid_t mod_id, mid_t ue_id) { long flexran_get_extended_bsr_size(mid_t mod_id, mid_t ue_id)
//TODO: need to double check {
struct rrc_eNB_ue_context_s* ue_context_p = NULL; if (!rrc[mod_id]) return -1;
uint32_t rntiP = flexran_get_ue_crnti(mod_id,ue_id);
if (eNB_rrc_inst_not_ready()) return -1; rnti_t rnti = flexran_get_ue_crnti(mod_id,ue_id);
struct rrc_eNB_ue_context_s* ue_context_p = rrc_eNB_get_ue_context(rrc[mod_id], rnti);
ue_context_p = rrc_eNB_get_ue_context(&eNB_rrc_inst[mod_id],rntiP); if (!ue_context_p) return -1;
if(ue_context_p != NULL) { if (!ue_context_p->ue_context.mac_MainConfig) return -1;
if(ue_context_p->ue_context.mac_MainConfig != NULL){ if (!ue_context_p->ue_context.mac_MainConfig->ext2) return -1;
if(ue_context_p->ue_context.mac_MainConfig->ext2 != NULL){ if (!ue_context_p->ue_context.mac_MainConfig->ext2->mac_MainConfig_v1020) return -1;
long val = (*(ue_context_p->ue_context.mac_MainConfig->ext2->mac_MainConfig_v1020->extendedBSR_Sizes_r10)); return *(ue_context_p->ue_context.mac_MainConfig->ext2->mac_MainConfig_v1020->extendedBSR_Sizes_r10);
if (val > 0) {
return 1;
}
}
}
}
return -1;
} }
int flexran_get_ue_transmission_antenna(mid_t mod_id, mid_t ue_id) { int flexran_get_ue_transmission_antenna(mid_t mod_id, mid_t ue_id)
struct rrc_eNB_ue_context_s* ue_context_p = NULL; {
uint32_t rntiP = flexran_get_ue_crnti(mod_id,ue_id); if (!rrc[mod_id]) return -1;
if (eNB_rrc_inst_not_ready()) return -1;
ue_context_p = rrc_eNB_get_ue_context(&eNB_rrc_inst[mod_id],rntiP); rnti_t rnti = flexran_get_ue_crnti(mod_id,ue_id);
struct rrc_eNB_ue_context_s* ue_context_p = rrc_eNB_get_ue_context(rrc[mod_id], rnti);
if(ue_context_p != NULL) { if (!ue_context_p) return -1;
if(ue_context_p->ue_context.physicalConfigDedicated != NULL){ if (!ue_context_p->ue_context.physicalConfigDedicated) return -1;
if(ue_context_p->ue_context.physicalConfigDedicated->antennaInfo->choice.explicitValue.ue_TransmitAntennaSelection.choice.setup == AntennaInfoDedicated__ue_TransmitAntennaSelection__setup_closedLoop) { if (!ue_context_p->ue_context.physicalConfigDedicated->antennaInfo) return -1;
switch (ue_context_p->ue_context.physicalConfigDedicated->antennaInfo->choice.explicitValue.ue_TransmitAntennaSelection.choice.setup) {
case AntennaInfoDedicated__ue_TransmitAntennaSelection__setup_closedLoop:
return 2; return 2;
} else if(ue_context_p->ue_context.physicalConfigDedicated->antennaInfo->choice.explicitValue.ue_TransmitAntennaSelection.choice.setup == AntennaInfoDedicated__ue_TransmitAntennaSelection__setup_openLoop) { case AntennaInfoDedicated__ue_TransmitAntennaSelection__setup_openLoop:
return 1; return 1;
} else { default:
return 0; return 0;
} }
} else {
return -1;
}
} else {
return -1;
}
} }
int flexran_get_lcg(mid_t ue_id, mid_t lc_id) { long flexran_get_lcg(mid_t ue_id, mid_t lc_id)
if (UE_mac_inst == NULL) { {
return -1; if (!UE_mac_inst) return -1;
} if (!UE_mac_inst[ue_id].logicalChannelConfig[lc_id]) return -1;
if(UE_mac_inst[ue_id].logicalChannelConfig[lc_id] != NULL) { if (!UE_mac_inst[ue_id].logicalChannelConfig[lc_id]->ul_SpecificParameters) return -1;
return *UE_mac_inst[ue_id].logicalChannelConfig[lc_id]->ul_SpecificParameters->logicalChannelGroup; if (!UE_mac_inst[ue_id].logicalChannelConfig[lc_id]->ul_SpecificParameters->logicalChannelGroup) return -1;
} else { return *(UE_mac_inst[ue_id].logicalChannelConfig[lc_id]->ul_SpecificParameters->logicalChannelGroup);
return -1;
}
} }
int flexran_get_direction(mid_t ue_id, mid_t lc_id) { int flexran_get_direction(mid_t ue_id, mid_t lc_id)
/*TODO: fill with the value for the rest of LCID*/ {
if(lc_id == DCCH || lc_id == DCCH1) { /* TODO: fill with the value for the rest of LCID -> Robert: What does that
* mean? */
switch (lc_id) {
case DCCH:
case DCCH1:
return 2; return 2;
} else if(lc_id == DTCH) { case DTCH:
return 1; return 1;
} else { default:
return -1; return -1;
} }
} }
int flexran_get_antenna_ports(mid_t mod_id, int CC_id){ uint8_t flexran_get_antenna_ports(mid_t mod_id, uint8_t cc_id)
{
LTE_DL_FRAME_PARMS *frame_parms; if (!phy[mod_id][cc_id]) return 0;
return phy[mod_id][cc_id]->frame_parms.nb_antenna_ports_eNB;
if (mac_xface_not_ready()) return 0;
frame_parms = mac_xface->get_lte_frame_parms(mod_id, CC_id);
return (frame_parms == NULL)? 0:frame_parms->nb_antenna_ports_eNB;
} }
/* TODO better give real value (without division)? */
uint32_t flexran_agent_get_operating_dl_freq (mid_t mod_id, int cc_id) { uint32_t flexran_agent_get_operating_dl_freq(mid_t mod_id, uint8_t cc_id)
{
return (enb_properties->properties[mod_id]->downlink_frequency[cc_id] / 1000000); if (!phy[mod_id][cc_id]) return 0;
return phy[mod_id][cc_id]->frame_parms.dl_CarrierFreq / 1000000;
} }
uint32_t flexran_agent_get_operating_ul_freq (mid_t mod_id, int cc_id) { /* TODO better give real value (without division)? */
return ((enb_properties->properties[mod_id]->downlink_frequency[cc_id] + enb_properties->properties[0]->uplink_frequency_offset[cc_id]) / 1000000); uint32_t flexran_agent_get_operating_ul_freq(mid_t mod_id, uint8_t cc_id)
{
if (!phy[mod_id][cc_id]) return 0;
return phy[mod_id][cc_id]->frame_parms.ul_CarrierFreq / 1000000;
} }
int flexran_agent_get_operating_eutra_band (mid_t mod_id, int cc_id) { uint8_t flexran_agent_get_operating_eutra_band(mid_t mod_id, uint8_t cc_id)
return enb_properties->properties[mod_id]->eutra_band[cc_id]; {
} if (!phy[mod_id][cc_id]) return 0;
int flexran_agent_get_operating_pdsch_refpower (mid_t mod_id, int cc_id) { return phy[mod_id][cc_id]->frame_parms.eutra_band;
return enb_properties->properties[mod_id]->pdsch_referenceSignalPower[cc_id];
} }
int flexran_agent_get_operating_pusch_p0 (mid_t mod_id, int cc_id) {
return enb_properties->properties[mod_id]->pusch_p0_Nominal[cc_id]; int8_t flexran_agent_get_operating_pdsch_refpower(mid_t mod_id, uint8_t cc_id)
{
if (!phy[mod_id][cc_id]) return 0;
return phy[mod_id][cc_id]->frame_parms.pdsch_config_common.referenceSignalPower;
} }
void flexran_agent_set_operating_dl_freq (mid_t mod_id, int cc_id, uint32_t dl_freq_mhz) { long flexran_agent_get_operating_pusch_p0(mid_t mod_id, uint8_t cc_id)
{
if (!rrc[mod_id]) return 0;
return rrc[mod_id]->configuration.pusch_p0_Nominal[cc_id];
}
enb_properties->properties[mod_id]->downlink_frequency[cc_id]=dl_freq_mhz * 1000000; void flexran_agent_set_operating_dl_freq(mid_t mod_id, uint8_t cc_id, uint32_t dl_freq_mhz)
/*printf("[ENB_APP] mod id %d ccid %d dl freq %d/%d\n", mod_id, cc_id, dl_freq_mhz, enb_properties->properties[mod_id]->downlink_frequency[cc_id]); */ {
if (phy[mod_id][cc_id]) {
phy[mod_id][cc_id]->frame_parms.dl_CarrierFreq = dl_freq_mhz * 1000000;
}
if (rrc[mod_id]) {
rrc[mod_id]->configuration.downlink_frequency[cc_id] = dl_freq_mhz * 1000000;
}
} }
void flexran_agent_set_operating_ul_freq (mid_t mod_id, int cc_id, int32_t ul_freq_offset_mhz) { void flexran_agent_set_operating_ul_freq(mid_t mod_id, uint8_t cc_id, int32_t ul_freq_mhz_offset)
enb_properties->properties[mod_id]->uplink_frequency_offset[cc_id]=ul_freq_offset_mhz * 1000000; {
if (phy[mod_id][cc_id]) {
uint32_t new_ul_freq_mhz = flexran_agent_get_operating_dl_freq(mod_id, cc_id) + ul_freq_mhz_offset;
phy[mod_id][cc_id]->frame_parms.ul_CarrierFreq = new_ul_freq_mhz * 1000000;
}
if (rrc[mod_id]) {
rrc[mod_id]->configuration.uplink_frequency_offset[cc_id] = ul_freq_mhz_offset;
}
} }
//TBD
void flexran_agent_set_operating_eutra_band (mid_t mod_id, int cc_id) { void flexran_agent_set_operating_eutra_band(mid_t mod_id, uint8_t cc_id, uint8_t eutra_band)
enb_properties->properties[mod_id]->eutra_band[cc_id]=7; {
if (phy[mod_id][cc_id]) {
phy[mod_id][cc_id]->frame_parms.eutra_band = eutra_band;
}
if (rrc[mod_id]) {
rrc[mod_id]->configuration.eutra_band[cc_id] = eutra_band;
}
} }
void flexran_agent_set_operating_bandwidth (mid_t mod_id, int cc_id, int bandwidth) { /* Sets both DL/UL */
enb_properties->properties[mod_id]->N_RB_DL[cc_id]=bandwidth; void flexran_agent_set_operating_bandwidth(mid_t mod_id, uint8_t cc_id, uint8_t N_RB)
{
if (phy[mod_id][cc_id]) {
phy[mod_id][cc_id]->frame_parms.N_RB_DL = N_RB;
phy[mod_id][cc_id]->frame_parms.N_RB_UL = N_RB;
}
if (rrc[mod_id]) {
rrc[mod_id]->configuration.N_RB_DL[cc_id] = N_RB;
}
} }
void flexran_agent_set_operating_frame_type (mid_t mod_id, int cc_id, int frame_type) { void flexran_agent_set_operating_frame_type(mid_t mod_id, uint8_t cc_id, lte_frame_type_t frame_type)
enb_properties->properties[mod_id]->frame_type[cc_id]=frame_type; {
if (phy[mod_id][cc_id]) {
phy[mod_id][cc_id]->frame_parms.frame_type = frame_type;
}
if (rrc[mod_id]) {
rrc[mod_id]->configuration.frame_type[cc_id] = frame_type;
}
} }
/*********** PDCP *************/ /*********** PDCP *************/
...@@ -1234,192 +1095,99 @@ uint32_t flexran_get_pdcp_rx_oo(const mid_t mod_id, const mid_t ue_id, const lc ...@@ -1234,192 +1095,99 @@ uint32_t flexran_get_pdcp_rx_oo(const mid_t mod_id, const mid_t ue_id, const lc
/******************** RRC *****************************/ /******************** RRC *****************************/
int flexran_get_rrc_pcell_measid(mid_t mod_id, mid_t ue_id) { MeasId_t flexran_get_rrc_pcell_measid(mid_t mod_id, mid_t ue_id)
struct rrc_eNB_ue_context_s* ue_context_p = NULL; {
uint32_t rntiP = flexran_get_ue_crnti(mod_id,ue_id); if (!rrc[mod_id]) return -1;
if (eNB_rrc_inst_not_ready()) return -1; rnti_t rnti = flexran_get_ue_crnti(mod_id,ue_id);
struct rrc_eNB_ue_context_s* ue_context_p = rrc_eNB_get_ue_context(rrc[mod_id], rnti);
ue_context_p = rrc_eNB_get_ue_context(&eNB_rrc_inst[mod_id],rntiP); if (!ue_context_p) return -1;
if(ue_context_p != NULL) { if (!ue_context_p->ue_context.measResults) return -1;
if(ue_context_p->ue_context.measResults != NULL) {
return ue_context_p->ue_context.measResults->measId; return ue_context_p->ue_context.measResults->measId;
} else {
return -1;
}
} else {
return -1;
}
} }
int flexran_get_rrc_pcell_rsrp(mid_t mod_id, mid_t ue_id) {
struct rrc_eNB_ue_context_s* ue_context_p = NULL;
uint32_t rntiP = flexran_get_ue_crnti(mod_id,ue_id);
if (eNB_rrc_inst_not_ready()) return -1; float flexran_get_rrc_pcell_rsrp(mid_t mod_id, mid_t ue_id)
{
if (!rrc[mod_id]) return -1;
ue_context_p = rrc_eNB_get_ue_context(&eNB_rrc_inst[mod_id],rntiP); rnti_t rnti = flexran_get_ue_crnti(mod_id,ue_id);
if(ue_context_p != NULL) { struct rrc_eNB_ue_context_s* ue_context_p = rrc_eNB_get_ue_context(rrc[mod_id], rnti);
if(ue_context_p->ue_context.measResults != NULL) {
if (!ue_context_p) return -1;
if (!ue_context_p->ue_context.measResults) return -1;
return RSRP_meas_mapping[ue_context_p->ue_context.measResults->measResultPCell.rsrpResult]; return RSRP_meas_mapping[ue_context_p->ue_context.measResults->measResultPCell.rsrpResult];
} else {
return -1;
}
} else {
return -1;
}
} }
int flexran_get_rrc_pcell_rsrq(mid_t mod_id, mid_t ue_id) {
struct rrc_eNB_ue_context_s* ue_context_p = NULL;
uint32_t rntiP = flexran_get_ue_crnti(mod_id,ue_id);
if (eNB_rrc_inst_not_ready()) return -1; float flexran_get_rrc_pcell_rsrq(mid_t mod_id, mid_t ue_id)
{
if (!rrc[mod_id]) return -1;
rnti_t rnti = flexran_get_ue_crnti(mod_id,ue_id);
struct rrc_eNB_ue_context_s* ue_context_p = rrc_eNB_get_ue_context(rrc[mod_id], rnti);
ue_context_p = rrc_eNB_get_ue_context(&eNB_rrc_inst[mod_id],rntiP); if (!ue_context_p) return -1;
if(ue_context_p != NULL) { if (!ue_context_p->ue_context.measResults) return -1;
if(ue_context_p->ue_context.measResults != NULL) {
return RSRQ_meas_mapping[ue_context_p->ue_context.measResults->measResultPCell.rsrqResult]; return RSRQ_meas_mapping[ue_context_p->ue_context.measResults->measResultPCell.rsrqResult];
} else {
return -1;
}
} else {
return -1;
}
} }
/*Number of neighbouring cells for specific UE*/ /*Number of neighbouring cells for specific UE*/
int flexran_get_rrc_num_ncell(mid_t mod_id, mid_t ue_id) { int flexran_get_rrc_num_ncell(mid_t mod_id, mid_t ue_id)
struct rrc_eNB_ue_context_s* ue_context_p = NULL; {
uint32_t rntiP = flexran_get_ue_crnti(mod_id,ue_id); if (!rrc[mod_id]) return 0;
if (eNB_rrc_inst_not_ready()) return 0;
ue_context_p = rrc_eNB_get_ue_context(&eNB_rrc_inst[mod_id],rntiP);
if(ue_context_p != NULL) {
if (ue_context_p->ue_context.measResults != NULL){
if(ue_context_p->ue_context.measResults->measResultNeighCells != NULL) {
if (ue_context_p->ue_context.measResults->measResultNeighCells->present == MeasResults__measResultNeighCells_PR_measResultListEUTRA) { rnti_t rnti = flexran_get_ue_crnti(mod_id,ue_id);
struct rrc_eNB_ue_context_s* ue_context_p = rrc_eNB_get_ue_context(rrc[mod_id], rnti);
if (!ue_context_p) return 0;
if (!ue_context_p->ue_context.measResults) return 0;
if (!ue_context_p->ue_context.measResults->measResultNeighCells) return 0;
if (ue_context_p->ue_context.measResults->measResultNeighCells->present != MeasResults__measResultNeighCells_PR_measResultListEUTRA) return 0;
return ue_context_p->ue_context.measResults->measResultNeighCells->choice.measResultListEUTRA.list.count; return ue_context_p->ue_context.measResults->measResultNeighCells->choice.measResultListEUTRA.list.count;
}
else{
return 0;
}
} else {
return 0;
}
} else {
return 0;
}
} else {
return 0;
}
} }
int flexran_get_rrc_neigh_phy_cell_id(mid_t mod_id, mid_t ue_id, int cell_id) { PhysCellId_t flexran_get_rrc_neigh_phy_cell_id(mid_t mod_id, mid_t ue_id, int cell_id)
struct rrc_eNB_ue_context_s* ue_context_p = NULL; {
uint32_t rntiP = flexran_get_ue_crnti(mod_id,ue_id); if (!rrc[mod_id]) return -1;
if (eNB_rrc_inst_not_ready()) return -1;
ue_context_p = rrc_eNB_get_ue_context(&eNB_rrc_inst[mod_id],rntiP);
if(ue_context_p != NULL) {
if(ue_context_p->ue_context.measResults->measResultNeighCells != NULL) {
if (ue_context_p->ue_context.measResults->measResultNeighCells->present == MeasResults__measResultNeighCells_PR_measResultListEUTRA) { rnti_t rnti = flexran_get_ue_crnti(mod_id,ue_id);
struct rrc_eNB_ue_context_s* ue_context_p = rrc_eNB_get_ue_context(rrc[mod_id], rnti);
if (!ue_context_p) return -1;
if (!ue_context_p->ue_context.measResults) return -1;
if (!ue_context_p->ue_context.measResults->measResultNeighCells) return -1;
if (ue_context_p->ue_context.measResults->measResultNeighCells->present != MeasResults__measResultNeighCells_PR_measResultListEUTRA) return -1;
if (!ue_context_p->ue_context.measResults->measResultNeighCells->choice.measResultListEUTRA.list.array[cell_id]) return -1;
return ue_context_p->ue_context.measResults->measResultNeighCells->choice.measResultListEUTRA.list.array[cell_id]->physCellId; return ue_context_p->ue_context.measResults->measResultNeighCells->choice.measResultListEUTRA.list.array[cell_id]->physCellId;
}
else {
return -1;
}
} else {
return -1;
}
} else {
return -1;
}
} }
int flexran_get_rrc_neigh_rsrp(mid_t mod_id, mid_t ue_id, int cell_id) { float flexran_get_rrc_neigh_rsrp(mid_t mod_id, mid_t ue_id, int cell_id)
struct rrc_eNB_ue_context_s* ue_context_p = NULL; {
uint32_t rntiP = flexran_get_ue_crnti(mod_id,ue_id); if (!rrc[mod_id]) return -1;
if (eNB_rrc_inst_not_ready()) return -1;
ue_context_p = rrc_eNB_get_ue_context(&eNB_rrc_inst[mod_id],rntiP);
if(ue_context_p != NULL) {
if(ue_context_p->ue_context.measResults->measResultNeighCells != NULL) {
if (ue_context_p->ue_context.measResults->measResultNeighCells->present == MeasResults__measResultNeighCells_PR_measResultListEUTRA) {
if (ue_context_p->ue_context.measResults->measResultNeighCells->choice.measResultListEUTRA.list.array[cell_id]->measResult.rsrpResult){ rnti_t rnti = flexran_get_ue_crnti(mod_id,ue_id);
struct rrc_eNB_ue_context_s* ue_context_p = rrc_eNB_get_ue_context(rrc[mod_id], rnti);
if (!ue_context_p) return -1;
if (!ue_context_p->ue_context.measResults) return -1;
if (!ue_context_p->ue_context.measResults->measResultNeighCells) return -1;
if (ue_context_p->ue_context.measResults->measResultNeighCells->present != MeasResults__measResultNeighCells_PR_measResultListEUTRA) return -1;
if (!ue_context_p->ue_context.measResults->measResultNeighCells->choice.measResultListEUTRA.list.array[cell_id]) return -1;
if (!ue_context_p->ue_context.measResults->measResultNeighCells->choice.measResultListEUTRA.list.array[cell_id]->measResult.rsrpResult) return 0;
return RSRP_meas_mapping[*(ue_context_p->ue_context.measResults->measResultNeighCells->choice.measResultListEUTRA.list.array[cell_id]->measResult.rsrpResult)]; return RSRP_meas_mapping[*(ue_context_p->ue_context.measResults->measResultNeighCells->choice.measResultListEUTRA.list.array[cell_id]->measResult.rsrpResult)];
}
else {
return 0;
}
}
else {
return -1;
}
}
else {
return -1;
}
}
else {
return -1;
}
} }
int flexran_get_rrc_neigh_rsrq(mid_t mod_id, mid_t ue_id, int cell_id) { float flexran_get_rrc_neigh_rsrq(mid_t mod_id, mid_t ue_id, int cell_id)
struct rrc_eNB_ue_context_s* ue_context_p = NULL; {
uint32_t rntiP = flexran_get_ue_crnti(mod_id,ue_id); if (!rrc[mod_id]) return -1;
if (eNB_rrc_inst_not_ready()) return -1;
ue_context_p = rrc_eNB_get_ue_context(&eNB_rrc_inst[mod_id],rntiP); rnti_t rnti = flexran_get_ue_crnti(mod_id,ue_id);
if(ue_context_p != NULL) { struct rrc_eNB_ue_context_s* ue_context_p = rrc_eNB_get_ue_context(rrc[mod_id], rnti);
if(ue_context_p->ue_context.measResults->measResultNeighCells != NULL) {
if (ue_context_p->ue_context.measResults->measResultNeighCells->present == MeasResults__measResultNeighCells_PR_measResultListEUTRA) {
if (ue_context_p->ue_context.measResults->measResultNeighCells->choice.measResultListEUTRA.list.array[cell_id]->measResult.rsrqResult){ if (!ue_context_p) return -1;
if (!ue_context_p->ue_context.measResults) return -1;
if (!ue_context_p->ue_context.measResults->measResultNeighCells) return -1;
if (ue_context_p->ue_context.measResults->measResultNeighCells->present != MeasResults__measResultNeighCells_PR_measResultListEUTRA) return -1;
if (!ue_context_p->ue_context.measResults->measResultNeighCells->choice.measResultListEUTRA.list.array[cell_id]->measResult.rsrqResult) return 0;
return RSRQ_meas_mapping[*(ue_context_p->ue_context.measResults->measResultNeighCells->choice.measResultListEUTRA.list.array[cell_id]->measResult.rsrqResult)]; return RSRQ_meas_mapping[*(ue_context_p->ue_context.measResults->measResultNeighCells->choice.measResultListEUTRA.list.array[cell_id]->measResult.rsrqResult)];
}
else {
return 0;
}
}
else {
return -1;
}
} else {
return -1;
}
} else {
return -1;
}
} }
...@@ -50,23 +50,23 @@ ...@@ -50,23 +50,23 @@
* get generic info from RAN * get generic info from RAN
****************************/ ****************************/
void flexran_set_enb_vars(mid_t mod_id, ran_name_t ran); void flexran_set_RC_vars(mid_t mod_id, ran_name_t ran);
int flexran_get_current_time_ms (mid_t mod_id, int subframe_flag); uint32_t flexran_get_current_time_ms(mid_t mod_id, int subframe_flag);
/*Return the current frame number /*Return the current frame number
*Could be using implementation specific numbering of frames *Could be using implementation specific numbering of frames
*/ */
unsigned int flexran_get_current_frame(mid_t mod_id); frame_t flexran_get_current_frame(mid_t mod_id);
/*Return the current SFN (0-1023)*/ /*Return the current SFN (0-1023)*/
unsigned int flexran_get_current_system_frame_num(mid_t mod_id); frame_t flexran_get_current_system_frame_num(mid_t mod_id);
unsigned int flexran_get_current_subframe(mid_t mod_id); sub_frame_t flexran_get_current_subframe(mid_t mod_id);
/*Return the frame and subframe number in compact 16-bit format. /*Return the frame and subframe number in compact 16-bit format.
Bits 0-3 subframe, rest for frame. Required by FlexRAN protocol*/ Bits 0-3 subframe, rest for frame. Required by FlexRAN protocol*/
uint16_t flexran_get_sfn_sf (mid_t mod_id); uint16_t flexran_get_sfn_sf(mid_t mod_id);
/* Return a future frame and subframe number that is ahead_of_time /* Return a future frame and subframe number that is ahead_of_time
subframes later in compact 16-bit format. Bits 0-3 subframe, subframes later in compact 16-bit format. Bits 0-3 subframe,
...@@ -77,144 +77,151 @@ uint16_t flexran_get_future_sfn_sf(mid_t mod_id, int ahead_of_time); ...@@ -77,144 +77,151 @@ uint16_t flexran_get_future_sfn_sf(mid_t mod_id, int ahead_of_time);
int flexran_get_num_ues(mid_t mod_id); int flexran_get_num_ues(mid_t mod_id);
/* Get the rnti of a UE with id ue_id */ /* Get the rnti of a UE with id ue_id */
int flexran_get_ue_crnti (mid_t mod_id, mid_t ue_id); rnti_t flexran_get_ue_crnti(mid_t mod_id, mid_t ue_id);
/* Get the RLC buffer status report of a ue for a designated /* Get the RLC buffer status report of a ue for a designated
logical channel id */ logical channel id */
int flexran_get_ue_bsr (mid_t mod_id, mid_t ue_id, lcid_t lcid); uint8_t flexran_get_ue_bsr(mid_t mod_id, mid_t ue_id, lcid_t lcid);
/* Get power headroom of UE with id ue_id */ /* Get power headroom of UE with id ue_id */
int flexran_get_ue_phr (mid_t mod_id, mid_t ue_id); int8_t flexran_get_ue_phr(mid_t mod_id, mid_t ue_id);
/* Get the UE wideband CQI */ /* Get the UE wideband CQI */
int flexran_get_ue_wcqi (mid_t mod_id, mid_t ue_id); uint8_t flexran_get_ue_wcqi(mid_t mod_id, mid_t ue_id);
/* Get the transmission queue size for a UE with a channel_id logical channel id */ /* Get the transmission queue size for a UE with a channel_id logical channel id */
int flexran_get_tx_queue_size(mid_t mod_id, mid_t ue_id, logical_chan_id_t channel_id); rlc_buffer_occupancy_t flexran_get_tx_queue_size(mid_t mod_id, mid_t ue_id, logical_chan_id_t channel_id);
/*Get number of pdus in RLC buffer*/ /*Get number of pdus in RLC buffer*/
int flexran_get_num_pdus_buffer(mid_t mod_id, mid_t ue_id, logical_chan_id_t channel_id); rlc_buffer_occupancy_t flexran_get_num_pdus_buffer(mid_t mod_id, mid_t ue_id, logical_chan_id_t channel_id);
/* Get the head of line delay for a UE with a channel_id logical channel id */ /* Get the head of line delay for a UE with a channel_id logical channel id */
int flexran_get_hol_delay(mid_t mod_id, mid_t ue_id, logical_chan_id_t channel_id); frame_t flexran_get_hol_delay(mid_t mod_id, mid_t ue_id, logical_chan_id_t channel_id);
/* Check the status of the timing advance for a UE */ /* Check the status of the timing advance for a UE */
short flexran_get_TA(mid_t mod_id, mid_t ue_id, int CC_id); int32_t flexran_get_TA(mid_t mod_id, mid_t ue_id, uint8_t cc_id);
/* Update the timing advance status (find out whether a timing advance command is required) */ /* Update the timing advance status(find out whether a timing advance command is required) */
void flexran_update_TA(mid_t mod_id, mid_t ue_id, int CC_id); /* currently broken
void flexran_update_TA(mid_t mod_id, mid_t ue_id, uint8_t cc_id); */
/* Return timing advance MAC control element for a designated cell and UE */ /* Return timing advance MAC control element for a designated cell and UE */
int flexran_get_MAC_CE_bitmap_TA(mid_t mod_id, mid_t ue_id, int CC_id); /* this function is broken */
int flexran_get_MAC_CE_bitmap_TA(mid_t mod_id, mid_t ue_id, uint8_t cc_id);
/* Get the number of active component carriers for a specific UE */ /* Get the number of active component carriers for a specific UE */
int flexran_get_active_CC(mid_t mod_id, mid_t ue_id); int flexran_get_active_CC(mid_t mod_id, mid_t ue_id);
/* Get the rank indicator for a designated cell and UE */ /* Get the rank indicator for a designated cell and UE */
int flexran_get_current_RI(mid_t mod_id, mid_t ue_id, int CC_id); uint8_t flexran_get_current_RI(mid_t mod_id, mid_t ue_id, uint8_t cc_id);
/* See TS 36.213, section 10.1 */ /* See TS 36.213, section 10.1 */
int flexran_get_n1pucch_an(mid_t mod_id, int CC_id); uint16_t flexran_get_n1pucch_an(mid_t mod_id, uint8_t cc_id);
/* See TS 36.211, section 5.4 */ /* See TS 36.211, section 5.4 */
int flexran_get_nRB_CQI(mid_t mod_id, int CC_id); uint8_t flexran_get_nRB_CQI(mid_t mod_id, uint8_t cc_id);
/* See TS 36.211, section 5.4 */ /* See TS 36.211, section 5.4 */
int flexran_get_deltaPUCCH_Shift(mid_t mod_id, int CC_id); uint8_t flexran_get_deltaPUCCH_Shift(mid_t mod_id, uint8_t cc_id);
/* See TS 36.211, section 5.7.1 */ /* See TS 36.211, section 5.7.1 */
int flexran_get_prach_ConfigIndex(mid_t mod_id, int CC_id); uint8_t flexran_get_prach_ConfigIndex(mid_t mod_id, uint8_t cc_id);
/* See TS 36.211, section 5.7.1 */ /* See TS 36.211, section 5.7.1 */
int flexran_get_prach_FreqOffset(mid_t mod_id, int CC_id); uint8_t flexran_get_prach_FreqOffset(mid_t mod_id, uint8_t cc_id);
/* See TS 36.321 */ /* See TS 36.321 */
int flexran_get_maxHARQ_Msg3Tx(mid_t mod_id, int CC_id); uint8_t flexran_get_maxHARQ_Msg3Tx(mid_t mod_id, uint8_t cc_id);
/* Get the length of the UL cyclic prefix */ /* Get the length of the UL cyclic prefix */
int flexran_get_ul_cyclic_prefix_length(mid_t mod_id, int CC_id); lte_prefix_type_t flexran_get_ul_cyclic_prefix_length(mid_t mod_id, uint8_t cc_id);
/* Get the length of the DL cyclic prefix */ /* Get the length of the DL cyclic prefix */
int flexran_get_dl_cyclic_prefix_length(mid_t mod_id, int CC_id); lte_prefix_type_t flexran_get_dl_cyclic_prefix_length(mid_t mod_id, uint8_t cc_id);
/* Get the physical cell id of a cell */ /* Get the physical cell id of a cell */
int flexran_get_cell_id(mid_t mod_id, int CC_id); uint16_t flexran_get_cell_id(mid_t mod_id, uint8_t cc_id);
/* See TS 36.211, section 5.5.3.2 */ /* See TS 36.211, section 5.5.3.2 */
int flexran_get_srs_BandwidthConfig(mid_t mod_id, int CC_id); uint8_t flexran_get_srs_BandwidthConfig(mid_t mod_id, uint8_t cc_id);
/* See TS 36.211, table 5.5.3.3-1 and 2 */ /* See TS 36.211, table 5.5.3.3-1 and 2 */
int flexran_get_srs_SubframeConfig(mid_t mod_id, int CC_id); uint8_t flexran_get_srs_SubframeConfig(mid_t mod_id, uint8_t cc_id);
/* Boolean value. See TS 36.211, /* Boolean value. See TS 36.211,
section 5.5.3.2. TDD only */ section 5.5.3.2. TDD only */
int flexran_get_srs_MaxUpPts(mid_t mod_id, int CC_id); uint8_t flexran_get_srs_MaxUpPts(mid_t mod_id, uint8_t cc_id);
/* Get number of DL resource blocks */ /* Get number of DL resource blocks */
int flexran_get_N_RB_DL(mid_t mod_id, int CC_id); uint8_t flexran_get_N_RB_DL(mid_t mod_id, uint8_t cc_id);
/* Get number of UL resource blocks */ /* Get number of UL resource blocks */
int flexran_get_N_RB_UL(mid_t mod_id, int CC_id); uint8_t flexran_get_N_RB_UL(mid_t mod_id, uint8_t cc_id);
/* Get number of resource block groups */ /* Get number of resource block groups */
int flexran_get_N_RBG(mid_t mod_id, int CC_id); uint8_t flexran_get_N_RBG(mid_t mod_id, uint8_t cc_id);
/* Get DL/UL subframe assignment. TDD only */ /* Get DL/UL subframe assignment. TDD only */
int flexran_get_subframe_assignment(mid_t mod_id, int CC_id); uint8_t flexran_get_subframe_assignment(mid_t mod_id, uint8_t cc_id);
/* TDD only. See TS 36.211, table 4.2.1 */ /* TDD only. See TS 36.211, table 4.2.1 */
int flexran_get_special_subframe_assignment(mid_t mod_id, int CC_id); uint8_t flexran_get_special_subframe_assignment(mid_t mod_id, uint8_t cc_id);
/* Get the duration of the random access response window in subframes */ /* Get the duration of the random access response window in subframes */
int flexran_get_ra_ResponseWindowSize(mid_t mod_id, int CC_id); long flexran_get_ra_ResponseWindowSize(mid_t mod_id, uint8_t cc_id);
/* Get timer used for random access */ /* Get timer used for random access */
int flexran_get_mac_ContentionResolutionTimer(mid_t mod_id, int CC_id); long flexran_get_mac_ContentionResolutionTimer(mid_t mod_id, uint8_t cc_id);
/* Get type of duplex mode (FDD/TDD) */ /* Get type of duplex mode(FDD/TDD) */
int flexran_get_duplex_mode(mid_t mod_id, int CC_id); Protocol__FlexDuplexMode flexran_get_duplex_mode(mid_t mod_id, uint8_t cc_id);
/* Get the SI window length */ /* Get the SI window length */
long flexran_get_si_window_length(mid_t mod_id, int CC_id); long flexran_get_si_window_length(mid_t mod_id, uint8_t cc_id);
/* Get length of SystemInformationBlock1 */
uint8_t flexran_get_sib1_length(mid_t mod_id, uint8_t cc_id);
/* Get the number of PDCCH symbols configured for the cell */ /* Get the number of PDCCH symbols configured for the cell */
int flexran_get_num_pdcch_symb(mid_t mod_id, int CC_id); uint8_t flexran_get_num_pdcch_symb(mid_t mod_id, uint8_t cc_id);
int flexran_get_antenna_ports(mid_t mod_id, int CC_id); uint8_t flexran_get_antenna_ports(mid_t mod_id, uint8_t cc_id);
/* See TS 36.213, sec 5.1.1.1 */ /* See TS 36.213, sec 5.1.1.1 */
int flexran_get_tpc(mid_t mod_id, mid_t ue_id); int flexran_get_tpc(mid_t mod_id, mid_t ue_id, uint8_t cc_id);
int flexran_get_ue_pmi(mid_t mod_id); uint8_t flexran_get_ue_wpmi(mid_t mod_id, mid_t ue_id, uint8_t cc_id);
/* Get the first available HARQ process for a specific cell and UE during /* Get the first available HARQ process for a specific cell and UE during
a designated frame and subframe. Returns 0 for success. The id and the a designated frame and subframe. Returns 0 for success. The id and the
status of the HARQ process are stored in id and status respectively */ status of the HARQ process are stored in id and status respectively */
int flexran_get_harq(const mid_t mod_id, const uint8_t CC_id, const mid_t ue_id, /* currently broken
const int frame, const uint8_t subframe, unsigned char *id, unsigned char *round,const uint8_t harq_flag); int flexran_get_harq(mid_t mod_id, uint8_t cc_id, mid_t ue_id, frame_t frame,
sub_frame_t subframe, unsigned char *id, unsigned char *round,
uint8_t harq_flag); */
/* Uplink power control management*/ /* Uplink power control management*/
int flexran_get_p0_pucch_dbm(mid_t mod_id, mid_t ue_id, int CC_id); int32_t flexran_get_p0_pucch_dbm(mid_t mod_id, mid_t ue_id, uint8_t cc_id);
int flexran_get_p0_nominal_pucch(mid_t mod_id, int CC_id); int8_t flexran_get_p0_nominal_pucch(mid_t mod_id, uint8_t cc_id);
int flexran_get_p0_pucch_status(mid_t mod_id, mid_t ue_id, int CC_id); int32_t flexran_get_p0_pucch_status(mid_t mod_id, mid_t ue_id, uint8_t cc_id);
int flexran_update_p0_pucch(mid_t mod_id, mid_t ue_id, int CC_id); int flexran_update_p0_pucch(mid_t mod_id, mid_t ue_id, uint8_t cc_id);
int flexran_get_threequarter_fs(mid_t mod_id, int CC_id); uint8_t flexran_get_threequarter_fs(mid_t mod_id, uint8_t cc_id);
int flexran_get_hopping_mode(mid_t mod_id, int CC_id); PUSCH_HOPPING_t flexran_get_hopping_mode(mid_t mod_id, uint8_t cc_id);
int flexran_get_hopping_offset(mid_t mod_id, int CC_id); uint8_t flexran_get_hopping_offset(mid_t mod_id, uint8_t cc_id);
int flexran_get_n_SB(mid_t mod_id, int CC_id); uint8_t flexran_get_n_SB(mid_t mod_id, uint8_t cc_id);
int flexran_get_phich_resource(mid_t mod_id, int CC_id); int flexran_get_phich_resource(mid_t mod_id, uint8_t cc_id);
int flexran_get_enable64QAM(mid_t mod_id, int CC_id); uint8_t flexran_get_enable64QAM(mid_t mod_id, uint8_t cc_id);
int flexran_get_phich_duration(mid_t mod_id, int CC_id); PHICH_DURATION_t flexran_get_phich_duration(mid_t mod_id, uint8_t cc_id);
/* /*
* ************************************ * ************************************
...@@ -225,119 +232,124 @@ int flexran_get_phich_duration(mid_t mod_id, int CC_id); ...@@ -225,119 +232,124 @@ int flexran_get_phich_duration(mid_t mod_id, int CC_id);
/* Get timer in subframes. Controls the synchronization /* Get timer in subframes. Controls the synchronization
status of the UE, not the actual timing status of the UE, not the actual timing
advance procedure. See TS 36.321 */ advance procedure. See TS 36.321 */
int flexran_get_time_alignment_timer(mid_t mod_id, mid_t ue_id); TimeAlignmentTimer_t flexran_get_time_alignment_timer(mid_t mod_id, mid_t ue_id);
/* Get measurement gap configuration. See TS 36.133 */ /* Get measurement gap configuration. See TS 36.133 */
int flexran_get_meas_gap_config(mid_t mod_id, mid_t ue_id); Protocol__FlexMeasGapConfigPattern flexran_get_meas_gap_config(mid_t mod_id, mid_t ue_id);
/* Get measurement gap configuration offset if applicable */ /* Get measurement gap configuration offset if applicable */
int flexran_get_meas_gap_config_offset(mid_t mod_id, mid_t ue_id); long flexran_get_meas_gap_config_offset(mid_t mod_id, mid_t ue_id);
/* DL aggregated bit-rate of non-gbr bearer /* DL aggregated bit-rate of non-gbr bearer
per UE. See TS 36.413 */ per UE. See TS 36.413 */
int flexran_get_ue_aggregated_max_bitrate_dl (mid_t mod_id, mid_t ue_id); uint64_t flexran_get_ue_aggregated_max_bitrate_dl(mid_t mod_id, mid_t ue_id);
/* UL aggregated bit-rate of non-gbr bearer /* UL aggregated bit-rate of non-gbr bearer
per UE. See TS 36.413 */ per UE. See TS 36.413 */
int flexran_get_ue_aggregated_max_bitrate_ul (mid_t mod_id, mid_t ue_id); uint64_t flexran_get_ue_aggregated_max_bitrate_ul(mid_t mod_id, mid_t ue_id);
/* Only half-duplex support. FDD /* Only half-duplex support. FDD
operation. Boolean value */ operation. Boolean value */
int flexran_get_half_duplex(mid_t ue_id); /* currently broken
int flexran_get_half_duplex(mid_t ue_id); */
/* Support of intra-subframe hopping. /* Support of intra-subframe hopping.
Boolean value */ Boolean value */
int flexran_get_intra_sf_hopping(mid_t ue_id); /* currently broken
int flexran_get_intra_sf_hopping(mid_t ue_id); */
/* UE support for type 2 hopping with /* UE support for type 2 hopping with
n_sb>1 */ n_sb>1 */
int flexran_get_type2_sb_1(mid_t ue_id); /* currently broken
int flexran_get_type2_sb_1(mid_t ue_id); */
/* Get the UE category */ /* Get the UE category */
int flexran_get_ue_category(mid_t ue_id); /* currently broken
int flexran_get_ue_category(mid_t ue_id); */
/* UE support for resource allocation /* UE support for resource allocation
type 1 */ type 1 */
int flexran_get_res_alloc_type1(mid_t ue_id); /* currently broken
int flexran_get_res_alloc_type1(mid_t ue_id); */
/* Get UE transmission mode */ /* Get UE transmission mode */
int flexran_get_ue_transmission_mode(mid_t mod_id, mid_t ue_id); long flexran_get_ue_transmission_mode(mid_t mod_id, mid_t ue_id);
/* Boolean value. See TS 36.321 */ /* Boolean value. See TS 36.321 */
int flexran_get_tti_bundling(mid_t mod_id, mid_t ue_id); BOOLEAN_t flexran_get_tti_bundling(mid_t mod_id, mid_t ue_id);
/* The max HARQ retransmission for UL. /* The max HARQ retransmission for UL.
See TS 36.321 */ See TS 36.321 */
int flexran_get_maxHARQ_TX(mid_t mod_id, mid_t ue_id); long flexran_get_maxHARQ_TX(mid_t mod_id, mid_t ue_id);
/* See TS 36.213 */ /* See TS 36.213 */
int flexran_get_beta_offset_ack_index(mid_t mod_id, mid_t ue_id); long flexran_get_beta_offset_ack_index(mid_t mod_id, mid_t ue_id);
/* See TS 36.213 */ /* See TS 36.213 */
int flexran_get_beta_offset_ri_index(mid_t mod_id, mid_t ue_id); long flexran_get_beta_offset_ri_index(mid_t mod_id, mid_t ue_id);
/* See TS 36.213 */ /* See TS 36.213 */
int flexran_get_beta_offset_cqi_index(mid_t mod_id, mid_t ue_id); long flexran_get_beta_offset_cqi_index(mid_t mod_id, mid_t ue_id);
/* Boolean. See TS36.213, Section 10.1 */ /* Boolean. See TS36.213, Section 10.1 */
int flexran_get_simultaneous_ack_nack_cqi(mid_t mod_id, mid_t ue_id); BOOLEAN_t flexran_get_simultaneous_ack_nack_cqi(mid_t mod_id, mid_t ue_id);
/* Boolean. See TS 36.213, Section 8.2 */ /* Boolean. See TS 36.213, Section 8.2 */
int flexran_get_ack_nack_simultaneous_trans(mid_t mod_id,mid_t ue_id); BOOLEAN_t flexran_get_ack_nack_simultaneous_trans(mid_t mod_id, mid_t ue_id, uint8_t cc_id);
/* Get aperiodic CQI report mode */ /* Get aperiodic CQI report mode */
int flexran_get_aperiodic_cqi_rep_mode(mid_t mod_id,mid_t ue_id); CQI_ReportModeAperiodic_t flexran_get_aperiodic_cqi_rep_mode(mid_t mod_id,mid_t ue_id);
/* Get ACK/NACK feedback mode. TDD only */ /* Get ACK/NACK feedback mode. TDD only */
int flexran_get_tdd_ack_nack_feedback(mid_t mod_id, mid_t ue_id); long flexran_get_tdd_ack_nack_feedback_mode(mid_t mod_id, mid_t ue_id);
/* See TS36.213, section 10.1 */ /* See TS36.213, section 10.1 */
int flexran_get_ack_nack_repetition_factor(mid_t mod_id, mid_t ue_id); long flexran_get_ack_nack_repetition_factor(mid_t mod_id, mid_t ue_id);
/* Boolean. Extended buffer status report size */ /* Boolean. Extended buffer status report size */
int flexran_get_extended_bsr_size(mid_t mod_id, mid_t ue_id); long flexran_get_extended_bsr_size(mid_t mod_id, mid_t ue_id);
/* Get number of UE transmission antennas */ /* Get number of UE transmission antennas */
int flexran_get_ue_transmission_antenna(mid_t mod_id, mid_t ue_id); int flexran_get_ue_transmission_antenna(mid_t mod_id, mid_t ue_id);
/* Get logical channel group of a channel with id lc_id */ /* Get logical channel group of a channel with id lc_id */
int flexran_get_lcg(mid_t ue_id, mid_t lc_id); long flexran_get_lcg(mid_t ue_id, mid_t lc_id);
/* Get direction of logical channel with id lc_id */ /* Get direction of logical channel with id lc_id */
int flexran_get_direction(mid_t ue_id, mid_t lc_id); int flexran_get_direction(mid_t ue_id, mid_t lc_id);
/*Get downlink frequency*/ /*Get downlink frequency*/
uint32_t flexran_agent_get_operating_dl_freq (mid_t mod_id, int cc_id); uint32_t flexran_agent_get_operating_dl_freq(mid_t mod_id, uint8_t cc_id);
/*Get uplink frequency*/ /*Get uplink frequency*/
uint32_t flexran_agent_get_operating_ul_freq (mid_t mod_id, int cc_id); uint32_t flexran_agent_get_operating_ul_freq(mid_t mod_id, uint8_t cc_id);
/*Get eutra band*/ /*Get eutra band*/
int flexran_agent_get_operating_eutra_band (mid_t mod_id, int cc_id); uint8_t flexran_agent_get_operating_eutra_band(mid_t mod_id, uint8_t cc_id);
/*Get downlink ref signal power*/ /*Get downlink ref signal power*/
int flexran_agent_get_operating_pdsch_refpower (mid_t mod_id, int cc_id); int8_t flexran_agent_get_operating_pdsch_refpower(mid_t mod_id, uint8_t cc_id);
/*Get uplink power*/ /*Get uplink power*/
int flexran_agent_get_operating_pusch_p0 (mid_t mod_id, int cc_id); long flexran_agent_get_operating_pusch_p0(mid_t mod_id, uint8_t cc_id);
/*set the dl freq */ /*set the dl freq */
void flexran_agent_set_operating_dl_freq (mid_t mod_id, int cc_id, uint32_t dl_freq_mhz); void flexran_agent_set_operating_dl_freq(mid_t mod_id, uint8_t cc_id, uint32_t dl_freq_mhz);
/* set the ul freq */ /* set the ul freq */
void flexran_agent_set_operating_ul_freq (mid_t mod_id, int cc_id, int32_t ul_freq_offset_mhz); void flexran_agent_set_operating_ul_freq(mid_t mod_id, uint8_t cc_id, int32_t ul_freq_mhz_offset);
/*set the the band */ /*set the the band */
void flexran_agent_set_operating_eutra_band (mid_t mod_id, int cc_id); void flexran_agent_set_operating_eutra_band(mid_t mod_id, uint8_t cc_id, uint8_t eutra_band);
/* set the bandwidth */ /* set the bandwidth (in RB) */
void flexran_agent_set_operating_bandwidth (mid_t mod_id, int cc_id, int bandwidth); void flexran_agent_set_operating_bandwidth(mid_t mod_id, uint8_t cc_id, uint8_t N_RB);
/*set frame type*/ /*set frame type*/
void flexran_agent_set_operating_frame_type (mid_t mod_id, int cc_id, int frame_type); void flexran_agent_set_operating_frame_type(mid_t mod_id, uint8_t cc_id, lte_frame_type_t frame_type);
/*RRC status flexRAN*/ /*RRC status flexRAN*/
int flexran_get_rrc_status(const mid_t mod_id, const rnti_t rntiP); uint8_t flexran_get_rrc_status(const mid_t mod_id, const rnti_t rntiP);
/***************************** PDCP ***********************/ /***************************** PDCP ***********************/
...@@ -399,28 +411,30 @@ uint32_t flexran_get_pdcp_rx_oo(const mid_t mod_id, const mid_t ue_id, const lc ...@@ -399,28 +411,30 @@ uint32_t flexran_get_pdcp_rx_oo(const mid_t mod_id, const mid_t ue_id, const lc
/*********************RRC**********************/ /*********************RRC**********************/
/*Get primary cell measuremeant id flexRAN*/ /*Get primary cell measuremeant id flexRAN*/
int flexran_get_rrc_pcell_measid(mid_t mod_id, mid_t ue_id); MeasId_t flexran_get_rrc_pcell_measid(mid_t mod_id, mid_t ue_id);
/*Get primary cell RSRP measurement flexRAN*/ /*Get primary cell RSRP measurement flexRAN*/
int flexran_get_rrc_pcell_rsrp(mid_t mod_id, mid_t ue_id); float flexran_get_rrc_pcell_rsrp(mid_t mod_id, mid_t ue_id);
/*Get primary cell RSRQ measurement flexRAN*/ /*Get primary cell RSRQ measurement flexRAN*/
int flexran_get_rrc_pcell_rsrq(mid_t mod_id, mid_t ue_id); float flexran_get_rrc_pcell_rsrq(mid_t mod_id, mid_t ue_id);
/* Get RRC neighbouring measurement */ /* Get RRC neighbouring measurement */
int flexran_get_rrc_num_ncell(mid_t mod_id, mid_t ue_id); int flexran_get_rrc_num_ncell(mid_t mod_id, mid_t ue_id);
/*Get physical cell id*/ /*Get physical cell id*/
int flexran_get_rrc_neigh_phy_cell_id(mid_t mod_id, mid_t ue_id, int cell_id); PhysCellId_t flexran_get_rrc_neigh_phy_cell_id(mid_t mod_id, mid_t ue_id, int cell_id);
/*Get RSRP of neighbouring Cell*/ /*Get RSRP of neighbouring Cell*/
int flexran_get_rrc_neigh_rsrp(mid_t mod_id, mid_t ue_id, int cell_id); float flexran_get_rrc_neigh_rsrp(mid_t mod_id, mid_t ue_id, int cell_id);
/*Get RSRQ of neighbouring Cell*/ /*Get RSRQ of neighbouring Cell*/
int flexran_get_rrc_neigh_rsrq(mid_t mod_id, mid_t ue_id, int cell_id); float flexran_get_rrc_neigh_rsrq(mid_t mod_id, mid_t ue_id, int cell_id);
/*Get MCC PLMN identity neighbouring Cell*/ /*Get MCC PLMN identity neighbouring Cell*/
int flexran_get_rrc_neigh_plmn_mcc(mid_t mod_id, mid_t ue_id, int cell_id); /* currently not implemented
int flexran_get_rrc_neigh_plmn_mcc(mid_t mod_id, mid_t ue_id, int cell_id); */
/*Get MNC PLMN identity neighbouring Cell*/ /*Get MNC PLMN identity neighbouring Cell*/
int flexran_get_rrc_neigh_plmn_mnc(mid_t mod_id, mid_t ue_id, int cell_id); /* currently not implemented
\ No newline at end of file int flexran_get_rrc_neigh_plmn_mnc(mid_t mod_id, mid_t ue_id, int cell_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