e2sm_kpm: change function names

master
Piotr Gawlowicz 2 years ago committed by Justin Tallon
parent 62d1ba059f
commit d384916b68

@ -46,8 +46,8 @@ public:
virtual void receive_e2_metrics_callback(const enb_metrics_t& m); virtual void receive_e2_metrics_callback(const enb_metrics_t& m);
bool _get_meas_definition(std::string meas_name, E2SM_KPM_metric_t& def); bool _get_meas_definition(std::string meas_name, E2SM_KPM_metric_t& def);
bool _extract_last_integer_type_meas_value(E2SM_KPM_meas_value_t& meas_value, const enb_metrics_t& enb_metrics); bool _extract_integer_type_meas_value(E2SM_KPM_meas_value_t& meas_value, const enb_metrics_t& enb_metrics);
bool _extract_last_real_type_meas_value(E2SM_KPM_meas_value_t& meas_value, const enb_metrics_t& enb_metrics); bool _extract_real_type_meas_value(E2SM_KPM_meas_value_t& meas_value, const enb_metrics_t& enb_metrics);
srslog::basic_logger& logger; srslog::basic_logger& logger;
private: private:

@ -299,7 +299,7 @@ void e2sm_kpm::receive_e2_metrics_callback(const enb_metrics_t& m)
} }
} }
bool e2sm_kpm::_extract_last_integer_type_meas_value(E2SM_KPM_meas_value_t& meas_value, bool e2sm_kpm::_extract_integer_type_meas_value(E2SM_KPM_meas_value_t& meas_value,
const enb_metrics_t& enb_metrics) const enb_metrics_t& enb_metrics)
{ {
// TODO: maybe add ID to metric types in e2sm_kpm_metrics definitions, so we do not have to compare strings? // TODO: maybe add ID to metric types in e2sm_kpm_metrics definitions, so we do not have to compare strings?
@ -332,7 +332,7 @@ bool e2sm_kpm::_extract_last_integer_type_meas_value(E2SM_KPM_meas_value_t& meas
return false; return false;
} }
bool e2sm_kpm::_extract_last_real_type_meas_value(E2SM_KPM_meas_value_t& meas_value, const enb_metrics_t& enb_metrics) bool e2sm_kpm::_extract_real_type_meas_value(E2SM_KPM_meas_value_t& meas_value, const enb_metrics_t& enb_metrics)
{ {
// all real type measurements // all real type measurements
// cpu0_load: no_label // cpu0_load: no_label

@ -310,13 +310,13 @@ bool e2sm_kpm_report_service_style1::collect_data(const enb_metrics_t& enb_metri
meas_value.data_type = data_type; meas_value.data_type = data_type;
if (meas_value.data_type == meas_record_item_c::types::options::integer) { if (meas_value.data_type == meas_record_item_c::types::options::integer) {
if (not parent->_extract_last_integer_type_meas_value(meas_value, enb_metrics)) { if (not parent->_extract_integer_type_meas_value(meas_value, enb_metrics)) {
parent->logger.info("Cannot extract value \"%s\" label: %i", meas_name.c_str(), label); parent->logger.info("Cannot extract value \"%s\" label: %i", meas_name.c_str(), label);
return false; return false;
} }
} else { } else {
// data_type == meas_record_item_c::types::options::real; // data_type == meas_record_item_c::types::options::real;
if (not parent->_extract_last_real_type_meas_value(meas_value, enb_metrics)) { if (not parent->_extract_real_type_meas_value(meas_value, enb_metrics)) {
parent->logger.info("Cannot extract value \"%s\" label %i", meas_name.c_str(), label); parent->logger.info("Cannot extract value \"%s\" label %i", meas_name.c_str(), label);
return false; return false;
} }

Loading…
Cancel
Save