fix rsrp meas report on screen
This commit is contained in:
@@ -2095,7 +2095,8 @@ void nr_ue_pucch_scheduler(module_id_t module_idP, frame_t frameP, int slotP, in
|
|||||||
}
|
}
|
||||||
|
|
||||||
// CSI
|
// CSI
|
||||||
if (mac->ra.ra_state == RA_SUCCEEDED)
|
if (mac->ra.ra_state == RA_SUCCEEDED ||
|
||||||
|
get_softmodem_params()->phy_test == 1)
|
||||||
O_CSI = nr_get_csi_measurements(mac, frameP, slotP, pucch);
|
O_CSI = nr_get_csi_measurements(mac, frameP, slotP, pucch);
|
||||||
|
|
||||||
// ACKNACK
|
// ACKNACK
|
||||||
|
|||||||
@@ -347,7 +347,7 @@ void gNB_dlsch_ulsch_scheduler(module_id_t module_idP,
|
|||||||
|
|
||||||
if ((slot == 0) && (frame & 127) == 0) {
|
if ((slot == 0) && (frame & 127) == 0) {
|
||||||
stats_output[0]='\0';
|
stats_output[0]='\0';
|
||||||
dump_mac_stats(RC.nrmac[module_idP],stats_output,16384);
|
dump_mac_stats(RC.nrmac[module_idP],stats_output,16384,true);
|
||||||
LOG_I(NR_MAC,"Frame.Slot %d.%d\n%s\n",frame,slot,stats_output);
|
LOG_I(NR_MAC,"Frame.Slot %d.%d\n%s\n",frame,slot,stats_output);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -442,5 +442,5 @@ bool nr_find_nb_rb(uint16_t Qm,
|
|||||||
|
|
||||||
void nr_sr_reporting(int Mod_idP, frame_t frameP, sub_frame_t slotP);
|
void nr_sr_reporting(int Mod_idP, frame_t frameP, sub_frame_t slotP);
|
||||||
|
|
||||||
void dump_mac_stats(gNB_MAC_INST *gNB, char *output, int strlen);
|
void dump_mac_stats(gNB_MAC_INST *gNB, char *output, int strlen, bool reset_rsrp);
|
||||||
#endif /*__LAYER2_NR_MAC_PROTO_H__*/
|
#endif /*__LAYER2_NR_MAC_PROTO_H__*/
|
||||||
|
|||||||
@@ -57,7 +57,7 @@ void *nrmac_stats_thread(void *arg) {
|
|||||||
AssertFatal(fd!=NULL,"Cannot open nrMAC_stats.log, error %s\n",strerror(errno));
|
AssertFatal(fd!=NULL,"Cannot open nrMAC_stats.log, error %s\n",strerror(errno));
|
||||||
|
|
||||||
while (oai_exit == 0) {
|
while (oai_exit == 0) {
|
||||||
dump_mac_stats(gNB,output,MACSTATSSTRLEN);
|
dump_mac_stats(gNB,output,MACSTATSSTRLEN,false);
|
||||||
fprintf(fd,"%s\n",output);
|
fprintf(fd,"%s\n",output);
|
||||||
fflush(fd);
|
fflush(fd);
|
||||||
usleep(200000);
|
usleep(200000);
|
||||||
@@ -71,7 +71,7 @@ void clear_mac_stats(gNB_MAC_INST *gNB) {
|
|||||||
memset((void*)gNB->UE_info.mac_stats,0,MAX_MOBILES_PER_GNB*sizeof(NR_mac_stats_t));
|
memset((void*)gNB->UE_info.mac_stats,0,MAX_MOBILES_PER_GNB*sizeof(NR_mac_stats_t));
|
||||||
}
|
}
|
||||||
|
|
||||||
void dump_mac_stats(gNB_MAC_INST *gNB, char *output, int strlen)
|
void dump_mac_stats(gNB_MAC_INST *gNB, char *output, int strlen, bool reset_rsrp)
|
||||||
{
|
{
|
||||||
NR_UE_info_t *UE_info = &gNB->UE_info;
|
NR_UE_info_t *UE_info = &gNB->UE_info;
|
||||||
int num = 1;
|
int num = 1;
|
||||||
@@ -102,9 +102,10 @@ void dump_mac_stats(gNB_MAC_INST *gNB, char *output, int strlen)
|
|||||||
stats->pucch0_DTX,
|
stats->pucch0_DTX,
|
||||||
sched_ctrl->dl_bler_stats.bler,
|
sched_ctrl->dl_bler_stats.bler,
|
||||||
sched_ctrl->dl_bler_stats.mcs);
|
sched_ctrl->dl_bler_stats.mcs);
|
||||||
|
if (reset_rsrp) {
|
||||||
stats->num_rsrp_meas = 0;
|
stats->num_rsrp_meas = 0;
|
||||||
stats->cumul_rsrp = 0 ;
|
stats->cumul_rsrp = 0;
|
||||||
|
}
|
||||||
stroff+=sprintf(output+stroff,"UE %d: dlsch_total_bytes %d\n", UE_id, stats->dlsch_total_bytes);
|
stroff+=sprintf(output+stroff,"UE %d: dlsch_total_bytes %d\n", UE_id, stats->dlsch_total_bytes);
|
||||||
stroff+=sprintf(output+stroff,"UE %d: ulsch_rounds %d/%d/%d/%d, ulsch_DTX %d, ulsch_errors %d\n",
|
stroff+=sprintf(output+stroff,"UE %d: ulsch_rounds %d/%d/%d/%d, ulsch_DTX %d, ulsch_errors %d\n",
|
||||||
UE_id,
|
UE_id,
|
||||||
|
|||||||
Reference in New Issue
Block a user