/** * * \section COPYRIGHT * * Copyright 2013-2022 Software Radio Systems Limited * * By using this file, you agree to the terms and conditions set * forth in the LICENSE file which can be found at the top level of * the distribution. * * */ #ifndef SRSRAN_E2SM_KPM_METRICS_H #define SRSRAN_E2SM_KPM_METRICS_H #include "srsran/srsran.h" /* Labels supported for a metric */ #define NO_LABEL 0x0001 #define MIN_LABEL 0x0002 #define MAX_LABEL 0x0004 #define AVG_LABEL 0x0008 // TODO: define all labels and scopes /* Scopes supported for a metric */ #define ENB_LEVEL 0x0001 #define CELL_LEVEL 0x0002 #define UE_LEVEL 0x0004 #define BEARER_LEVEL 0x0008 enum e2_metric_data_type_t { INTEGER, REAL }; struct E2SM_KPM_metric_t { std::string name; bool supported; e2_metric_data_type_t data_type; std::string units; bool min_val_present; double min_val; bool max_val_present; double max_val; uint32_t supported_labels; uint32_t supported_scopes; }; // clang-format off // Measurements defined in 3GPP TS 28.552 std::vector get_e2sm_kpm_28_552_metrics() { // TODO: add all metrics from 3GPP TS 28.552 std::vector metrics; // supported metrics metrics.push_back({"RRU.PrbTotDl", true, REAL, "%", true, 0, true, 100, NO_LABEL | AVG_LABEL, CELL_LEVEL | UE_LEVEL }); metrics.push_back({"RRU.PrbTotUl", true, REAL, "%", true, 0, true, 100, NO_LABEL | AVG_LABEL, CELL_LEVEL | UE_LEVEL }); // not supported metrics metrics.push_back({"RRU.RachPreambleDedMean", false, REAL, "-", false, 0, false, 100, NO_LABEL, CELL_LEVEL | UE_LEVEL }); return metrics; } // Measurements defined in 3GPP TS 32.425 std::vector get_e2sm_kpm_34_425_metrics() { // TODO: add all metrics from 3GPP TS 32.425 std::vector metrics; return metrics; } // E2SM_KPM O-RAN specific Measurements std::vector e2sm_kpm_oran_metrics() { // TODO: add all E2SM_KPM O-RAN specific Measurements std::vector metrics; return metrics; } // Custom Measurements std::vector e2sm_kpm_custom_metrics() { std::vector metrics; // supported metrics metrics.push_back({"test", true, REAL, "", true, 0, true, 100, NO_LABEL, CELL_LEVEL | UE_LEVEL }); // not supported metrics metrics.push_back({"test123", false, REAL, "", true, 0, true, 100, NO_LABEL, CELL_LEVEL | UE_LEVEL }); return metrics; } // clang-format on #endif // SRSRAN_E2SM_KPM_METRICS_H