Added p0_PUCCH support in the agent
This commit is contained in:
@@ -154,15 +154,19 @@ message prp_ul_cqi {
|
|||||||
optional prp_ul_cqi_type type = 1;
|
optional prp_ul_cqi_type type = 1;
|
||||||
repeated uint32 sinr = 2;
|
repeated uint32 sinr = 2;
|
||||||
optional uint32 serv_cell_index = 3;
|
optional uint32 serv_cell_index = 3;
|
||||||
optional int32 p0_pucch_dbm = 4;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Full UL CQI report for a specific UE
|
// Full UL CQI report for a specific UE
|
||||||
message prp_ul_cqi_report {
|
message prp_ul_cqi_report {
|
||||||
optional uint32 sfn_sn = 1;
|
optional uint32 sfn_sn = 1;
|
||||||
repeated prp_ul_cqi cqi_meas = 2;
|
repeated prp_ul_cqi cqi_meas = 2;
|
||||||
|
repeated prp_pucch_dbm pucch_dbm = 3;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
message prp_pucch_dbm {
|
||||||
|
optional int32 p0_pucch_dbm = 1;
|
||||||
|
optional uint32 serv_cell_index = 2;
|
||||||
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// Cell related statistics
|
// Cell related statistics
|
||||||
|
|||||||
@@ -647,6 +647,26 @@ int get_harq(const mid_t mod_id, const uint8_t CC_id, const mid_t ue_id, const i
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int get_p0_pucch_dbm(mid_t mod_id, mid_t ue_id, int CC_id)
|
||||||
|
{
|
||||||
|
LTE_eNB_UE_stats *eNB_UE_stats = NULL;
|
||||||
|
uint32_t rnti = 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->Po_PUCCH_update == 1)
|
||||||
|
{
|
||||||
|
return eNB_UE_stats->Po_PUCCH_dBm;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
int get_p0_nominal_pucch(mid_t mod_id, int CC_id)
|
||||||
|
{
|
||||||
|
int32_t pucch_rx_received = mac_xface->get_target_pucch_rx_power(mod_id, CC_id);
|
||||||
|
return pucch_rx_received;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* ************************************
|
* ************************************
|
||||||
|
|||||||
@@ -210,6 +210,10 @@ int get_tpc(mid_t mod_id, mid_t ue_id);
|
|||||||
int get_harq(const mid_t mod_id, const uint8_t CC_id, const mid_t ue_id,
|
int get_harq(const mid_t mod_id, const uint8_t CC_id, const mid_t ue_id,
|
||||||
const int frame, const uint8_t subframe, int *id, int *status);
|
const int frame, const uint8_t subframe, int *id, int *status);
|
||||||
|
|
||||||
|
int get_p0_pucch_dbm(mid_t mod_id, mid_t ue_id, int CC_id);
|
||||||
|
|
||||||
|
int get_p0_nominal_pucch(mid_t mod_id, int CC_id);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* ************************************
|
* ************************************
|
||||||
* Get Messages for UE Configuration Reply
|
* Get Messages for UE Configuration Reply
|
||||||
|
|||||||
@@ -657,8 +657,27 @@ int enb_agent_mac_stats_reply(mid_t mod_id,
|
|||||||
//TODO: Set the servCellIndex for this report
|
//TODO: Set the servCellIndex for this report
|
||||||
ul_report[j]->serv_cell_index = 0;
|
ul_report[j]->serv_cell_index = 0;
|
||||||
ul_report[j]->has_serv_cell_index = 1;
|
ul_report[j]->has_serv_cell_index = 1;
|
||||||
|
|
||||||
|
/*if(get_p0_pucch_dbm(enb_id,i) != -1){
|
||||||
|
ul_report[j]->p0_pucch_dbm = get_p0_pucch_dbm(enb_id,i);
|
||||||
|
ul_report[j]->has_p0_pucch_dbm = 1;
|
||||||
|
}*/
|
||||||
//Set the list of UL reports of this UE to the full UL report
|
//Set the list of UL reports of this UE to the full UL report
|
||||||
full_ul_report->cqi_meas = ul_report;
|
full_ul_report->cqi_meas = ul_report;
|
||||||
|
full_ul_report->n_pucch_dbm = MAX_NUM_CCs;
|
||||||
|
full_ul_report->pucch_dbm = malloc(sizeof(Protocol__PrpPucchDbm *) * full_ul_report->n_pucch_dbm);
|
||||||
|
|
||||||
|
for (j = 0; j < MAX_NUM_CCs; j++) {
|
||||||
|
full_ul_report->pucch_dbm[j] = malloc(sizeof(Protocol__PrpPucchDbm));
|
||||||
|
protocol__prp_pucch_dbm__init(full_ul_report->pucch_dbm[j]);
|
||||||
|
full_ul_report->pucch_dbm[j]->has_serv_cell_index = 1;
|
||||||
|
full_ul_report->pucch_dbm[j]->serv_cell_index = j;
|
||||||
|
if(get_p0_pucch_dbm(enb_id,i, j) != -1){
|
||||||
|
full_ul_report->pucch_dbm[j]->p0_pucch_dbm = get_p0_pucch_dbm(enb_id,i,j);
|
||||||
|
full_ul_report->pucch_dbm[j]->has_p0_pucch_dbm = 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//Add full UL CQI report to the UE report
|
//Add full UL CQI report to the UE report
|
||||||
ue_report[i]->ul_cqi_report = full_ul_report;
|
ue_report[i]->ul_cqi_report = full_ul_report;
|
||||||
}
|
}
|
||||||
@@ -701,6 +720,9 @@ int enb_agent_mac_stats_reply(mid_t mod_id,
|
|||||||
// Thermal noise power in dbm
|
// Thermal noise power in dbm
|
||||||
ni_report->tnp = 0;
|
ni_report->tnp = 0;
|
||||||
ni_report->has_tnp = 1;
|
ni_report->has_tnp = 1;
|
||||||
|
|
||||||
|
ni_report->p0_nominal_pucch = get_p0_nominal_pucch(enb_id, 0);
|
||||||
|
ni_report->has_p0_nominal_pucch = 1;
|
||||||
cell_report[i]->noise_inter_report = ni_report;
|
cell_report[i]->noise_inter_report = ni_report;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -822,6 +844,10 @@ int enb_agent_mac_destroy_stats_reply(Protocol__ProgranMessage *msg) {
|
|||||||
}
|
}
|
||||||
free(ul_report->cqi_meas);
|
free(ul_report->cqi_meas);
|
||||||
}
|
}
|
||||||
|
for (j = 0; j < ul_report->n_pucch_dbm; j++) {
|
||||||
|
free(ul_report->pucch_dbm[j]);
|
||||||
|
}
|
||||||
|
free(ul_report->pucch_dbm);
|
||||||
free(reply->ue_report[i]);
|
free(reply->ue_report[i]);
|
||||||
}
|
}
|
||||||
free(reply->ue_report);
|
free(reply->ue_report);
|
||||||
|
|||||||
Reference in New Issue
Block a user