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.cpp b/bmc_state_manager.cpp
index 6eeec58..c739ae0 100644
--- a/bmc_state_manager.cpp
+++ b/bmc_state_manager.cpp
@@ -1,4 +1,5 @@
 #include <iostream>
+#include <log.hpp>
 #include "bmc_state_manager.hpp"
 
 namespace phosphor
@@ -8,6 +9,45 @@
 namespace manager
 {
 
+// When you see server:: you know we're referencing our base class
+namespace server = sdbusplus::xyz::openbmc_project::State::server;
+
+using namespace phosphor::logging;
+
+constexpr auto SYSTEMD_SERVICE   = "org.freedesktop.systemd1";
+constexpr auto SYSTEMD_OBJ_PATH  = "/org/freedesktop/systemd1";
+constexpr auto SYSTEMD_INTERFACE = "org.freedesktop.systemd1.Manager";
+
+void BMC::subscribeToSystemdSignals()
+{
+    auto method = this->bus.new_method_call(SYSTEMD_SERVICE,
+                                            SYSTEMD_OBJ_PATH,
+                                            SYSTEMD_INTERFACE,
+                                            "Subscribe");
+    this->bus.call(method);
+
+    return;
+}
+
+BMC::Transition BMC::requestedBMCTransition(Transition value)
+{
+    log<level::INFO>(
+            "Setting the RequestedBMCTransition field",
+            entry("REQUESTED_BMC_TRANSITION=0x%s",
+                  convertForMessage(value).c_str()));
+    return server::BMC::requestedBMCTransition(value);
+}
+
+BMC::BMCState BMC::currentBMCState(BMCState value)
+{
+    log<level::INFO>(
+            "Setting the BMCState field",
+            entry("CURRENT_BMC_STATE=0x%s",
+                  convertForMessage(value).c_str()));
+    return server::BMC::currentBMCState(value);
+}
+
+
 } // namespace manager
 } // namespace state
 } // namepsace phosphor