Patch to get tx_queue size from RLC for the LCs of a UE
This commit is contained in:
@@ -393,6 +393,13 @@ int get_ue_wcqi (mid_t mod_id, mid_t ue_id) {
|
|||||||
|
|
||||||
return ((UE_list_t *)enb_ue[mod_id])->eNB_UE_stats[UE_PCCID(mod_id,ue_id)][ue_id].dl_cqi;
|
return ((UE_list_t *)enb_ue[mod_id])->eNB_UE_stats[UE_PCCID(mod_id,ue_id)][ue_id].dl_cqi;
|
||||||
}
|
}
|
||||||
|
int get_tx_queue_size(mid_t mod_id, mid_t ue_id, logical_chan_id_t channel_id)
|
||||||
|
{
|
||||||
|
rnti_t rnti = get_ue_crnti(mod_id,ue_id);
|
||||||
|
uint16_t frame = (uint16_t) get_current_frame(mod_id);
|
||||||
|
mac_rlc_status_resp_t rlc_status = mac_rlc_status_ind(mod_id,rnti, mod_id,frame,ENB_FLAG_YES,MBMS_FLAG_NO,channel_id,0);
|
||||||
|
return rlc_status.bytes_in_buffer;
|
||||||
|
}
|
||||||
/*
|
/*
|
||||||
* timer primitives
|
* timer primitives
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -148,7 +148,7 @@ int get_ue_phr (mid_t mod_id, mid_t ue_id);
|
|||||||
|
|
||||||
int get_ue_wcqi (mid_t mod_id, mid_t ue_id);
|
int get_ue_wcqi (mid_t mod_id, mid_t ue_id);
|
||||||
|
|
||||||
|
int get_tx_queue_size(mid_t mod_id, mid_t ue_id, logical_chan_id_t channel_id);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -413,9 +413,9 @@ int enb_agent_mac_stats_reply(mid_t mod_id,
|
|||||||
/* Check flag for creation of RLC buffer status report */
|
/* Check flag for creation of RLC buffer status report */
|
||||||
if (report_config->ue_report_type[i].ue_report_flags & PROTOCOL__PRP_UE_STATS_TYPE__PRUST_RLC_BS) {
|
if (report_config->ue_report_type[i].ue_report_flags & PROTOCOL__PRP_UE_STATS_TYPE__PRUST_RLC_BS) {
|
||||||
// TODO: Fill in the actual RLC buffer status reports
|
// TODO: Fill in the actual RLC buffer status reports
|
||||||
ue_report[i]->n_rlc_report = 1; // Set this to the number of LCs for this UE
|
ue_report[i]->n_rlc_report = 3; // Set this to the number of LCs for this UE
|
||||||
Protocol__PrpRlcBsr ** rlc_reports;
|
Protocol__PrpRlcBsr ** rlc_reports;
|
||||||
rlc_reports = malloc(sizeof(Protocol__PrpRlcBsr) * ue_report[i]->n_rlc_report);
|
rlc_reports = malloc(sizeof(Protocol__PrpRlcBsr *) * ue_report[i]->n_rlc_report);
|
||||||
if (rlc_reports == NULL)
|
if (rlc_reports == NULL)
|
||||||
goto error;
|
goto error;
|
||||||
|
|
||||||
@@ -427,10 +427,10 @@ int enb_agent_mac_stats_reply(mid_t mod_id,
|
|||||||
goto error;
|
goto error;
|
||||||
protocol__prp_rlc_bsr__init(rlc_reports[j]);
|
protocol__prp_rlc_bsr__init(rlc_reports[j]);
|
||||||
//TODO:Set logical channel id
|
//TODO:Set logical channel id
|
||||||
rlc_reports[j]->lc_id = 1;
|
rlc_reports[j]->lc_id = j+1;
|
||||||
rlc_reports[j]->has_lc_id = 1;
|
rlc_reports[j]->has_lc_id = 1;
|
||||||
//TODO:Set tx queue size in bytes
|
//TODO:Set tx queue size in bytes
|
||||||
rlc_reports[j]->tx_queue_size = 10;
|
rlc_reports[j]->tx_queue_size = get_tx_queue_size(enb_id,i,j+1);
|
||||||
rlc_reports[j]->has_tx_queue_size = 1;
|
rlc_reports[j]->has_tx_queue_size = 1;
|
||||||
//TODO:Set tx queue head of line delay in ms
|
//TODO:Set tx queue head of line delay in ms
|
||||||
rlc_reports[j]->tx_queue_hol_delay = 100;
|
rlc_reports[j]->tx_queue_hol_delay = 100;
|
||||||
|
|||||||
Reference in New Issue
Block a user