summaryrefslogtreecommitdiffstats
path: root/monitor/types.hpp
diff options
context:
space:
mode:
authorMatt Spinler <spinler@us.ibm.com>2017-09-28 11:57:47 -0500
committerMatt Spinler <spinler@us.ibm.com>2017-10-11 09:24:59 -0500
commit136e23dd27dbff225fd7b68cb624e4b612cf790f (patch)
tree95dcfc105cd23b72901ab7ff765a70270fed0455 /monitor/types.hpp
parent0ada59f968b6f51ccb561dd60da36c6bfbf2ae5d (diff)
downloadphosphor-fan-presence-136e23dd27dbff225fd7b68cb624e4b612cf790f.tar.gz
phosphor-fan-presence-136e23dd27dbff225fd7b68cb624e4b612cf790f.zip
monitor: Add trust manager class
This class contains the trust groups, and is the interface for asking if a sensor value can be trusted or not. It will also start and stop timers on all sensors in the same group as the timer in question whose trust value just changed. This class will be used by the Fan class in the speed change callback function to check if a sensor is trusted before analyzing its value. Change-Id: I134be095b6b5222f7bc0e457078cf01f75a36219 Signed-off-by: Matt Spinler <spinler@us.ibm.com>
Diffstat (limited to 'monitor/types.hpp')
-rw-r--r--monitor/types.hpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/monitor/types.hpp b/monitor/types.hpp
index dbdebd9..795db00 100644
--- a/monitor/types.hpp
+++ b/monitor/types.hpp
@@ -1,8 +1,10 @@
#pragma once
+#include <functional>
#include <string>
#include <tuple>
#include <vector>
+#include "trust_group.hpp"
namespace phosphor
{
@@ -11,6 +13,9 @@ namespace fan
namespace monitor
{
+using CreateGroupFunction =
+ std::function<std::unique_ptr<trust::Group>()>;
+
constexpr auto sensorNameField = 0;
constexpr auto hasTargetField = 1;
OpenPOWER on IntegriCloud