|
|
|
@ -41,11 +41,9 @@ char const * const prefixes[2][9] =
|
|
|
|
|
{ "", "k", "M", "G", "T", "P", "E", "Z", "Y", },
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
metrics_stdout::metrics_stdout()
|
|
|
|
|
:do_print(false)
|
|
|
|
|
,n_reports(10)
|
|
|
|
|
,ue(NULL)
|
|
|
|
|
metrics_stdout::metrics_stdout() : do_print(false), n_reports(10), ue(nullptr)
|
|
|
|
|
{
|
|
|
|
|
// Do nothing
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void metrics_stdout::set_ue_handle(ue_metrics_interface *ue_)
|
|
|
|
@ -60,7 +58,7 @@ void metrics_stdout::toggle_print(bool b)
|
|
|
|
|
|
|
|
|
|
void metrics_stdout::set_metrics(ue_metrics_t &metrics, const uint32_t period_usec)
|
|
|
|
|
{
|
|
|
|
|
if (ue == NULL) {
|
|
|
|
|
if (ue == nullptr) {
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -82,11 +80,12 @@ void metrics_stdout::set_metrics(ue_metrics_t &metrics, const uint32_t period_us
|
|
|
|
|
{
|
|
|
|
|
n_reports = 0;
|
|
|
|
|
cout << endl;
|
|
|
|
|
cout << "----Signal--------------DL-------------------------------------UL----------------------" << endl;
|
|
|
|
|
cout << "cc rsrp pl cfo mcs snr turbo brate bler ta_us mcs buff brate bler" << endl;
|
|
|
|
|
cout << "--------Signal--------------DL-------------------------------------UL----------------------" << endl;
|
|
|
|
|
cout << "cc pci rsrp pl cfo mcs snr turbo brate bler ta_us mcs buff brate bler" << endl;
|
|
|
|
|
}
|
|
|
|
|
for (uint32_t r = 0; r < metrics.phy.nof_active_cc; r++) {
|
|
|
|
|
cout << " " << r;
|
|
|
|
|
cout << std::setw(2) << r;
|
|
|
|
|
cout << std::setw(4) << metrics.phy.info[r].pci << std::setw(0);
|
|
|
|
|
cout << float_to_string(metrics.phy.dl[r].rsrp, 2);
|
|
|
|
|
cout << float_to_string(metrics.phy.dl[r].pathloss, 2);
|
|
|
|
|
cout << float_to_eng_string(metrics.phy.sync[r].cfo, 2);
|
|
|
|
|