Add command handler for Payload activation status command.

Change-Id: I12d9f5ff759042295654daef638fd30153f44ce0
Signed-off-by: Tom Joseph <tomjoseph@in.ibm.com>
diff --git a/command/payload_cmds.cpp b/command/payload_cmds.cpp
index 31ab3a7..9602c54 100644
--- a/command/payload_cmds.cpp
+++ b/command/payload_cmds.cpp
@@ -141,7 +141,31 @@
     return outPayload;
 }
 
+std::vector<uint8_t> getPayloadStatus(std::vector<uint8_t>& inPayload,
+                                      const message::Handler& handler)
+{
+    std::vector<uint8_t> outPayload(sizeof(GetPayloadStatusResponse));
+    auto request = reinterpret_cast<GetPayloadStatusRequest*>(inPayload.data());
+    auto response = reinterpret_cast<GetPayloadStatusResponse*>
+                    (outPayload.data());
+
+    // SOL is the payload currently supported for payload status
+    if (static_cast<uint8_t>(message::PayloadType::SOL) != request->payloadType)
+    {
+        response->completionCode = IPMI_CC_UNSPECIFIED_ERROR;
+        return outPayload;
+    }
+
+    response->completionCode = IPMI_CC_OK;
+    response->capacity = MAX_PAYLOAD_INSTANCES;
+
+    // Currently we support only one SOL session
+    response->instance1 =
+            std::get<sol::Manager&>(singletonPool).isPayloadActive(1);
+
+    return outPayload;
+}
+
 } // namespace command
 
 } // namespace sol
-