Send OCC mode change and IPS parms after reaching active state

Change is only applicable for POWER10 PowerVM systems.
Send mode change requests to OCC when PowerMode is changed.
Retry OCC command once, if a valid response is not received.

Tested: built openpower-occ-control successfully and verified
functionality on hardware.

Change-Id: If375f8abfdb2ad82937b8744096c2ccc471263d2
Signed-off-by: Chris Cain <cjcain@us.ibm.com>
diff --git a/occ_status.hpp b/occ_status.hpp
index df2ef51..415e0b7 100644
--- a/occ_status.hpp
+++ b/occ_status.hpp
@@ -149,6 +149,16 @@
     /** @brief Read OCC state (will trigger kernel to poll the OCC) */
     void readOccState();
 
+#ifdef POWER10
+    /** @brief Handle additional tasks when the OCCs reach active state */
+    void occsWentActive();
+
+    /** @brief Send mode change command to the master OCC
+     *  @return SUCCESS on success
+     */
+    CmdStatus sendModeChange();
+#endif // POWER10
+
   private:
     /** @brief OCC dbus object path */
     std::string path;
@@ -206,6 +216,23 @@
         return (path.empty() ? 0 : path.back() - '0');
     }
 
+#ifdef POWER10
+    /** @brief Query the current Hypervisor target
+     * @return true if the current Hypervisor target is PowerVM
+     */
+    bool isPowerVM();
+
+    /** @brief Get the requested power mode property
+     * @return Power mode
+     */
+    SysPwrMode getMode();
+
+    /** @brief Send Idle Power Saver config data to the master OCC
+     *  @return SUCCESS on success
+     */
+    CmdStatus sendIpsData();
+#endif // POWER10
+
     /** @brief Override the sensor name with name from the definition.
      *  @param[in]  estimatedPath - Estimated OCC Dbus object path
      *  @return  Fixed OCC DBus object path