mirror of https://github.com/PentHertz/srsLTE.git
SRSUE: Reviewed PHY metrics getter
This commit is contained in:
parent
dac331ab38
commit
044da18db9
|
@ -91,7 +91,7 @@ public:
|
|||
void wait_initialize() final;
|
||||
bool is_initiated();
|
||||
|
||||
void get_metrics(phy_metrics_t* m) final;
|
||||
void get_metrics(const std::string& rat, phy_metrics_t* m) final;
|
||||
void srsran_phy_logger(phy_logger_level_t log_level, char* str);
|
||||
|
||||
void enable_pregen_signals(bool enable) final;
|
||||
|
|
|
@ -40,7 +40,7 @@ public:
|
|||
virtual void wait_initialize() = 0;
|
||||
virtual void start_plot() = 0;
|
||||
|
||||
virtual void get_metrics(phy_metrics_t* m) = 0;
|
||||
virtual void get_metrics(const std::string& rat, phy_metrics_t* m) = 0;
|
||||
};
|
||||
|
||||
} // namespace srsue
|
||||
|
|
|
@ -38,7 +38,7 @@ public:
|
|||
|
||||
virtual void set_earfcn(std::vector<uint32_t> earfcns) = 0;
|
||||
|
||||
virtual void get_metrics(phy_metrics_t* m) = 0;
|
||||
virtual void get_metrics(const std::string& rat, phy_metrics_t* m) = 0;
|
||||
};
|
||||
|
||||
} // namespace srsue
|
||||
|
|
|
@ -38,7 +38,7 @@ public:
|
|||
virtual void wait_initialize() = 0;
|
||||
virtual void start_plot() = 0;
|
||||
|
||||
virtual void get_metrics(phy_metrics_t* m) = 0;
|
||||
virtual void get_metrics(const std::string& rat, phy_metrics_t* m) = 0;
|
||||
};
|
||||
|
||||
} // namespace srsue
|
||||
|
|
|
@ -38,7 +38,7 @@ public:
|
|||
void stop() override;
|
||||
|
||||
void wait_initialize() override;
|
||||
void get_metrics(phy_metrics_t* m) override;
|
||||
void get_metrics(const std::string& rat, phy_metrics_t* m) override;
|
||||
|
||||
std::string get_type() override { return "vnf_nr"; };
|
||||
|
||||
|
|
|
@ -40,6 +40,7 @@ typedef struct {
|
|||
typedef struct {
|
||||
srsran::rf_metrics_t rf;
|
||||
phy_metrics_t phy;
|
||||
phy_metrics_t phy_nr;
|
||||
gw_metrics_t gw;
|
||||
stack_metrics_t stack;
|
||||
srsran::sys_metrics_t sys;
|
||||
|
|
|
@ -174,6 +174,12 @@ void metrics_stdout::set_metrics(const ue_metrics_t& metrics, const uint32_t per
|
|||
set_metrics_helper(metrics.phy, metrics.stack.mac, metrics.stack.rrc, display_neighbours, r);
|
||||
}
|
||||
|
||||
for (uint32_t r = 0; r < metrics.phy_nr.nof_active_cc; r++) {
|
||||
// Assumption LTE is followed by the NR carriers.
|
||||
cout << std::setw(2) << metrics.phy_nr.nof_active_cc + r;
|
||||
set_metrics_helper(metrics.phy_nr, metrics.stack.mac_nr, metrics.stack.rrc, display_neighbours, r);
|
||||
}
|
||||
|
||||
if (metrics.rf.rf_error) {
|
||||
printf("RF status: O=%d, U=%d, L=%d\n", metrics.rf.rf_o, metrics.rf.rf_u, metrics.rf.rf_l);
|
||||
}
|
||||
|
|
|
@ -184,8 +184,18 @@ void phy::stop()
|
|||
}
|
||||
}
|
||||
|
||||
void phy::get_metrics(phy_metrics_t* m)
|
||||
void phy::get_metrics(const std::string& rat, phy_metrics_t* m)
|
||||
{
|
||||
// Get NR metrics
|
||||
if (rat == "nr" and args.nof_nr_carriers > 0) {
|
||||
nr_workers.get_metrics(*m);
|
||||
return;
|
||||
}
|
||||
|
||||
if (rat != "lte") {
|
||||
*m = {};
|
||||
return;
|
||||
}
|
||||
uint32_t dl_earfcn = 0;
|
||||
srsran_cell_t cell = {};
|
||||
sfsync.get_current_cell(&cell, &dl_earfcn);
|
||||
|
@ -202,11 +212,6 @@ void phy::get_metrics(phy_metrics_t* m)
|
|||
common.get_ul_metrics(m->ul);
|
||||
common.get_sync_metrics(m->sync);
|
||||
m->nof_active_cc = args.nof_lte_carriers;
|
||||
|
||||
// Get NR metrics
|
||||
if (args.nof_nr_carriers > 0) {
|
||||
nr_workers.get_metrics(*m);
|
||||
}
|
||||
}
|
||||
|
||||
void phy::set_timeadv_rar(uint32_t tti, uint32_t ta_cmd)
|
||||
|
|
|
@ -61,7 +61,7 @@ void vnf_phy_nr::start_plot() {}
|
|||
|
||||
void vnf_phy_nr::wait_initialize() {}
|
||||
|
||||
void vnf_phy_nr::get_metrics(phy_metrics_t* m) {}
|
||||
void vnf_phy_nr::get_metrics(const std::string& rat, phy_metrics_t* m) {}
|
||||
|
||||
int vnf_phy_nr::tx_request(const tx_request_t& request)
|
||||
{
|
||||
|
|
|
@ -330,7 +330,8 @@ void ue::start_plot()
|
|||
bool ue::get_metrics(ue_metrics_t* m)
|
||||
{
|
||||
bzero(m, sizeof(ue_metrics_t));
|
||||
phy->get_metrics(&m->phy);
|
||||
phy->get_metrics("lte", &m->phy);
|
||||
phy->get_metrics("nr", &m->phy_nr);
|
||||
radio->get_metrics(&m->rf);
|
||||
stack->get_metrics(&m->stack);
|
||||
gw_inst->get_metrics(m->gw, m->stack.mac[0].nof_tti);
|
||||
|
|
|
@ -48,7 +48,7 @@ public:
|
|||
void stop() override;
|
||||
void wait_initialize() override;
|
||||
void start_plot() override;
|
||||
void get_metrics(phy_metrics_t* m) override;
|
||||
void get_metrics(const std::string& rat, phy_metrics_t* m) override;
|
||||
std::string get_type() override;
|
||||
|
||||
// The interface for the SS
|
||||
|
|
|
@ -50,7 +50,7 @@ void lte_ttcn3_phy::wait_initialize() {}
|
|||
|
||||
void lte_ttcn3_phy::start_plot() {}
|
||||
|
||||
void lte_ttcn3_phy::get_metrics(phy_metrics_t* m) {}
|
||||
void lte_ttcn3_phy::get_metrics(const std::string& rat, phy_metrics_t* m) {}
|
||||
|
||||
// The interface for the SS
|
||||
void lte_ttcn3_phy::set_cell_map(const cell_list_t& cells_)
|
||||
|
|
Loading…
Reference in New Issue