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>
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 @@
         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 @@
 
     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)