Added support for Enabled property
Enabled property is added so that user can select via dbus interface if
Readings are updated and signal on Readings update is emitted, moreover
Metric calculation on received sensor data is active only when Enabled
is set to true
Tested:
- New unit tests were created, ran all new and previous UTs, all passed
- Tested under QEMU by adding reports for single and multiple sensors,
changing Enabled property and emitting signal of value change for
sensors added into the report, checking if Readings is accordingly
updated or not updated
- Verified persistency, if Enabled property is successfully stored and
restored after Telemetry service restart and also checked if after the
restart dependencies of Enabled (Readings, Metric calculation) are
properly initiated
Signed-off-by: Lukasz Kazmierczak <lukasz.kazmierczak@intel.com>
Change-Id: I29cf13693a48d15cb16d2ad6707f483f67f4879b
diff --git a/tests/src/fakes/clock_fake.hpp b/tests/src/fakes/clock_fake.hpp
index 28c2940..3871a3b 100644
--- a/tests/src/fakes/clock_fake.hpp
+++ b/tests/src/fakes/clock_fake.hpp
@@ -27,6 +27,11 @@
timePoint = time_point{timeSinceEpoch};
}
+ void reset(void) noexcept
+ {
+ set(Milliseconds(0));
+ }
+
static uint64_t toTimestamp(Milliseconds time)
{
return time.count();