|
|
@ -36,7 +36,7 @@ namespace srsenb {
|
|
|
|
|
|
|
|
|
|
|
|
char* csv_file_name = NULL;
|
|
|
|
char* csv_file_name = NULL;
|
|
|
|
|
|
|
|
|
|
|
|
#define NUM_METRICS 2
|
|
|
|
#define NUM_METRICS (3)
|
|
|
|
|
|
|
|
|
|
|
|
// fake classes
|
|
|
|
// fake classes
|
|
|
|
class enb_dummy : public enb_metrics_interface
|
|
|
|
class enb_dummy : public enb_metrics_interface
|
|
|
@ -50,10 +50,10 @@ public:
|
|
|
|
metrics[0].stack.mac[0].rnti = 0x46;
|
|
|
|
metrics[0].stack.mac[0].rnti = 0x46;
|
|
|
|
metrics[0].stack.mac[0].tx_pkts = 1000;
|
|
|
|
metrics[0].stack.mac[0].tx_pkts = 1000;
|
|
|
|
metrics[0].stack.mac[0].tx_errors = 1000;
|
|
|
|
metrics[0].stack.mac[0].tx_errors = 1000;
|
|
|
|
metrics[0].stack.mac[0].tx_brate = 1e6;
|
|
|
|
metrics[0].stack.mac[0].tx_brate = 0;
|
|
|
|
metrics[0].stack.mac[0].rx_pkts = 50;
|
|
|
|
metrics[0].stack.mac[0].rx_pkts = 50;
|
|
|
|
metrics[0].stack.mac[0].rx_errors = 10;
|
|
|
|
metrics[0].stack.mac[0].rx_errors = 49;
|
|
|
|
metrics[0].stack.mac[0].rx_brate = 1e3;
|
|
|
|
metrics[0].stack.mac[0].rx_brate = 2;
|
|
|
|
metrics[0].stack.mac[0].ul_buffer = 100;
|
|
|
|
metrics[0].stack.mac[0].ul_buffer = 100;
|
|
|
|
metrics[0].stack.mac[0].dl_buffer = 200;
|
|
|
|
metrics[0].stack.mac[0].dl_buffer = 200;
|
|
|
|
metrics[0].stack.mac[0].dl_cqi = 15.9;
|
|
|
|
metrics[0].stack.mac[0].dl_cqi = 15.9;
|
|
|
@ -69,7 +69,7 @@ public:
|
|
|
|
metrics[1].stack.rrc.n_ues = 1;
|
|
|
|
metrics[1].stack.rrc.n_ues = 1;
|
|
|
|
metrics[1].stack.mac[0].rnti = 0xffff;
|
|
|
|
metrics[1].stack.mac[0].rnti = 0xffff;
|
|
|
|
metrics[1].stack.mac[0].tx_pkts = 100;
|
|
|
|
metrics[1].stack.mac[0].tx_pkts = 100;
|
|
|
|
metrics[1].stack.mac[0].tx_errors = 54;
|
|
|
|
metrics[1].stack.mac[0].tx_errors = 0;
|
|
|
|
metrics[1].stack.mac[0].tx_brate = 1e6;
|
|
|
|
metrics[1].stack.mac[0].tx_brate = 1e6;
|
|
|
|
metrics[1].stack.mac[0].rx_pkts = 50;
|
|
|
|
metrics[1].stack.mac[0].rx_pkts = 50;
|
|
|
|
metrics[1].stack.mac[0].rx_errors = 10;
|
|
|
|
metrics[1].stack.mac[0].rx_errors = 10;
|
|
|
@ -83,6 +83,26 @@ public:
|
|
|
|
metrics[1].phy->dl.mcs = 6.2;
|
|
|
|
metrics[1].phy->dl.mcs = 6.2;
|
|
|
|
metrics[1].phy->ul.mcs = 28.0;
|
|
|
|
metrics[1].phy->ul.mcs = 28.0;
|
|
|
|
metrics[1].phy->ul.sinr = 22.2;
|
|
|
|
metrics[1].phy->ul.sinr = 22.2;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// third entry
|
|
|
|
|
|
|
|
metrics[2].rf.rf_o = 10;
|
|
|
|
|
|
|
|
metrics[2].stack.rrc.n_ues = 1;
|
|
|
|
|
|
|
|
metrics[2].stack.mac[0].rnti = 0x1;
|
|
|
|
|
|
|
|
metrics[2].stack.mac[0].tx_pkts = 9999;
|
|
|
|
|
|
|
|
metrics[2].stack.mac[0].tx_errors = 1;
|
|
|
|
|
|
|
|
metrics[2].stack.mac[0].tx_brate = 776;
|
|
|
|
|
|
|
|
metrics[2].stack.mac[0].rx_pkts = 50;
|
|
|
|
|
|
|
|
metrics[2].stack.mac[0].rx_errors = 0;
|
|
|
|
|
|
|
|
metrics[2].stack.mac[0].rx_brate = 1e3;
|
|
|
|
|
|
|
|
metrics[2].stack.mac[0].ul_buffer = 100;
|
|
|
|
|
|
|
|
metrics[2].stack.mac[0].dl_buffer = 200;
|
|
|
|
|
|
|
|
metrics[2].stack.mac[0].dl_cqi = 15.9;
|
|
|
|
|
|
|
|
metrics[2].stack.mac[0].dl_ri = 1.5;
|
|
|
|
|
|
|
|
metrics[2].stack.mac[0].dl_pmi = 1.0;
|
|
|
|
|
|
|
|
metrics[2].stack.mac[0].phr = 12.0;
|
|
|
|
|
|
|
|
metrics[2].phy->dl.mcs = 28.0;
|
|
|
|
|
|
|
|
metrics[2].phy->ul.mcs = 20.2;
|
|
|
|
|
|
|
|
metrics[2].phy->ul.sinr = 14.2;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
bool get_metrics(enb_metrics_t* m)
|
|
|
|
bool get_metrics(enb_metrics_t* m)
|
|
|
@ -94,8 +114,8 @@ public:
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private:
|
|
|
|
private:
|
|
|
|
int counter = 0;
|
|
|
|
int counter = 0;
|
|
|
|
enb_metrics_t metrics[2] = {};
|
|
|
|
enb_metrics_t metrics[NUM_METRICS] = {};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
} // namespace srsenb
|
|
|
|
} // namespace srsenb
|
|
|
@ -155,7 +175,7 @@ int main(int argc, char** argv)
|
|
|
|
metrics_screen.toggle_print(true);
|
|
|
|
metrics_screen.toggle_print(true);
|
|
|
|
|
|
|
|
|
|
|
|
std::cout << "Running for 2 seconds .." << std::endl;
|
|
|
|
std::cout << "Running for 2 seconds .." << std::endl;
|
|
|
|
usleep(2e6);
|
|
|
|
usleep(4e6);
|
|
|
|
|
|
|
|
|
|
|
|
metricshub.stop();
|
|
|
|
metricshub.stop();
|
|
|
|
return 0;
|
|
|
|
return 0;
|
|
|
|