ups: check state on startup and update power status
Look for a UPS (uninterruptible power supply) D-Bus object on chassis
startup. If found, read its State and BatteryLevel properties to check
the condition of the power to the chassis. Update the CurrentPowerStatus
property hosted by the chassis state manager based on this information.
Tested:
- Utilized ibm-ups feature to start in debug mode so all properties
could be manually set. Validated good path and bad paths for all
properties and ensured CurrentPowerStatus was set as expected for each
test.
Signed-off-by: Andrew Geissler <geissonator@yahoo.com>
Change-Id: I064a9e7fecbed8f859828359a761877e0fa95251
diff --git a/chassis_state_manager.hpp b/chassis_state_manager.hpp
index 422de59..9be2b39 100644
--- a/chassis_state_manager.hpp
+++ b/chassis_state_manager.hpp
@@ -86,6 +86,9 @@
/** @brief Determine initial chassis state and set internally */
void determineInitialState();
+ /** @brief Determine status of power into system */
+ void determineStatusOfPower();
+
/**
* @brief subscribe to the systemd signals
*