From 6db3822d3d2e575096606d757df22f4aeb767c91 Mon Sep 17 00:00:00 2001 From: "Josh D. King" Date: Mon, 19 Dec 2016 14:52:40 -0600 Subject: 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 --- bmc_state_manager.hpp | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) (limited to 'bmc_state_manager.hpp') 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 @@ class BMC : public sdbusplus::server::object::object< 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; + }; -- cgit v1.2.1