summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--monitor/example/monitor.yaml12
-rw-r--r--monitor/nonzero_speed_trust.hpp5
2 files changed, 11 insertions, 6 deletions
diff --git a/monitor/example/monitor.yaml b/monitor/example/monitor.yaml
index fc6ca5e..4819d12 100644
--- a/monitor/example/monitor.yaml
+++ b/monitor/example/monitor.yaml
@@ -33,8 +33,10 @@
# Available classes:
# * NonzeroSpeed - Only trust if at least one sensor in the group
# has a nonzero speed.]
-# sensors:
+# group:
# - name [The name of the fan sensor in this group]
+# in_trust: [true|false] (optional)
+# [Include in trust determination or not. Default = true]
#The code uses these parameters as follows:
# After a speed reading of a sensor is outside of the allowed deviation of
@@ -45,8 +47,8 @@
# Sensor trust groups are used to specify that the speed values for the
# sensors in a group cannot be trusted based on some condition, where
# the condition is based on the class used to implement the group. All
-# sensors in the group go in and out of trust together. This section
-# is optional.
+# sensors in the group go in and out of trust based on those defined
+# to be part of determining the trust. This section is optional.
#Example entries for 1 fan system:
#fans:
@@ -59,5 +61,7 @@
# has_target: true
#sensor_trust_groups:
# - class: NonzeroSpeed
-# sensors:
+# group:
# - name: fan0_0
+# in_trust: false
+# - name: fan0_1
diff --git a/monitor/nonzero_speed_trust.hpp b/monitor/nonzero_speed_trust.hpp
index 7e6a85a..c5b67fd 100644
--- a/monitor/nonzero_speed_trust.hpp
+++ b/monitor/nonzero_speed_trust.hpp
@@ -42,7 +42,8 @@ class NonzeroSpeed : public Group
/**
* Determines if the group is trusted by checking
- * if any sensor has a nonzero speed. If all speeds
+ * if any sensor included in the trust determination
+ * has a nonzero speed. If all the speeds of these sensors
* are zero, then no sensors in the group are trusted.
*
* @return bool - if group is trusted or not
@@ -54,7 +55,7 @@ class NonzeroSpeed : public Group
_sensors.end(),
[](const auto& s)
{
- return s.sensor->getInput() != 0;
+ return s.inTrust && s.sensor->getInput() != 0;
});
}
};
OpenPOWER on IntegriCloud