monitor: Add tach sensor trust group class
The trust::Group class is an abstract base class that
introduces the concept of knowing if a tach sensor
reading can be trusted or not. If it isn't trusted,
then it shouldn't be used when calculating if the fan
is considered functional or not.
It's a group because it supports groups of sensors
all having the same trusted status. For example the
first use case is a group of sensors cannot be trusted
when all of their readings are zero. A group may of
course just have 1 sensor in it if required.
The class also provides the functionality to start and
stop the timers that are used to consider a sensor faulted.
The timers would be stopped when a group moves to untrusted,
and started when it goes back to the trusted state.
Derived classes provide the functionality that actually
determines the trust value.
The constructor takes the list of sensor names that should
be in the group. After the TachSensor classes have been
constructed, the registerSensor(sensor) function must be
called to add the sensor objects to the group.
The checkTrust() function is used to calculate the trust
status of the group.
Change-Id: Ib4b871c6a186105028d1cc186c49611fb0608325
Signed-off-by: Matt Spinler <spinler@us.ibm.com>
diff --git a/monitor/tach_sensor.hpp b/monitor/tach_sensor.hpp
index 60a55e3..9b10110 100644
--- a/monitor/tach_sensor.hpp
+++ b/monitor/tach_sensor.hpp
@@ -15,6 +15,7 @@
class Fan;
+constexpr auto FAN_SENSOR_PATH = "/xyz/openbmc_project/sensors/fan_tach/";
/**
* @class TachSensor