ups: watch for property changes
Monitor for any changes to the properties the chassis manger is
interested in with the UPower interface.
Tested:
- Changed the properties via busctl after the chassis manager was
running and verified the chassis power status was updated correctly
Signed-off-by: Andrew Geissler <geissonator@yahoo.com>
Change-Id: I13f23d33581c2339506f9c4739ce36bf07aef46e
diff --git a/chassis_state_manager.hpp b/chassis_state_manager.hpp
index 9be2b39..3b58fcd 100644
--- a/chassis_state_manager.hpp
+++ b/chassis_state_manager.hpp
@@ -135,6 +135,9 @@
/** @brief Used to subscribe to dbus systemd signals **/
sdbusplus::bus::match_t systemdSignals;
+ /** @brief Watch for any changes to UPS properties **/
+ std::unique_ptr<sdbusplus::bus::match_t> uPowerPropChangeSignal;
+
/** @brief Used to Set value of POHCounter */
uint32_t pohCounter(uint32_t value) override;
@@ -204,6 +207,16 @@
* @return true if fault detected, else false
*/
bool standbyVoltageRegulatorFault();
+
+ /** @brief Process UPS property changes
+ *
+ * Instance specific interface to monitor for changes to the UPS
+ * properties which may impact CurrentPowerStatus
+ *
+ * @param[in] msg - Data associated with subscribed signal
+ *
+ */
+ void uPowerChangeEvent(sdbusplus::message::message& msg);
};
} // namespace manager