Send ambient and altitude to OCC

After the OCCs go active or anytime the ambient temperature changes the
ambient temperature and alititude will get sent to each OCC.
The altitude is only read once. If the altitude was not valid,
another attempt to read it will be done when the ambient temperature
is going to be re-sent.

Tested on Everest and Rainier systems

Change-Id: Icd64c50c05469bc985cfcaa3fcc74c3db5b41429
Signed-off-by: Chris Cain <cjcain@us.ibm.com>
diff --git a/occ_status.hpp b/occ_status.hpp
index 7356add..c449ec1 100644
--- a/occ_status.hpp
+++ b/occ_status.hpp
@@ -69,7 +69,7 @@
      *                             OCC if PLDM is the host communication
      *                             protocol
      */
-    Status(EventPtr& event, const char* path, Manager& manager,
+    Status(EventPtr& event, const char* path, Manager& managerRef,
            std::function<void(bool)> callBack = nullptr
 #ifdef PLDM
            ,
@@ -79,6 +79,7 @@
 
         Interface(utils::getBus(), getDbusPath(path).c_str(), true),
         path(path), callBack(callBack), instance(getInstance(path)),
+        manager(managerRef),
         device(event,
 #ifdef I2C_OCC
                fs::path(DEV_PATH) / i2c_occ::getI2cDeviceName(path),
@@ -86,7 +87,7 @@
                fs::path(DEV_PATH) /
                    fs::path(sysfsName + "." + std::to_string(instance + 1)),
 #endif
-               manager, *this, instance),
+               managerRef, *this, instance),
         hostControlSignal(
             utils::getBus(),
             sdbusRule::type::signal() + sdbusRule::member("CommandComplete") +
@@ -177,6 +178,17 @@
      *  @return SUCCESS on success
      */
     CmdStatus sendIpsData();
+
+    /** @brief Send Ambient & Altitude data to OCC
+     *
+     *  @param[in] ambient - temperature to send (0xFF will force read
+     *                       of current temperature and altitude)
+     *  @param[in] altitude - altitude to send (0xFFFF = unavailable)
+     *
+     *  @return SUCCESS on success
+     */
+    CmdStatus sendAmbient(const uint8_t ambient = 0xFF,
+                          const uint16_t altitude = 0xFFFF);
 #endif // POWER10
 
   private:
@@ -197,6 +209,9 @@
     /** @brief OCC instance to Sensor definitions mapping */
     static const std::map<instanceID, sensorDefs> sensorMap;
 
+    /** @brief OCC manager object */
+    const Manager& manager;
+
     /** @brief OCC device object to do bind and unbind */
     Device device;