Zigbee Protocol Controller 1.6.0
zigpc_cpu_load_metric Class Reference

#include <zigpc_cpu_load_metric.hpp>

Inheritance diagram for zigpc_cpu_load_metric:
zigpc_diagnostics_metric

Public Types

enum class  load_type : uint8_t { AVG_1_MIN , AVG_5_MIN , AVG_15_MIN }
 CPU Load average types. More...
 

Public Member Functions

 zigpc_cpu_load_metric (zigpc_diagnostics_notification &notif, std::string metric_id)
 
double get_value (load_type type) const
 
void update_value ()
 
- Public Member Functions inherited from zigpc_diagnostics_metric
 zigpc_diagnostics_metric (zigpc_diagnostics_notification &notif, std::string metric_id)
 Generic diagnostic metric constructor. More...
 
std::string get_metric_id (void) const
 
std::string get_serialized_value (void) const
 
virtual void update_value (void)=0
 

Private Attributes

std::array< double, LOAD_COUNTload_list = {}
 

Static Private Attributes

static constexpr char LOG_TAG [] = "diagnostics_metric_cpu_load"
 
static constexpr int LOAD_COUNT = 3U
 
static constexpr std::array< std::string_view, LOAD_COUNTLOAD_LABELS = {"1Min", "5Min", "15Min"}
 

Additional Inherited Members

- Protected Attributes inherited from zigpc_diagnostics_metric
zigpc_diagnostics_notificationon_update_complete
 
std::string metric_id
 
std::string serialized_value
 

Member Enumeration Documentation

◆ load_type

enum class zigpc_cpu_load_metric::load_type : uint8_t
strong

CPU Load average types.

Enumerator
AVG_1_MIN 
AVG_5_MIN 
AVG_15_MIN 

Constructor & Destructor Documentation

◆ zigpc_cpu_load_metric()

zigpc_cpu_load_metric::zigpc_cpu_load_metric ( zigpc_diagnostics_notification notif,
std::string  metric_id 
)
inline

Member Function Documentation

◆ get_value()

double zigpc_cpu_load_metric::get_value ( load_type  type) const
inline

◆ update_value()

void zigpc_cpu_load_metric::update_value ( void  )
inlinevirtual

Member Data Documentation

◆ LOAD_COUNT

constexpr int zigpc_cpu_load_metric::LOAD_COUNT = 3U
staticconstexprprivate

◆ LOAD_LABELS

constexpr std::array<std::string_view, LOAD_COUNT> zigpc_cpu_load_metric::LOAD_LABELS = {"1Min", "5Min", "15Min"}
staticconstexprprivate

◆ load_list

std::array<double, LOAD_COUNT> zigpc_cpu_load_metric::load_list = {}
private

◆ LOG_TAG

constexpr char zigpc_cpu_load_metric::LOG_TAG[] = "diagnostics_metric_cpu_load"
staticconstexprprivate

The documentation for this class was generated from the following file: