Api changes in AddReportFuture version
Added support for CollectionFunction, CollectionDuration,
CollectionTimeScope, ReportUpdates, AppendLimit.
New API separates Id and Name, user can decide to pass only Name
to auto generate Id or pass Id which needs to be unique.
Tested:
- No functional changes to old API, everything works as before
- All use cases can be replaced with new API to achieve same results
- New features which require new API work as expected
Signed-off-by: Krzysztof Grobelny <krzysztof.grobelny@intel.com>
Change-Id: I647efab36d90a548754f89968223e162a087481e
diff --git a/src/trigger_actions.hpp b/src/trigger_actions.hpp
index c180c3d..d86acb8 100644
--- a/src/trigger_actions.hpp
+++ b/src/trigger_actions.hpp
@@ -45,7 +45,7 @@
std::vector<std::unique_ptr<interfaces::TriggerAction>>& actionsIf,
const std::vector<TriggerAction>& ActionsEnum, ::numeric::Type type,
double thresholdValue, interfaces::ReportManager& reportManager,
- const std::vector<std::string>& reportNames);
+ const std::vector<std::string>& reportIds);
} // namespace numeric
namespace discrete
@@ -84,7 +84,7 @@
std::vector<std::unique_ptr<interfaces::TriggerAction>>& actionsIf,
const std::vector<TriggerAction>& ActionsEnum,
::discrete::Severity severity, interfaces::ReportManager& reportManager,
- const std::vector<std::string>& reportNames);
+ const std::vector<std::string>& reportIds);
namespace onChange
{
@@ -112,7 +112,7 @@
std::vector<std::unique_ptr<interfaces::TriggerAction>>& actionsIf,
const std::vector<TriggerAction>& ActionsEnum,
interfaces::ReportManager& reportManager,
- const std::vector<std::string>& reportNames);
+ const std::vector<std::string>& reportIds);
} // namespace onChange
} // namespace discrete
@@ -121,9 +121,9 @@
{
public:
UpdateReport(interfaces::ReportManager& reportManager,
- std::vector<std::string> names) :
+ std::vector<std::string> ids) :
reportManager(reportManager),
- reportNames(std::move(names))
+ reportIds(std::move(ids))
{}
void commit(const std::string& id, uint64_t timestamp,
@@ -131,6 +131,6 @@
private:
interfaces::ReportManager& reportManager;
- std::vector<std::string> reportNames;
+ std::vector<std::string> reportIds;
};
} // namespace action