blob: 76a60fb3f62bf7b3e191029d4e3e05ae91b5bd23 [file] [log] [blame]
Krzysztof Grobelnyc8e3a642020-10-23 12:29:16 +02001#pragma once
2
3#include "interfaces/metric.hpp"
4#include "interfaces/sensor_listener.hpp"
5
6class Metric : public interfaces::Metric, public interfaces::SensorListener
7{
8 public:
9 const std::vector<MetricValue>& getReadings() const override
10 {
11 return readings;
12 }
13
14 void sensorUpdated(interfaces::Sensor&, uint64_t) override
15 {}
Krzysztof Grobelnyc8e3a642020-10-23 12:29:16 +020016 void sensorUpdated(interfaces::Sensor&, uint64_t, double value) override
17 {}
18
19 private:
20 std::vector<MetricValue> readings;
21};