xref: /openbmc/telemetry/src/interfaces/metric.hpp (revision e2362796)
1 #pragma once
2 
3 #include "metric_value.hpp"
4 
5 #include <nlohmann/json.hpp>
6 
7 #include <vector>
8 
9 namespace interfaces
10 {
11 
12 class Metric
13 {
14   public:
15     virtual ~Metric() = default;
16 
17     virtual const std::vector<MetricValue>& getReadings() const = 0;
18     virtual nlohmann::json to_json() const = 0;
19 };
20 
21 } // namespace interfaces
22