Added rank indication and timing advance indication support

This commit is contained in:
Xenofon Foukas
2016-02-10 18:07:35 +00:00
parent a663654418
commit b64cb5b250
3 changed files with 140 additions and 84 deletions
+25
View File
@@ -400,6 +400,31 @@ int get_tx_queue_size(mid_t mod_id, mid_t ue_id, logical_chan_id_t channel_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); 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; return rlc_status.bytes_in_buffer;
} }
int get_MAC_CE_bitmap_TA(mid_t mod_id, mid_t ue_id)
{
if((((UE_list_t *)enb_ue[mod_id])->UE_sched_ctrl[ue_id].ta_update) > 0)
return 1;
else
return 0;
}
int get_active_CC(mid_t mod_id, mid_t ue_id)
{
return ((UE_list_t *)enb_ue[mod_id])->numactiveCCs[ue_id];
}
int get_current_RI(mid_t mod_id, mid_t ue_id, int CC_id)
{
LTE_eNB_UE_stats *eNB_UE_stats = NULL;
int pCCid = UE_PCCID(mod_id,ue_id);
rnti_t rnti = 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[CC_id].rank;
}
/* /*
* timer primitives * timer primitives
*/ */
+5
View File
@@ -150,6 +150,11 @@ 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); int get_tx_queue_size(mid_t mod_id, mid_t ue_id, logical_chan_id_t channel_id);
int get_MAC_CE_bitmap_TA(mid_t mod_id, mid_t ue_id);
int get_active_CC(mid_t mod_id, mid_t ue_id);
int get_current_RI(mid_t mod_id, mid_t ue_id, int CC_id);
+45 -19
View File
@@ -453,7 +453,7 @@ int enb_agent_mac_stats_reply(mid_t mod_id,
/* Check flag for creation of MAC CE buffer status report */ /* Check flag for creation of MAC CE buffer status report */
if (report_config->ue_report_type[i].ue_report_flags & PROTOCOL__PRP_UE_STATS_TYPE__PRUST_MAC_CE_BS) { if (report_config->ue_report_type[i].ue_report_flags & PROTOCOL__PRP_UE_STATS_TYPE__PRUST_MAC_CE_BS) {
// TODO: Fill in the actual MAC CE buffer status report // TODO: Fill in the actual MAC CE buffer status report
ue_report[i]->pending_mac_ces = -1; /* Use as bitmap. Set one or more of the ue_report[i]->pending_mac_ces = (get_MAC_CE_bitmap_TA(enb_id,i) | (0 << 1) | (0 << 2) | (0 << 3)) & 15; /* Use as bitmap. Set one or more of the; /* Use as bitmap. Set one or more of the
PROTOCOL__PRP_CE_TYPE__PRPCET_ values PROTOCOL__PRP_CE_TYPE__PRPCET_ values
found in stats_common.pb-c.h. See found in stats_common.pb-c.h. See
prp_ce_type in progRAN specification */ prp_ce_type in progRAN specification */
@@ -472,7 +472,7 @@ int enb_agent_mac_stats_reply(mid_t mod_id,
dl_report->sfn_sn = get_sfn_sf(enb_id); dl_report->sfn_sn = get_sfn_sf(enb_id);
dl_report->has_sfn_sn = 1; dl_report->has_sfn_sn = 1;
//TODO:Set the number of DL CQI reports for this UE. One for each CC //TODO:Set the number of DL CQI reports for this UE. One for each CC
dl_report->n_csi_report = 1; dl_report->n_csi_report = get_active_CC(enb_id,i);
//TODO:Create the actual CSI reports. //TODO:Create the actual CSI reports.
Protocol__PrpDlCsi **csi_reports; Protocol__PrpDlCsi **csi_reports;
csi_reports = malloc(sizeof(Protocol__PrpDlCsi *)*dl_report->n_csi_report); csi_reports = malloc(sizeof(Protocol__PrpDlCsi *)*dl_report->n_csi_report);
@@ -484,30 +484,56 @@ int enb_agent_mac_stats_reply(mid_t mod_id,
goto error; goto error;
protocol__prp_dl_csi__init(csi_reports[j]); protocol__prp_dl_csi__init(csi_reports[j]);
//TODO: the servCellIndex for this report //TODO: the servCellIndex for this report
csi_reports[j]->serv_cell_index = 0; csi_reports[j]->serv_cell_index = j;
csi_reports[j]->has_serv_cell_index = 1; csi_reports[j]->has_serv_cell_index = 1;
//TODO: the rank indicator value for this cc //TODO: the rank indicator value for this cc
csi_reports[j]->ri = 1; csi_reports[j]->ri = get_current_RI(enb_id,i,j);
csi_reports[j]->has_ri = 1; csi_reports[j]->has_ri = 1;
//TODO: the type of CSI report based on the configuration of the UE //TODO: the type of CSI report based on the configuration of the UE
//For this example we use type P10, which only needs a wideband value //For this example we use type P10, which only needs a wideband value
//The full set of types can be found in stats_common.pb-c.h and //The full set of types can be found in stats_common.pb-c.h and
//in the progRAN specifications //in the progRAN specifications
csi_reports[j]->type = PROTOCOL__PRP_CSI_TYPE__PRCSIT_P10; csi_reports[j]->type = PROTOCOL__PRP_CSI_TYPE__PRCSIT_P10;
csi_reports[j]->has_type = 1; csi_reports[j]->has_type = 1;
csi_reports[j]->report_case = PROTOCOL__PRP_DL_CSI__REPORT_P10CSI; csi_reports[j]->report_case = PROTOCOL__PRP_DL_CSI__REPORT_P10CSI;
Protocol__PrpCsiP10 *csi10; if(csi_reports[j]->report_case == PROTOCOL__PRP_DL_CSI__REPORT_P10CSI){
csi10 = malloc(sizeof(Protocol__PrpCsiP10)); Protocol__PrpCsiP10 *csi10;
if (csi10 == NULL) csi10 = malloc(sizeof(Protocol__PrpCsiP10));
goto error; if (csi10 == NULL)
protocol__prp_csi_p10__init(csi10); goto error;
//TODO: set the wideband value protocol__prp_csi_p10__init(csi10);
// NN: this is also depends on cc_id //TODO: set the wideband value
csi10->wb_cqi = get_ue_wcqi (enb_id, i); //eNB_UE_list->eNB_UE_stats[UE_PCCID(enb_id,i)][i].dl_cqi; // NN: this is also depends on cc_id
csi10->has_wb_cqi = 1; csi10->wb_cqi = get_ue_wcqi (enb_id, i); //eNB_UE_list->eNB_UE_stats[UE_PCCID(enb_id,i)][i].dl_cqi;
//Add the type of measurements to the csi report in the proper union type csi10->has_wb_cqi = 1;
csi_reports[j]->p10csi = csi10; //Add the type of measurements to the csi report in the proper union type
} csi_reports[j]->p10csi = csi10;
}
else if(csi_reports[j]->report_case == PROTOCOL__PRP_DL_CSI__REPORT_P11CSI){
}
else if(csi_reports[j]->report_case == PROTOCOL__PRP_DL_CSI__REPORT_P20CSI){
}
else if(csi_reports[j]->report_case == PROTOCOL__PRP_DL_CSI__REPORT_P21CSI){
}
else if(csi_reports[j]->report_case == PROTOCOL__PRP_DL_CSI__REPORT_A12CSI){
}
else if(csi_reports[j]->report_case == PROTOCOL__PRP_DL_CSI__REPORT_A22CSI){
}
else if(csi_reports[j]->report_case == PROTOCOL__PRP_DL_CSI__REPORT_A20CSI){
}
else if(csi_reports[j]->report_case == PROTOCOL__PRP_DL_CSI__REPORT_A30CSI){
}
else if(csi_reports[j]->report_case == PROTOCOL__PRP_DL_CSI__REPORT_A31CSI){
}
}
//Add the csi reports to the full DL CQI report //Add the csi reports to the full DL CQI report
dl_report->csi_report = csi_reports; dl_report->csi_report = csi_reports;
//Add the DL CQI report to the stats report //Add the DL CQI report to the stats report