Zigbee Protocol Controller 1.6.0
zigpc_example_metric.hpp
Go to the documentation of this file.
1/******************************************************************************
2 * # License
3 * <b>Copyright 2021 Silicon Laboratories Inc. www.silabs.com</b>
4 ******************************************************************************
5 * The licensor of this software is Silicon Laboratories Inc. Your use of this
6 * software is governed by the terms of Silicon Labs Master Software License
7 * Agreement (MSLA) available at
8 * www.silabs.com/about-us/legal/master-software-license-agreement. This
9 * software is distributed to you in Source Code format and is governed by the
10 * sections of the MSLA applicable to Source Code.
11 *
12 *****************************************************************************/
13
15
17{
18 private:
19 uint8_t value;
20
21 public:
23 std::string metric_id) :
25 {}
26
28 {
29 // This is where we will get cpu ram etc
30 this->value += 1;
31 serialized_value = std::to_string(value);
32
34 }
35};
Abstract top level metric from which all diagnostic metric derive from.
Definition: zigpc_diagnostics_metric.hpp:25
zigpc_diagnostics_notification & on_update_complete
Definition: zigpc_diagnostics_metric.hpp:28
std::string serialized_value
Definition: zigpc_diagnostics_metric.hpp:30
std::string metric_id
Definition: zigpc_diagnostics_metric.hpp:29
Definition: zigpc_diagnostics_notification.hpp:20
virtual void notify(std::string metric_id)
Definition: zigpc_diagnostics_notification.hpp:22
Definition: zigpc_example_metric.hpp:17
uint8_t value
Definition: zigpc_example_metric.hpp:19
void update_value()
Definition: zigpc_example_metric.hpp:27
zigpc_example_metric(zigpc_diagnostics_notification &notif, std::string metric_id)
Definition: zigpc_example_metric.hpp:22