From 6f31d19b704adf7302f924c1fbb80059fd3e7532 Mon Sep 17 00:00:00 2001 From: Matthew Barth Date: Tue, 30 Jan 2018 13:06:27 -0600 Subject: 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 --- monitor/nonzero_speed_trust.hpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'monitor/nonzero_speed_trust.hpp') 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& names) : + explicit NonzeroSpeed(const std::vector& 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; }); } }; -- cgit v1.2.1