Disable Idle Power Saver support in efficiency modes

IPS will not be published on DBUS when the PowerMode is set to one of
the newer efficiency modes:
  EfficiencyFavorPower
  EfficiencyFavorPerformance (OEM only)

This will prevent the Redfish interface from allowing GET/PATCH
commands and provides a way for the GUI to know when to suppress
B
displaying the parameters on the customer GUI.

Testing:
Verified on Rainier.

When in a non-efficiency mode, the Redfish query returns IPS data:
(GET /redfish/v1/Systems/system)
'''
...
    "Id": "system",
    "IdlePowerSaver": {
        "Enabled": true,
        "EnterDwellTimeSeconds": 240,
        "EnterUtilizationPercent": 8,
        "ExitDwellTimeSeconds": 10,
        "ExitUtilizationPercent": 12
    },
    "IndicatorLED": "Off",
...
'''

When in an efficiency mode, the Redfish query does not return IPS data.
'''
...
    "Id": "system",
    "IndicatorLED": "Off",
...
'''

Verified across re-ipls, OCC resets, app restarts.

Change-Id: I45bb0d8e97dab33a1a66c0d791f7bb4848bfce41
Signed-off-by: Chris Cain <cjcain@us.ibm.com>
diff --git a/powermode.hpp b/powermode.hpp
index a9b01de..715499b 100644
--- a/powermode.hpp
+++ b/powermode.hpp
@@ -241,7 +241,7 @@
  *  the power mode to the OCC if the mode is changed while the occ is active.
  */
 
-class PowerMode : public ModeInterface, public IpsInterface
+class PowerMode : public ModeInterface
 {
   public:
     /** @brief PowerMode object to inform occ of changes to mode
@@ -339,6 +339,15 @@
      */
     bool isValidMode(const SysPwrMode mode);
 
+    /** @brief If IPS is supported, set flag indicating need to send IPS data */
+    void needToSendIPS()
+    {
+        if (ipsObject)
+        {
+            needToSendIpsData = true;
+        }
+    }
+
   private:
     /** @brief OCC manager object */
     const Manager& manager;
@@ -385,6 +394,15 @@
     /** @brief Current state of error watching */
     bool watching = false;
 
+    /** @brief Set at IPS object creation and cleared after sending IPS data */
+    bool needToSendIpsData = false;
+
+    /** @brief Object path for IPS on DBUS */
+    const char* ipsObjectPath;
+
+    /** @brief IPS DBUS Object */
+    std::unique_ptr<IpsInterface> ipsObject;
+
     /** @brief register for the callback from the POLL IPS changed event */
     void registerIpsStatusCallBack();
 
@@ -483,6 +501,12 @@
      */
     bool getSupportedModes();
 
+    /** @brief Create IPS DBUS Object */
+    void createIpsObject();
+
+    /** @brief Remove IPS DBUS Object */
+    void removeIpsObject();
+
     /** @brief callback for the POLL IPS changed event
      *
      *  @param[in] es       - Populated event source