Subscribe to systemd on startup
Added code for the implementation of the method
subscribeToSystemdSignals. The reason for this is
because we want to catch the obmc-standby.target
signal and be notified when it is done which means
the BMC is READY.
Change-Id: I824b83676db8cb211f5bee954f98a719a773a62b
Signed-off-by: Josh D. King <jdking@us.ibm.com>
diff --git a/bmc_state_manager.hpp b/bmc_state_manager.hpp
index 6b1f62d..be88ba8 100644
--- a/bmc_state_manager.hpp
+++ b/bmc_state_manager.hpp
@@ -29,7 +29,27 @@
const char* objPath) :
sdbusplus::server::object::object<
sdbusplus::xyz::openbmc_project::State::server::BMC>(
- bus, objPath) {};
+ bus, objPath),
+ bus(bus)
+ {
+ subscribeToSystemdSignals();
+ };
+
+ /** @brief Set value of BMCTransition **/
+ Transition requestedBMCTransition(Transition value) override;
+
+ /** @breif Set value of CurrentBMCState **/
+ BMCState currentBMCState(BMCState value) override;
+
+ private:
+ /**
+ * @brief subscribe to the systemd signals
+ **/
+ void subscribeToSystemdSignals();
+
+ /** @brief Persistent sdbusplus DBus bus connection. **/
+ sdbusplus::bus::bus& bus;
+
};