Implement Report persistency
Now Report properties are stored in non-volatile memory. It allows
to restore Report after system restart. Persistency of a report is
controlled by Persistency property in Report interface.
Tested:
- Passed unit tests
- Verified that report is stored in /var/lib/telemetry dir
- Verified that report is restored from storage after telemetry
service start
Signed-off-by: Wludzik, Jozef <jozef.wludzik@intel.com>
Change-Id: Iccfe21603eecffc4e174a4403f699b03de320db9
diff --git a/src/interfaces/metric.hpp b/src/interfaces/metric.hpp
index 51fc8fa..50bf5d5 100644
--- a/src/interfaces/metric.hpp
+++ b/src/interfaces/metric.hpp
@@ -2,6 +2,8 @@
#include "metric_value.hpp"
+#include <nlohmann/json.hpp>
+
#include <vector>
namespace interfaces
@@ -13,6 +15,7 @@
virtual ~Metric() = default;
virtual const std::vector<MetricValue>& getReadings() const = 0;
+ virtual nlohmann::json to_json() const = 0;
};
} // namespace interfaces