diff options
author | Matt Spinler <spinler@us.ibm.com> | 2017-09-28 13:13:08 -0500 |
---|---|---|
committer | Matt Spinler <spinler@us.ibm.com> | 2017-10-11 09:25:04 -0500 |
commit | c39e859b44c7d9152c76462ab4848060c840ab29 (patch) | |
tree | 00cd5f026646677c4275e854183633e83ed341be /monitor/main.cpp | |
parent | 35108a774758099abb80299c8732b830418fa2ad (diff) | |
download | phosphor-fan-presence-c39e859b44c7d9152c76462ab4848060c840ab29.tar.gz phosphor-fan-presence-c39e859b44c7d9152c76462ab4848060c840ab29.zip |
monitor: Start checking tach trust
The Fan class now uses the trust::Manager class
to ask if a sensor value is trusted before analyzing
its value against the upper and lower limits.
Change-Id: I81dd468877873ba84753d76395b4a59129824c0b
Signed-off-by: Matt Spinler <spinler@us.ibm.com>
Diffstat (limited to 'monitor/main.cpp')
-rw-r--r-- | monitor/main.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/monitor/main.cpp b/monitor/main.cpp index f887232..060f27a 100644 --- a/monitor/main.cpp +++ b/monitor/main.cpp @@ -20,6 +20,7 @@ #include "event.hpp" #include "fan.hpp" #include "fan_defs.hpp" +#include "trust_manager.hpp" using namespace phosphor::fan::monitor; using namespace phosphor::logging; @@ -60,6 +61,9 @@ int main(int argc, char* argv[]) return -1; } + std::unique_ptr<phosphor::fan::trust::Manager> trust = + std::make_unique<phosphor::fan::trust::Manager>(trustGroups); + phosphor::fan::event::EventPtr eventPtr{events}; //Attach the event object to the bus object so we can @@ -68,7 +72,8 @@ int main(int argc, char* argv[]) for (const auto& fanDef : fanDefinitions) { - fans.emplace_back(std::make_unique<Fan>(mode, bus, eventPtr, fanDef)); + fans.emplace_back(std::make_unique<Fan>( + mode, bus, eventPtr, trust, fanDef)); } if (mode == Mode::init) |