Removed dependency to TriggerManager
introduces Messanger class which allows to send messages directly to
subscribed targets, which allows to break dependencies between classes.
Testes:
- All unit tests are passing
- Links are correctly updated
- Report is correctly updated by Trigger Action
Signed-off-by: Krzysztof Grobelny <krzysztof.grobelny@intel.com>
Change-Id: I32d3aaba22f9ec07e611f53fe553bd27e1c04c6d
diff --git a/src/report_factory.cpp b/src/report_factory.cpp
index df197a4..df71fa0 100644
--- a/src/report_factory.cpp
+++ b/src/report_factory.cpp
@@ -23,8 +23,8 @@
uint64_t appendLimit, const ReportUpdates reportUpdates,
interfaces::ReportManager& reportManager,
interfaces::JsonStorage& reportStorage,
- std::vector<LabeledMetricParameters> labeledMetricParams, bool enabled,
- const std::vector<std::string>& triggerIds) const
+ std::vector<LabeledMetricParameters> labeledMetricParams,
+ bool enabled) const
{
std::vector<std::shared_ptr<interfaces::Metric>> metrics = utils::transform(
labeledMetricParams,
@@ -40,11 +40,10 @@
std::make_unique<Clock>());
});
- return std::make_unique<Report>(bus->get_io_context(), objServer, id, name,
- reportingType, reportActions, period,
- appendLimit, reportUpdates, reportManager,
- reportStorage, std::move(metrics), enabled,
- std::make_unique<Clock>(), triggerIds);
+ return std::make_unique<Report>(
+ bus->get_io_context(), objServer, id, name, reportingType,
+ reportActions, period, appendLimit, reportUpdates, reportManager,
+ reportStorage, std::move(metrics), enabled, std::make_unique<Clock>());
}
Sensors ReportFactory::getSensors(