summaryrefslogtreecommitdiffstats
path: root/bmc_state_manager.hpp
diff options
context:
space:
mode:
authorJosh D. King <jdking@us.ibm.com>2016-12-19 14:52:40 -0600
committerJosh D. King <jdking@us.ibm.com>2017-01-26 08:01:54 -0600
commit6db3822d3d2e575096606d757df22f4aeb767c91 (patch)
tree6e275312efea87920e37e7bedb9b8d9fc118d1c9 /bmc_state_manager.hpp
parentbdd9cb7121ca36f29a199e35f8837ec73c7a4e20 (diff)
downloadphosphor-state-manager-6db3822d3d2e575096606d757df22f4aeb767c91.tar.gz
phosphor-state-manager-6db3822d3d2e575096606d757df22f4aeb767c91.zip
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>
Diffstat (limited to 'bmc_state_manager.hpp')
-rw-r--r--bmc_state_manager.hpp22
1 files changed, 21 insertions, 1 deletions
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;
+
};
OpenPOWER on IntegriCloud