Commit 305a392c authored by Robert Schmidt's avatar Robert Schmidt

renaming of functions&variables

parent 910b0254
......@@ -490,81 +490,81 @@ int flexran_agent_mac_stats_reply(mid_t mod_id,
}
if (report_config->ue_report_type[i].ue_report_flags & PROTOCOL__FLEX_UE_STATS_TYPE__FLUST_MAC_STATS) {
Protocol__FlexMacStats *monapp;
monapp = malloc(sizeof(Protocol__FlexMacStats));
if (monapp == NULL)
Protocol__FlexMacStats *mac_stats;
mac_stats = malloc(sizeof(Protocol__FlexMacStats));
if ( mac_stats == NULL)
goto error;
protocol__flex_mac_stats__init(monapp);
protocol__flex_mac_stats__init(mac_stats);
monapp->total_bytes_sdus_dl = flexran_get_total_size_dl_mac_sdus(mod_id, i, cc_id);
monapp->has_total_bytes_sdus_dl = 1;
mac_stats->total_bytes_sdus_dl = flexran_get_total_size_dl_mac_sdus(mod_id, i, cc_id);
mac_stats->has_total_bytes_sdus_dl = 1;
monapp->total_bytes_sdus_ul = flexran_get_total_size_ul_mac_sdus(mod_id, i, cc_id);
monapp->has_total_bytes_sdus_ul = 1;
mac_stats->total_bytes_sdus_ul = flexran_get_total_size_ul_mac_sdus(mod_id, i, cc_id);
mac_stats->has_total_bytes_sdus_ul = 1;
monapp->tbs_dl = flexran_get_TBS_dl(mod_id, i, cc_id);
monapp->has_tbs_dl = 1;
mac_stats->tbs_dl = flexran_get_TBS_dl(mod_id, i, cc_id);
mac_stats->has_tbs_dl = 1;
monapp->tbs_ul = flexran_get_TBS_ul(mod_id, i, cc_id);
monapp->has_tbs_ul = 1;
mac_stats->tbs_ul = flexran_get_TBS_ul(mod_id, i, cc_id);
mac_stats->has_tbs_ul = 1;
monapp->prb_retx_dl = flexran_get_num_prb_retx_dl_per_ue(mod_id, i, cc_id);
monapp->has_prb_retx_dl = 1;
mac_stats->prb_retx_dl = flexran_get_num_prb_retx_dl_per_ue(mod_id, i, cc_id);
mac_stats->has_prb_retx_dl = 1;
monapp->prb_retx_ul = flexran_get_num_prb_retx_ul_per_ue(mod_id, i, cc_id);
monapp->has_prb_retx_ul = 1;
mac_stats->prb_retx_ul = flexran_get_num_prb_retx_ul_per_ue(mod_id, i, cc_id);
mac_stats->has_prb_retx_ul = 1;
monapp->prb_dl = flexran_get_num_prb_dl_tx_per_ue(mod_id, i, cc_id);
monapp->has_prb_dl = 1;
mac_stats->prb_dl = flexran_get_num_prb_dl_tx_per_ue(mod_id, i, cc_id);
mac_stats->has_prb_dl = 1;
monapp->prb_ul = flexran_get_num_prb_ul_rx_per_ue(mod_id, i, cc_id);
monapp->has_prb_ul = 1;
mac_stats->prb_ul = flexran_get_num_prb_ul_rx_per_ue(mod_id, i, cc_id);
mac_stats->has_prb_ul = 1;
monapp->mcs1_dl = flexran_get_mcs1_dl(mod_id, i, cc_id);
monapp->has_mcs1_dl = 1;
mac_stats->mcs1_dl = flexran_get_mcs1_dl(mod_id, i, cc_id);
mac_stats->has_mcs1_dl = 1;
monapp->mcs2_dl = flexran_get_mcs2_dl(mod_id, i, cc_id);
monapp->has_mcs2_dl = 1;
mac_stats->mcs2_dl = flexran_get_mcs2_dl(mod_id, i, cc_id);
mac_stats->has_mcs2_dl = 1;
monapp->mcs1_ul = flexran_get_mcs1_ul(mod_id, i, cc_id);
monapp->has_mcs1_ul = 1;
mac_stats->mcs1_ul = flexran_get_mcs1_ul(mod_id, i, cc_id);
mac_stats->has_mcs1_ul = 1;
monapp->mcs2_ul = flexran_get_mcs2_ul(mod_id, i, cc_id);
monapp->has_mcs2_ul = 1;
mac_stats->mcs2_ul = flexran_get_mcs2_ul(mod_id, i, cc_id);
mac_stats->has_mcs2_ul = 1;
monapp->total_prb_dl = flexran_get_total_prb_dl_tx_per_ue(mod_id, i, cc_id);
monapp->has_total_prb_dl = 1;
mac_stats->total_prb_dl = flexran_get_total_prb_dl_tx_per_ue(mod_id, i, cc_id);
mac_stats->has_total_prb_dl = 1;
monapp->total_prb_ul = flexran_get_total_prb_ul_rx_per_ue(mod_id, i, cc_id);
monapp->has_total_prb_ul = 1;
mac_stats->total_prb_ul = flexran_get_total_prb_ul_rx_per_ue(mod_id, i, cc_id);
mac_stats->has_total_prb_ul = 1;
monapp->total_pdu_dl = flexran_get_total_num_pdu_dl(mod_id, i, cc_id);
monapp->has_total_pdu_dl = 1;
mac_stats->total_pdu_dl = flexran_get_total_num_pdu_dl(mod_id, i, cc_id);
mac_stats->has_total_pdu_dl = 1;
monapp->total_pdu_ul = flexran_get_total_num_pdu_ul(mod_id, i, cc_id);
monapp->has_total_pdu_ul = 1;
mac_stats->total_pdu_ul = flexran_get_total_num_pdu_ul(mod_id, i, cc_id);
mac_stats->has_total_pdu_ul = 1;
monapp->total_tbs_dl = flexran_get_total_TBS_dl(mod_id, i, cc_id);
monapp->has_total_tbs_dl = 1;
mac_stats->total_tbs_dl = flexran_get_total_TBS_dl(mod_id, i, cc_id);
mac_stats->has_total_tbs_dl = 1;
monapp->total_tbs_ul = flexran_get_total_TBS_ul(mod_id, i, cc_id);
monapp->has_total_tbs_ul = 1;
mac_stats->total_tbs_ul = flexran_get_total_TBS_ul(mod_id, i, cc_id);
mac_stats->has_total_tbs_ul = 1;
Protocol__FlexMacSdusDl ** mac_sdus;
mac_sdus = malloc(sizeof(Protocol__FlexMacSdusDl) * flexran_get_num_mac_sdu_tx(mod_id, i, cc_id));
if (mac_sdus == NULL)
goto error;
monapp->n_mac_sdus_dl = flexran_get_num_mac_sdu_tx(mod_id, i, cc_id);
mac_stats->n_mac_sdus_dl = flexran_get_num_mac_sdu_tx(mod_id, i, cc_id);
for (j = 0; j < monapp->n_mac_sdus_dl; j++){
for (j = 0; j < mac_stats->n_mac_sdus_dl; j++){
mac_sdus[j] = malloc(sizeof(Protocol__FlexMacSdusDl));
protocol__flex_mac_sdus_dl__init(mac_sdus[j]);
mac_sdus[j]->lcid = flexran_get_mac_sdu_lcid_index(mod_id, i, cc_id, j);
mac_sdus[j]->lcid = flexran_get_mac_dl_lcid_sdu(mod_id, i, cc_id, j);
mac_sdus[j]->has_lcid = 1;
mac_sdus[j]->sdu_length = flexran_get_mac_sdu_size(mod_id, i, cc_id, mac_sdus[j]->lcid);
......@@ -574,10 +574,10 @@ int flexran_agent_mac_stats_reply(mid_t mod_id,
}
monapp->mac_sdus_dl = mac_sdus;
mac_stats->mac_sdus_dl = mac_sdus;
ue_report[i]->mac_stats = monapp;
ue_report[i]->mac_stats = mac_stats;
}
......
......@@ -253,9 +253,10 @@ uint32_t flexran_get_mac_sdu_size(mid_t mod_id, mid_t ue_id, int cc_id, int lcid
}
unsigned char flexran_get_mac_sdu_lcid_index(mid_t mod_id, mid_t ue_id, int cc_id, int index){
unsigned char flexran_get_mac_dl_lcid_sdu(mid_t mod_id, mid_t ue_id, int cc_id, int index){
if (!mac_is_present(mod_id)) return 0;
if (index < 0 || index > NB_RB_MAX) return 0;
return RC.mac[mod_id]->UE_list.eNB_UE_stats[cc_id][ue_id].lcid_sdu[index];
}
......
......@@ -128,8 +128,8 @@ uint32_t flexran_get_mac_sdu_size(mid_t mod_id, mid_t ue_id, int cc_id, int lcid
/*Return number of MAC SDUs obtained in MAC layer*/
uint32_t flexran_get_num_mac_sdu_tx(mid_t mod_id, mid_t ue_id, int cc_id);
/*Get mac sdu lcid index*/
unsigned char flexran_get_mac_sdu_lcid_index(mid_t mod_id, mid_t ue_id, int cc_id, int index);
/*Get the lcid of the current mac sdu associated with the index*/
unsigned char flexran_get_mac_dl_lcid_sdu(mid_t mod_id, mid_t ue_id, int cc_id, int index);
/*Get MAC size sdus length dl*/
uint32_t flexran_get_size_dl_mac_sdus(mid_t mod_id, uint32_t cc_id);
......
......@@ -1291,7 +1291,7 @@ schedule_ulsch_rnti(module_id_t module_idP,
UE_template->oldNDI_UL[harq_pid] = ndi;
UE_list->eNB_UE_stats[CC_id][UE_id].normalized_rx_power = normalized_rx_power;
UE_list->eNB_UE_stats[CC_id][UE_id].target_rx_power = target_rx_power;
UE_template->mcs_UL[harq_pid] = cmin(UE_template->pre_assigned_mcs_ul, slice_maxmcs_uplink[slice_id]);
UE_template->mcs_UL[harq_pid] = cmin(UE_template->pre_assigned_mcs_ul, slice_maxmcs_uplink[slice_id]);
UE_list->eNB_UE_stats[CC_id][UE_id].ulsch_mcs1= UE_template->mcs_UL[harq_pid];
//cmin (UE_template->pre_assigned_mcs_ul, openair_daq_vars.target_ue_ul_mcs); // adjust, based on user-defined MCS
if (UE_template->pre_allocated_rb_table_index_ul >= 0) {
......
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