mirror of https://github.com/PentHertz/srsLTE.git
srsue: fix stdout metrics print when scells aren't configured yet
during MAC reset, scells are reset to and their PCI is set to UINT32_MAX which results in malformatted stdout prints, see below: Random Access Transmission: seq=16, ra-rnti=0x2 Random Access Transmission: seq=14, ra-rnti=0x2 0 4 -24 24 -1.1u 1.0 140 0.50 0.0 0% 0.0 0.0 0.0 0.0 67% 14294967295 0.0 0.0 -1.1u 0.0 0.0 0.0 0.0 0% 0.0 0.0 0.0 0.0 0% 24294967295 0.0 0.0 -1.1u 0.0 0.0 0.0 0.0 0% 0.0 0.0 0.0 0.0 0% 34294967295 0.0 0.0 -1.1u 0.0 0.0 0.0 0.0 0% 0.0 0.0 0.0 0.0 0% this patch checks the configured PCI value against UINT32_MAX and prints "n/a" in case the scells aren't set yet.
This commit is contained in:
parent
909e5de34f
commit
3573644624
|
@ -115,7 +115,11 @@ void metrics_stdout::set_metrics(const ue_metrics_t& metrics, const uint32_t per
|
|||
|
||||
for (uint32_t r = 0; r < metrics.phy.nof_active_cc; r++) {
|
||||
cout << std::setw(2) << r;
|
||||
if (metrics.phy.info[r].pci != UINT32_MAX) {
|
||||
cout << std::setw(4) << metrics.phy.info[r].pci << std::setw(0);
|
||||
} else {
|
||||
cout << " n/a";
|
||||
}
|
||||
cout << float_to_string(metrics.phy.ch[r].rsrp, 2);
|
||||
cout << float_to_string(metrics.phy.ch[r].pathloss, 2);
|
||||
cout << float_to_eng_string(metrics.phy.sync[r].cfo, 2);
|
||||
|
|
|
@ -45,6 +45,7 @@ public:
|
|||
m->stack.mac[0].rx_brate = 200;
|
||||
m->stack.mac[0].nof_tti = 1;
|
||||
|
||||
m->phy.info[1].pci = UINT32_MAX;
|
||||
m->stack.mac[1].rx_pkts = 100;
|
||||
m->stack.mac[1].rx_errors = 100;
|
||||
m->stack.mac[1].rx_brate = 150;
|
||||
|
|
Loading…
Reference in New Issue