Zigbee Protocol Controller 1.6.0
zigpc_mem_usage_metric Class Reference

#include <zigpc_mem_usage_metric.hpp>

Inheritance diagram for zigpc_mem_usage_metric:
zigpc_diagnostics_metric

Public Member Functions

 zigpc_mem_usage_metric (zigpc_diagnostics_notification &notif, std::string const &metric_id)
 
float get_value (void) const
 Get the memory usage. More...
 
void update_value (void) final
 Update the memory usage by process. More...
 
- 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

long int page_size_kb = zigpc_diagnostics::util::get_pagesize_kb()
 
unsigned long total_mem_kb = zigpc_diagnostics::util::get_mem_total()
 
float mem_usage = 0.f
 

Static Private Attributes

static constexpr char LOG_TAG [] = "zigpc_metric_ram_usage"
 

Additional Inherited Members

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

Constructor & Destructor Documentation

◆ zigpc_mem_usage_metric()

zigpc_mem_usage_metric::zigpc_mem_usage_metric ( zigpc_diagnostics_notification notif,
std::string const &  metric_id 
)
inline

Member Function Documentation

◆ get_value()

float zigpc_mem_usage_metric::get_value ( void  ) const
inline

Get the memory usage.

Returns
float memory use by process.

◆ update_value()

void zigpc_mem_usage_metric::update_value ( void  )
inlinefinalvirtual

Update the memory usage by process.

Implements zigpc_diagnostics_metric.

Member Data Documentation

◆ LOG_TAG

constexpr char zigpc_mem_usage_metric::LOG_TAG[] = "zigpc_metric_ram_usage"
staticconstexprprivate

◆ mem_usage

float zigpc_mem_usage_metric::mem_usage = 0.f
private

◆ page_size_kb

long int zigpc_mem_usage_metric::page_size_kb = zigpc_diagnostics::util::get_pagesize_kb()
private

◆ total_mem_kb

unsigned long zigpc_mem_usage_metric::total_mem_kb = zigpc_diagnostics::util::get_mem_total()
private

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