diff options
author | Matthew Barth <msbarth@us.ibm.com> | 2018-01-30 13:06:27 -0600 |
---|---|---|
committer | Matthew Barth <msbarth@us.ibm.com> | 2018-03-01 09:34:04 -0600 |
commit | 6f31d19b704adf7302f924c1fbb80059fd3e7532 (patch) | |
tree | 1d6d0e50ce07c5ac3dc04204dab74fac8370014f /monitor/nonzero_speed_trust.hpp | |
parent | 32affb9879b18226b3a026072ce1753f03b7ca58 (diff) | |
download | phosphor-fan-presence-6f31d19b704adf7302f924c1fbb80059fd3e7532.tar.gz phosphor-fan-presence-6f31d19b704adf7302f924c1fbb80059fd3e7532.zip |
Generate sensor to trust association
Each sensor listed to be associated with a trust group is defined to
either be part of the trust group or just affected by the results of the
trust group. This is denoted by defining an "in_trust" boolean attribute
that will include the sensor in the trust group for determination of
trust when true, otherwise only be included in the resulting trust
affect when defined as false.
When no "in_trust" attribute is given, the sensor is defaulted to be
included in the trust group determining trust.
Tested: Current trust group associations & reactions are unchanged
Change-Id: I717074bc1a32a07dc59f172a4c823c7e2bb84f8c
Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
Diffstat (limited to 'monitor/nonzero_speed_trust.hpp')
-rw-r--r-- | monitor/nonzero_speed_trust.hpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/monitor/nonzero_speed_trust.hpp b/monitor/nonzero_speed_trust.hpp index 93fce7d..e1f787f 100644 --- a/monitor/nonzero_speed_trust.hpp +++ b/monitor/nonzero_speed_trust.hpp @@ -30,9 +30,10 @@ class NonzeroSpeed : public Group /** * Constructor * - * @param[in] names - the names of the sensors in the group + * @param[in] names - the names of the sensors and its inclusion in + * determining trust for the group */ - explicit NonzeroSpeed(const std::vector<std::string>& names) : + explicit NonzeroSpeed(const std::vector<GroupDefinition>& names) : Group(names) { } @@ -53,7 +54,7 @@ class NonzeroSpeed : public Group _sensors.end(), [](const auto& s) { - return s->getInput() != 0; + return std::get<0>(s)->getInput() != 0; }); } }; |