Wait for OCC Active PDR to become available

occ-control was attempting to communicate with OCCs before the OCC
Active sensor PDR was available. This commit will wait until all PDRs
are available before allowing communication with the OCCs.
It will also read the OCC Active sensor to determine the state before
allowing communication.

When Hostboot moves a system to safe mode it will set the PLDM state of
the OCC Active sensor to PLDM_STATE_SET_OPERATIONAL_RUNNING_STATUS_DORMANT
This commit will also handle processing of that DORMANT status.

Change-Id: I348cf14455d9373898deec2ac4a04b3752e81c4a
Signed-off-by: Chris Cain <cjcain@us.ibm.com>
diff --git a/occ_manager.hpp b/occ_manager.hpp
index d636976..d3388e8 100644
--- a/occ_manager.hpp
+++ b/occ_manager.hpp
@@ -94,7 +94,8 @@
             std::bind(std::mem_fn(&Manager::updateOCCActive), this,
                       std::placeholders::_1, std::placeholders::_2),
             std::bind(std::mem_fn(&Manager::sbeHRESETResult), this,
-                      std::placeholders::_1, std::placeholders::_2)))
+                      std::placeholders::_1, std::placeholders::_2),
+            event))
 #endif
 #ifdef POWER10
         ,
@@ -219,6 +220,10 @@
     /** @brief Poll timer event */
     sdeventplus::Event sdpEvent;
 
+    /** @brief Flags to indicate if waiting for all of the OCC active sensors to
+     * come online */
+    bool waitingForAllOccActiveSensors = false;
+
     /**
      * @brief The timer to be used once the OCC goes active.  When it expires,
      *        a POLL command will be sent to the OCC and then timer restarted.
@@ -318,6 +323,11 @@
      * Manager).
      */
     void occsNotAllRunning();
+
+    /** @brief Check if all of the OCC Active sensors are available and if not
+     * restart the discoverTimer
+     */
+    void checkAllActiveSensors();
 #endif
 
     /**