Added discrete threshold trigger support
Implemented discrete threshold logic
Discrete trigger with empty threshold array is handled as 'onChange'
Added unit tests coverage for discrete trigger
Supported scenarios:
-discrete threshold with value and dwell time
-discrete threshold with value, without dwell time
-discrete trigger without threshold ('onChange')
Tests:
-Unit tests passed
Change-Id: Id60a48f4113bd955d97e154888c00d1b6e5490af
Signed-off-by: Szymon Dompke <szymon.dompke@intel.com>
diff --git a/tests/src/params/trigger_params.hpp b/tests/src/params/trigger_params.hpp
index 6d34d3b..95b19d2 100644
--- a/tests/src/params/trigger_params.hpp
+++ b/tests/src/params/trigger_params.hpp
@@ -21,6 +21,12 @@
return nameProperty;
}
+ TriggerParams& isDiscrete(bool val)
+ {
+ discreteProperty = val;
+ return *this;
+ }
+
bool isDiscrete() const
{
return discreteProperty;
@@ -52,6 +58,12 @@
return reportNamesProperty;
}
+ TriggerParams& thresholdParams(TriggerThresholdParams val)
+ {
+ thresholdsProperty = std::move(val);
+ return *this;
+ }
+
const TriggerThresholdParams& thresholdParams() const
{
return thresholdsProperty;