Added Periodic reportingType support to Report
When report interval expires report will collect readings from
metrics and update timestamp.
Tested:
- Added new units tests covering added code
- All existing unit tests are passing
Change-Id: I7f23ca05d77efb0f18d2c0d0f138c524ffb4f6af
Signed-off-by: Krzysztof Grobelny <krzysztof.grobelny@intel.com>
diff --git a/src/report_factory.cpp b/src/report_factory.cpp
index 9f51db5..27e4ee7 100644
--- a/src/report_factory.cpp
+++ b/src/report_factory.cpp
@@ -15,7 +15,10 @@
std::chrono::milliseconds period, const ReadingParameters& metricParams,
interfaces::ReportManager& reportManager) const
{
+ std::vector<std::shared_ptr<interfaces::Metric>> metrics;
+
return std::make_unique<Report>(
ioc, objServer, name, reportingType, emitsReadingsSignal,
- logToMetricReportsCollection, period, metricParams, reportManager);
+ logToMetricReportsCollection, period, metricParams, reportManager,
+ std::move(metrics));
}