1 #pragma once 2 3 #include "interfaces/metric.hpp" 4 #include "interfaces/sensor_listener.hpp" 5 6 class 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 {} 16 17 void sensorUpdated(interfaces::Sensor&, uint64_t, double value) override 18 {} 19 20 private: 21 std::vector<MetricValue> readings; 22 }; 23