Commit 3fa3e6b1 authored by shahab SHARIAT BAGHERI's avatar shahab SHARIAT BAGHERI Committed by Robert Schmidt

Monitoring App MAC status related parameters

parent d741b951
...@@ -53,6 +53,8 @@ ...@@ -53,6 +53,8 @@
extern uint8_t nfapi_mode; extern uint8_t nfapi_mode;
int oai_nfapi_rach_ind(nfapi_rach_indication_t *rach_ind); int oai_nfapi_rach_ind(nfapi_rach_indication_t *rach_ind);
int harq_pid_updated[NUM_MAX_UE][8];
int harq_pid_round[NUM_MAX_UE][8];
void pmch_procedures(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc,PHY_VARS_RN *rn,relaying_type_t r_type) { void pmch_procedures(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc,PHY_VARS_RN *rn,relaying_type_t r_type) {
......
...@@ -27,8 +27,6 @@ ...@@ -27,8 +27,6 @@
*/ */
#include "flexran_agent_mac.h" #include "flexran_agent_mac.h"
#include "flexran_agent_extern.h"
#include "flexran_agent_common.h"
#include "flexran_agent_mac_internal.h" #include "flexran_agent_mac_internal.h"
#include "flexran_agent_net_comm.h" #include "flexran_agent_net_comm.h"
#include "flexran_agent_timer.h" #include "flexran_agent_timer.h"
...@@ -61,8 +59,8 @@ int flexran_agent_mac_stats_reply(mid_t mod_id, ...@@ -61,8 +59,8 @@ int flexran_agent_mac_stats_reply(mid_t mod_id,
// Protocol__FlexHeader *header; // Protocol__FlexHeader *header;
int i, j, k; int i, j, k, lcid;
// int cc_id = 0; int cc_id = 0;
int enb_id = mod_id; int enb_id = mod_id;
/* Allocate memory for list of UE reports */ /* Allocate memory for list of UE reports */
...@@ -490,6 +488,85 @@ int flexran_agent_mac_stats_reply(mid_t mod_id, ...@@ -490,6 +488,85 @@ 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_MON_APP) {
Protocol__FlexMonApp *monapp;
monapp = malloc(sizeof(Protocol__FlexMonApp));
if (monapp == NULL)
goto error;
protocol__flex_mon_app__init(monapp);
monapp->size_sdus_dl = flexran_get_size_dl_mac_sdus(mod_id, cc_id);
monapp->has_size_sdus_dl = 1;
monapp->size_sdus_ul = flexran_get_size_ul_mac_sdus(mod_id, cc_id);
monapp->has_size_sdus_ul = 1;
monapp->total_size_sdus_dl = flexran_get_total_size_dl_mac_sdus(mod_id, i, cc_id);
monapp->has_total_size_sdus_dl = 1;
monapp->total_size_sdus_ul = flexran_get_total_size_ul_mac_sdus(mod_id, i, cc_id);
monapp->has_total_size_sdus_ul = 1;
monapp->harq_round = flexran_get_harq_round(mod_id, cc_id, i);
monapp->has_harq_round = 1;
monapp->dl_tbs = flexran_get_TBS_dl(mod_id, i, cc_id);
monapp->has_dl_tbs = 1;
monapp->ul_tbs = flexran_get_TBS_ul(mod_id, i, cc_id);
monapp->has_ul_tbs = 1;
monapp->prb_retx = flexran_get_num_prb_retx_per_ue(mod_id, i, cc_id);
monapp->has_prb_retx = 1;
monapp->prb_tx = flexran_get_num_prb_dl_tx_per_ue(mod_id, i, cc_id);
monapp->has_prb_tx = 1;
monapp->prb_rx = flexran_get_num_prb_ul_rx_per_ue(mod_id, i, cc_id);
monapp->has_prb_rx = 1;
monapp->total_prb_tx = flexran_get_total_prb_dl_tx_per_ue(mod_id, i, cc_id);
monapp->has_total_prb_tx = 1;
monapp->total_prb_rx = flexran_get_total_prb_ul_rx_per_ue(mod_id, i, cc_id);
monapp->has_total_prb_rx = 1;
monapp->total_pdu_tx = flexran_get_total_num_pdu_dl(mod_id, i, cc_id);
monapp->has_total_pdu_tx = 1;
monapp->total_pdu_rx = flexran_get_total_num_pdu_ul(mod_id, i, cc_id);
monapp->has_total_pdu_rx = 1;
Protocol__FlexRecMacSdu ** mac_sdus;
mac_sdus = malloc(sizeof(Protocol__FlexRecMacSdu) * flexran_get_num_mac_sdu_tx(mod_id, i, cc_id));
if (mac_sdus == NULL)
goto error;
monapp->n_rec_mac_sdu = flexran_get_num_mac_sdu_tx(mod_id, i, cc_id);
for (j = 0; j < monapp->n_rec_mac_sdu; j++){
mac_sdus[j] = malloc(sizeof(Protocol__FlexRecMacSdu));
protocol__flex_rec_mac_sdu__init(mac_sdus[j]);
mac_sdus[j]->lcid = flexran_get_mac_sdu_lcid_index(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);
mac_sdus[j]->has_sdu_length = 1;
}
monapp->rec_mac_sdu = mac_sdus;
ue_report[i]->mon_app = monapp;
}
...@@ -785,7 +862,7 @@ int flexran_agent_mac_sf_trigger(mid_t mod_id, const void *params, Protocol__Fle ...@@ -785,7 +862,7 @@ int flexran_agent_mac_sf_trigger(mid_t mod_id, const void *params, Protocol__Fle
for (i = 0; i < NUMBER_OF_UE_MAX; i++) { for (i = 0; i < NUMBER_OF_UE_MAX; i++) {
for (j = 0; j < 8; j++) { for (j = 0; j < 8; j++) {
if (RC.mac && RC.mac[mod_id] && RC.mac[mod_id]->UE_list.eNB_UE_stats[UE_PCCID(mod_id,i)][i].harq_pid == 1) { if (harq_pid_updated[i][j] == 1) {
available_harq[i] = j; available_harq[i] = j;
sf_trigger_msg->n_dl_info++; sf_trigger_msg->n_dl_info++;
break; break;
...@@ -794,6 +871,7 @@ int flexran_agent_mac_sf_trigger(mid_t mod_id, const void *params, Protocol__Fle ...@@ -794,6 +871,7 @@ int flexran_agent_mac_sf_trigger(mid_t mod_id, const void *params, Protocol__Fle
} }
// LOG_I(FLEXRAN_AGENT, "Sending subframe trigger for frame %d and subframe %d\n", flexran_get_current_frame(mod_id), (flexran_get_current_subframe(mod_id) + 1) % 10); // LOG_I(FLEXRAN_AGENT, "Sending subframe trigger for frame %d and subframe %d\n", flexran_get_current_frame(mod_id), (flexran_get_current_subframe(mod_id) + 1) % 10);
/*TODO: Fill in the number of dl HARQ related info, based on the number of currently /*TODO: Fill in the number of dl HARQ related info, based on the number of currently
...@@ -828,14 +906,13 @@ int flexran_agent_mac_sf_trigger(mid_t mod_id, const void *params, Protocol__Fle ...@@ -828,14 +906,13 @@ int flexran_agent_mac_sf_trigger(mid_t mod_id, const void *params, Protocol__Fle
dl_info[i]->harq_process_id = available_harq[UE_id]; dl_info[i]->harq_process_id = available_harq[UE_id];
if (RC.mac && RC.mac[mod_id]) harq_pid_updated[UE_id][available_harq[UE_id]] = 0;
RC.mac[mod_id]->UE_list.eNB_UE_stats[UE_PCCID(mod_id,i)][UE_id].harq_pid = 0;
dl_info[i]->has_harq_process_id = 1; dl_info[i]->has_harq_process_id = 1;
/* Fill in the status of the HARQ process (2 TBs)*/ /* Fill in the status of the HARQ process (2 TBs)*/
dl_info[i]->n_harq_status = 2; dl_info[i]->n_harq_status = 2;
dl_info[i]->harq_status = malloc(sizeof(uint32_t) * dl_info[i]->n_harq_status); dl_info[i]->harq_status = malloc(sizeof(uint32_t) * dl_info[i]->n_harq_status);
for (j = 0; j < dl_info[i]->n_harq_status; j++) { for (j = 0; j < dl_info[i]->n_harq_status; j++) {
dl_info[i]->harq_status[j] = RC.mac[mod_id]->UE_list.UE_sched_ctrl[i].round[UE_PCCID(mod_id,i)][j]; dl_info[i]->harq_status[j] = harq_pid_round[UE_id][available_harq[UE_id]];
// TODO: This should be different per TB // TODO: This should be different per TB
} }
// LOG_I(FLEXRAN_AGENT, "Sending subframe trigger for frame %d and subframe %d and harq %d (round %d)\n", flexran_get_current_frame(mod_id), (flexran_get_current_subframe(mod_id) + 1) % 10, dl_info[i]->harq_process_id, dl_info[i]->harq_status[0]); // LOG_I(FLEXRAN_AGENT, "Sending subframe trigger for frame %d and subframe %d and harq %d (round %d)\n", flexran_get_current_frame(mod_id), (flexran_get_current_subframe(mod_id) + 1) % 10, dl_info[i]->harq_process_id, dl_info[i]->harq_status[0]);
...@@ -1169,10 +1246,10 @@ void flexran_agent_init_mac_agent(mid_t mod_id) { ...@@ -1169,10 +1246,10 @@ void flexran_agent_init_mac_agent(mid_t mod_id) {
lfds700_ringbuffer_init_valid_on_current_logical_core( &ringbuffer_state[mod_id], dl_mac_config_array[mod_id], num_elements, &ps[mod_id], NULL ); lfds700_ringbuffer_init_valid_on_current_logical_core( &ringbuffer_state[mod_id], dl_mac_config_array[mod_id], num_elements, &ps[mod_id], NULL );
for (i = 0; i < NUMBER_OF_UE_MAX; i++) { for (i = 0; i < NUMBER_OF_UE_MAX; i++) {
for (j = 0; j < 8; j++) { for (j = 0; j < 8; j++) {
if (RC.mac && RC.mac[mod_id]) harq_pid_updated[i][j] = 0;
RC.mac[mod_id]->UE_list.eNB_UE_stats[UE_PCCID(mod_id,i)][i].harq_pid = 0;
} }
} }
} }
/*********************************************** /***********************************************
......
...@@ -269,3 +269,32 @@ message flex_pdcp_stats { ...@@ -269,3 +269,32 @@ message flex_pdcp_stats {
optional uint64 sfn=17; optional uint64 sfn=17;
} }
//
// Monitoring App
//
message flex_mon_app {
optional uint32 size_sdus_dl = 1;
optional uint32 size_sdus_ul = 2;
optional uint32 total_size_sdus_dl = 3;
optional uint32 total_size_sdus_ul = 4;
optional uint32 harq_round = 5;
optional uint32 dl_tbs = 6;
optional uint32 ul_tbs = 7;
optional uint32 prb_retx = 8;
optional uint32 prb_tx = 9;
optional uint32 prb_rx = 10;
optional uint32 total_prb_tx = 11;
optional uint32 total_prb_rx = 12;
optional uint32 total_pdu_tx = 13;
optional uint32 total_pdu_rx = 14;
repeated flex_rec_mac_sdu rec_mac_sdu = 15;
}
message flex_rec_mac_sdu {
optional uint32 sdu_length = 1;
optional uint32 lcid = 2;
}
...@@ -49,6 +49,7 @@ message flex_ue_stats_report { ...@@ -49,6 +49,7 @@ message flex_ue_stats_report {
optional flex_ul_cqi_report ul_cqi_report = 9; optional flex_ul_cqi_report ul_cqi_report = 9;
optional flex_rrc_measurements rrc_measurements = 10; optional flex_rrc_measurements rrc_measurements = 10;
optional flex_pdcp_stats pdcp_stats = 11; optional flex_pdcp_stats pdcp_stats = 11;
optional flex_mon_app mon_app = 12;
} }
// //
...@@ -85,6 +86,7 @@ enum flex_ue_stats_type { ...@@ -85,6 +86,7 @@ enum flex_ue_stats_type {
FLUST_DL_CQI = 16; FLUST_DL_CQI = 16;
FLUST_PBS = 32; FLUST_PBS = 32;
FLUST_UL_CQI = 64; FLUST_UL_CQI = 64;
FLUST_MON_APP = 128;
FLUST_PDCP_STATS = 1024; FLUST_PDCP_STATS = 1024;
FLUST_RRC_MEASUREMENTS = 65536; FLUST_RRC_MEASUREMENTS = 65536;
......
...@@ -132,7 +132,7 @@ int8_t flexran_get_ue_phr(mid_t mod_id, mid_t ue_id) ...@@ -132,7 +132,7 @@ int8_t flexran_get_ue_phr(mid_t mod_id, mid_t ue_id)
uint8_t 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)
{ {
if (!phy_is_present(mod_id, 0)) return 0; if (!phy_is_present(mod_id, 0)) return 0;
return RC.eNB[mod_id][0]->UE_stats[ue_id].DL_cqi[0]; return RC.mac[mod_id]->UE_list.UE_sched_ctrl[ue_id].dl_cqi[0];
} }
rlc_buffer_occupancy_t 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)
...@@ -239,6 +239,124 @@ int flexran_get_MAC_CE_bitmap_TA(mid_t mod_id, mid_t ue_id, uint8_t cc_id) ...@@ -239,6 +239,124 @@ int flexran_get_MAC_CE_bitmap_TA(mid_t mod_id, mid_t ue_id, uint8_t cc_id)
} }
} }
uint32_t flexran_get_num_mac_sdu_tx(mid_t mod_id, mid_t ue_id, int cc_id){
if (!mac_is_present(mod_id)) return 0;
return RC.mac[mod_id]->UE_list.eNB_UE_stats[cc_id][ue_id].num_mac_sdu_tx;
}
uint32_t flexran_get_mac_sdu_size(mid_t mod_id, mid_t ue_id, int cc_id, int lcid){
if (!mac_is_present(mod_id)) return 0;
return RC.mac[mod_id]->UE_list.eNB_UE_stats[cc_id][ue_id].sdu_length_tx[lcid];
}
unsigned char flexran_get_mac_sdu_lcid(mid_t mod_id, mid_t ue_id, int cc_id, int lcid){
if (!mac_is_present(mod_id)) return 0;
return RC.mac[mod_id]->UE_list.eNB_UE_stats[cc_id][ue_id].lcid_sdu[lcid];
}
unsigned char flexran_get_mac_sdu_lcid_index(mid_t mod_id, mid_t ue_id, int cc_id, int index){
if (!mac_is_present(mod_id)) return 0;
return RC.mac[mod_id]->UE_list.eNB_UE_stats[cc_id][ue_id].lcid_sdu[index];
}
uint32_t flexran_get_total_size_dl_mac_sdus(mid_t mod_id, mid_t ue_id, int cc_id){
if (!mac_is_present(mod_id)) return 0;
return RC.mac[mod_id]->UE_list.eNB_UE_stats[cc_id][ue_id].total_sdu_bytes;
}
uint32_t flexran_get_total_size_ul_mac_sdus(mid_t mod_id, mid_t ue_id, int cc_id){
if (!mac_is_present(mod_id)) return 0;
return RC.mac[mod_id]->eNB_stats[cc_id].total_ulsch_bytes_rx;
}
uint32_t flexran_get_total_num_pdu_dl(mid_t mod_id, mid_t ue_id, int cc_id){
if (!mac_is_present(mod_id)) return 0;
return RC.mac[mod_id]->UE_list.eNB_UE_stats[cc_id][ue_id].total_num_pdus;
}
uint32_t flexran_get_total_num_pdu_ul(mid_t mod_id, mid_t ue_id, int cc_id){
if (!mac_is_present(mod_id)) return 0;
return RC.mac[mod_id]->UE_list.eNB_UE_stats[cc_id][ue_id].total_num_pdus_rx;
}
/*Total RB used This should be modified later*/
uint32_t flexran_get_total_prb_dl_tx_per_ue(mid_t mod_id, mid_t ue_id, int cc_id){
if (!mac_is_present(mod_id)) return 0;
return RC.mac[mod_id]->UE_list.eNB_UE_stats[cc_id][ue_id].total_rbs_used;
}
uint32_t flexran_get_total_prb_ul_rx_per_ue(mid_t mod_id, mid_t ue_id, int cc_id){
if (!mac_is_present(mod_id)) return 0;
return RC.mac[mod_id]->UE_list.eNB_UE_stats[cc_id][ue_id].total_rbs_used_rx;
}
uint32_t flexran_get_TBS_ul(mid_t mod_id, mid_t ue_id, int cc_id){
if (!mac_is_present(mod_id)) return 0;
return RC.mac[mod_id]->UE_list.eNB_UE_stats[cc_id][ue_id].ulsch_TBS;
}
uint32_t flexran_get_TBS_dl(mid_t mod_id, mid_t ue_id, int cc_id){
if (!mac_is_present(mod_id)) return 0;
return RC.mac[mod_id]->UE_list.eNB_UE_stats[cc_id][ue_id].TBS;
}
uint16_t flexran_get_num_prb_retx_per_ue(mid_t mod_id, mid_t ue_id, uint32_t cc_id) {
if (!mac_is_present(mod_id)) return 0;
return RC.mac[mod_id]->UE_list.eNB_UE_stats[cc_id][ue_id].rbs_used_retx;
}
uint16_t flexran_get_num_prb_dl_tx_per_ue(mid_t mod_id, mid_t ue_id, uint32_t cc_id){
if (!mac_is_present(mod_id)) return 0;
return RC.mac[mod_id]->UE_list.eNB_UE_stats[cc_id][ue_id].rbs_used;
}
uint16_t flexran_get_num_prb_ul_rx_per_ue(mid_t mod_id, mid_t ue_id, uint32_t cc_id){
if (!mac_is_present(mod_id)) return 0;
return RC.mac[mod_id]->UE_list.eNB_UE_stats[cc_id][ue_id].rbs_used_rx;
}
uint32_t flexran_get_size_dl_mac_sdus(mid_t mod_id, uint32_t cc_id){
if (!mac_is_present(mod_id)) return 0;
return RC.mac[mod_id]->eNB_stats[cc_id].dlsch_bytes_tx;
}
uint32_t flexran_get_size_ul_mac_sdus(mid_t mod_id, uint32_t cc_id){
if (!mac_is_present(mod_id)) return 0;
return RC.mac[mod_id]->eNB_stats[cc_id].ulsch_bytes_rx;
}
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 (!mac_is_present(mod_id)) return 0; if (!mac_is_present(mod_id)) return 0;
...@@ -307,6 +425,9 @@ int flexran_get_harq(mid_t mod_id, ...@@ -307,6 +425,9 @@ int flexran_get_harq(mid_t mod_id,
} }
*pid = harq_pid; *pid = harq_pid;
*round = harq_round;*/ *round = harq_round;*/
/* if (round > 0) { */ /* if (round > 0) { */
...@@ -319,6 +440,15 @@ int flexran_get_harq(mid_t mod_id, ...@@ -319,6 +440,15 @@ int flexran_get_harq(mid_t mod_id,
return 0; return 0;
} }
int flexran_get_harq_round(mid_t mod_id, uint8_t cc_id, mid_t ue_id){
if (!mac_is_present(mod_id)) return 0;
return RC.mac[mod_id]->UE_list.eNB_UE_stats[cc_id][ue_id].harq_round;
}
int32_t flexran_get_p0_pucch_dbm(mid_t mod_id, mid_t ue_id, uint8_t cc_id) int32_t flexran_get_p0_pucch_dbm(mid_t mod_id, mid_t ue_id, uint8_t cc_id)
{ {
if (!phy_is_present(mod_id, cc_id)) return 0; if (!phy_is_present(mod_id, cc_id)) return 0;
......
...@@ -87,6 +87,12 @@ int8_t flexran_get_ue_phr(mid_t mod_id, mid_t ue_id); ...@@ -87,6 +87,12 @@ int8_t flexran_get_ue_phr(mid_t mod_id, mid_t ue_id);
/* Get the UE wideband CQI */ /* Get the UE wideband CQI */
uint8_t 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 downlink TBS*/
uint32_t flexran_get_TBS_dl(mid_t mod_id, mid_t ue_id, int cc_id);
/*Get uplink TBS */
uint32_t flexran_get_TBS_ul(mid_t mod_id, mid_t ue_id, int cc_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 */
rlc_buffer_occupancy_t 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);
...@@ -107,6 +113,51 @@ void flexran_update_TA(mid_t mod_id, mid_t ue_id, uint8_t cc_id); */ ...@@ -107,6 +113,51 @@ void flexran_update_TA(mid_t mod_id, mid_t ue_id, uint8_t cc_id); */
/* this function is broken */ /* this function is broken */
int flexran_get_MAC_CE_bitmap_TA(mid_t mod_id, mid_t ue_id, uint8_t cc_id); int flexran_get_MAC_CE_bitmap_TA(mid_t mod_id, mid_t ue_id, uint8_t cc_id);
/*Return the MAC sdu size got from logical channel lcid */
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 LCID MAC SDU*/
unsigned char flexran_get_mac_sdu_lcid(mid_t mod_id, mid_t ue_id, int cc_id, int lcid);
/*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 MAC size sdus length dl*/
uint32_t flexran_get_size_dl_mac_sdus(mid_t mod_id, uint32_t cc_id);
/*Get MAC size sdus length ul */
uint32_t flexran_get_size_ul_mac_sdus(mid_t mod_id, uint32_t cc_id);
/*Get total size DL MAC SDUS*/
uint32_t flexran_get_total_size_dl_mac_sdus(mid_t mod_id, mid_t ue_id, int cc_id);
/*Get total size of UL mac SDUS*/
uint32_t flexran_get_total_size_ul_mac_sdus(mid_t mod_id, mid_t ue_id, int cc_id);
/*Get total number of PDU DL*/
uint32_t flexran_get_total_num_pdu_dl(mid_t mod_id, mid_t ue_id, int cc_id);
/*Get total number of PDU UL*/
uint32_t flexran_get_total_num_pdu_ul(mid_t mod_id, mid_t ue_id, int cc_id);
/*Get total PRB dl TODO Should be changed*/
uint32_t flexran_get_total_prb_dl_tx_per_ue(mid_t mod_id, mid_t ue_id, int cc_id);
/*Get total PRB ul TODO Should be changed*/
uint32_t flexran_get_total_prb_ul_rx_per_ue(mid_t mod_id, mid_t ue_id, int cc_id);
/*Get number of prb for tx per UE DL*/
uint16_t flexran_get_num_prb_dl_tx_per_ue(mid_t mod_id, mid_t ue_id, uint32_t cc_id);
/*Get number of prb for rx per UE UL*/
uint16_t flexran_get_num_prb_ul_rx_per_ue(mid_t mod_id, mid_t ue_id, uint32_t cc_id);
/*Get number of prb for retx per UE*/
uint16_t flexran_get_num_prb_retx_per_ue(mid_t mod_id, mid_t ue_id, uint32_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);
...@@ -198,6 +249,8 @@ int flexran_get_harq(mid_t mod_id, uint8_t cc_id, mid_t ue_id, frame_t frame, ...@@ -198,6 +249,8 @@ 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, sub_frame_t subframe, unsigned char *id, unsigned char *round,
uint8_t harq_flag); */ uint8_t harq_flag); */
int flexran_get_harq_round(mid_t mod_id, uint8_t cc_id, mid_t ue_id);
/* Uplink power control management*/ /* Uplink power control management*/
int32_t flexran_get_p0_pucch_dbm(mid_t mod_id, mid_t ue_id, uint8_t cc_id); int32_t flexran_get_p0_pucch_dbm(mid_t mod_id, mid_t ue_id, uint8_t cc_id);
......
...@@ -562,6 +562,13 @@ typedef struct { ...@@ -562,6 +562,13 @@ typedef struct {
uint32_t num_retransmission; uint32_t num_retransmission;
/// instantaneous tx throughput for each TTI /// instantaneous tx throughput for each TTI
// uint32_t tti_throughput[NB_RB_MAX]; // uint32_t tti_throughput[NB_RB_MAX];
// Number of received MAC SDU DL
uint32_t num_mac_sdu_tx;
// LCID related to SDU
unsigned char lcid_sdu[NB_RB_MAX];
// Length of SDU Got from LC DL
uint32_t sdu_length_tx[NB_RB_MAX];
/// overall /// overall
// //
...@@ -648,6 +655,10 @@ typedef struct { ...@@ -648,6 +655,10 @@ typedef struct {
uint32_t total_num_pdus_rx; uint32_t total_num_pdus_rx;
/// num of error pdus /// num of error pdus
uint32_t total_num_errors_rx; uint32_t total_num_errors_rx;
// Number of MAC SDU UL
uint32_t num_mac_sdu_rx;
// Length of SDU Got from LC UL
uint32_t sdu_length_rx[NB_RB_MAX];
} eNB_UE_STATS; } eNB_UE_STATS;
/*! \brief eNB template for UE context information */ /*! \brief eNB template for UE context information */
......
...@@ -1025,6 +1025,8 @@ schedule_ue_spec(module_id_t module_idP,slice_id_t slice_idP, ...@@ -1025,6 +1025,8 @@ schedule_ue_spec(module_id_t module_idP,slice_id_t slice_idP,
module_idP, CC_id, sdu_lengths[0]); module_idP, CC_id, sdu_lengths[0]);
sdu_length_total = sdu_lengths[0]; sdu_length_total = sdu_lengths[0];
sdu_lcids[0] = DCCH; sdu_lcids[0] = DCCH;
UE_list->eNB_UE_stats[CC_id][UE_id].lcid_sdu[0] = DCCH;
UE_list->eNB_UE_stats[CC_id][UE_id].sdu_length_tx[DCCH] = sdu_lengths[0];
UE_list->eNB_UE_stats[CC_id][UE_id].num_pdu_tx[DCCH] += 1; UE_list->eNB_UE_stats[CC_id][UE_id].num_pdu_tx[DCCH] += 1;
UE_list->eNB_UE_stats[CC_id][UE_id].num_bytes_tx[DCCH] += sdu_lengths[0]; UE_list->eNB_UE_stats[CC_id][UE_id].num_bytes_tx[DCCH] += sdu_lengths[0];
num_sdus = 1; num_sdus = 1;
...@@ -1068,8 +1070,9 @@ schedule_ue_spec(module_id_t module_idP,slice_id_t slice_idP, ...@@ -1068,8 +1070,9 @@ schedule_ue_spec(module_id_t module_idP,slice_id_t slice_idP,
sdu_lcids[num_sdus] = DCCH1; sdu_lcids[num_sdus] = DCCH1;
sdu_length_total += sdu_lengths[num_sdus]; sdu_length_total += sdu_lengths[num_sdus];
header_len_dcch += 2; header_len_dcch += 2;
UE_list->eNB_UE_stats[CC_id][UE_id]. UE_list->eNB_UE_stats[CC_id][UE_id].lcid_sdu[num_sdus] = DCCH1;
num_pdu_tx[DCCH1] += 1; UE_list->eNB_UE_stats[CC_id][UE_id].sdu_length_tx[DCCH1] = sdu_lengths[num_sdus];
UE_list->eNB_UE_stats[CC_id][UE_id].num_pdu_tx[DCCH1] += 1;
UE_list->eNB_UE_stats[CC_id][UE_id].num_bytes_tx[DCCH1] += sdu_lengths[num_sdus]; UE_list->eNB_UE_stats[CC_id][UE_id].num_bytes_tx[DCCH1] += sdu_lengths[num_sdus];
num_sdus++; num_sdus++;
#ifdef DEBUG_eNB_SCHEDULER #ifdef DEBUG_eNB_SCHEDULER
...@@ -1139,12 +1142,10 @@ schedule_ue_spec(module_id_t module_idP,slice_id_t slice_idP, ...@@ -1139,12 +1142,10 @@ schedule_ue_spec(module_id_t module_idP,slice_id_t slice_idP,
module_idP, sdu_lengths[num_sdus], lcid); module_idP, sdu_lengths[num_sdus], lcid);
sdu_lcids[num_sdus] = lcid; sdu_lcids[num_sdus] = lcid;
sdu_length_total += sdu_lengths[num_sdus]; sdu_length_total += sdu_lengths[num_sdus];
UE_list-> UE_list->eNB_UE_stats[CC_id][UE_id].lcid_sdu[num_sdus] = lcid;
eNB_UE_stats[CC_id][UE_id].num_pdu_tx[lcid] UE_list->eNB_UE_stats[CC_id][UE_id].sdu_length_tx[lcid] = sdu_lengths[num_sdus];
+= 1; UE_list->eNB_UE_stats[CC_id][UE_id].num_pdu_tx[lcid] += 1;
UE_list-> UE_list->eNB_UE_stats[CC_id][UE_id].num_bytes_tx[lcid] += sdu_lengths[num_sdus];
eNB_UE_stats[CC_id][UE_id].num_bytes_tx
[lcid] += sdu_lengths[num_sdus];
if (sdu_lengths[num_sdus] < 128) { if (sdu_lengths[num_sdus] < 128) {
header_len_dtch--; header_len_dtch--;
header_len_dtch_last--; header_len_dtch_last--;
...@@ -1345,6 +1346,7 @@ schedule_ue_spec(module_id_t module_idP,slice_id_t slice_idP, ...@@ -1345,6 +1346,7 @@ schedule_ue_spec(module_id_t module_idP,slice_id_t slice_idP,
UE_list->eNB_UE_stats[CC_id][UE_id].rbs_used = nb_rb; UE_list->eNB_UE_stats[CC_id][UE_id].rbs_used = nb_rb;
UE_list->eNB_UE_stats[CC_id][UE_id].total_rbs_used += nb_rb; UE_list->eNB_UE_stats[CC_id][UE_id].total_rbs_used += nb_rb;
UE_list->eNB_UE_stats[CC_id][UE_id].num_mac_sdu_tx = num_sdus;
UE_list->eNB_UE_stats[CC_id][UE_id].dlsch_mcs1 = eNB_UE_stats->dlsch_mcs1; UE_list->eNB_UE_stats[CC_id][UE_id].dlsch_mcs1 = eNB_UE_stats->dlsch_mcs1;
UE_list->eNB_UE_stats[CC_id][UE_id].dlsch_mcs2 = mcs; UE_list->eNB_UE_stats[CC_id][UE_id].dlsch_mcs2 = mcs;
UE_list->eNB_UE_stats[CC_id][UE_id].TBS = TBS; UE_list->eNB_UE_stats[CC_id][UE_id].TBS = TBS;
......
...@@ -29,6 +29,7 @@ ...@@ -29,6 +29,7 @@
#ifndef __LAYER2_MAC_PROTO_H__ #ifndef __LAYER2_MAC_PROTO_H__
#define __LAYER2_MAC_PROTO_H__ #define __LAYER2_MAC_PROTO_H__
#include "flexran_agent_defs.h"
#include "LAYER2/MAC/defs.h" #include "LAYER2/MAC/defs.h"
/** \addtogroup _mac /** \addtogroup _mac
......
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