path: root/utility.cpp
diff options
authorMatt Spinler <>2017-09-28 10:12:07 -0500
committerMatt Spinler <>2017-10-11 09:21:35 -0500
commit78689dd7cf10b8161ba04a2e9dc22b923baf5aa7 (patch)
treeb671d470f865e121f102c1da84d86d07e71de1de /utility.cpp
parent6fa181c781e59961e61f9cf5755ed220c2428c16 (diff)
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 <>
Diffstat (limited to 'utility.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud