platform-mc: Support pollForPlatFormEventMessage
Supports polling all events synchronously when the terminus sends
`pldmMessagePollEvent` with the event id. BMC will use the received
event id as input for `pollForPlatformEventMessage` command to retrieve
the event data.
Change-Id: If01f63f30d3f57f8423c863ec776e83dda8e3042
Signed-off-by: Dung Cao <dung@os.amperecomputing.com>
Signed-off-by: Thu Nguyen <thu@os.amperecomputing.com>
diff --git a/pldmd/pldmd.cpp b/pldmd/pldmd.cpp
index fc2b08d..e9ff90e 100644
--- a/pldmd/pldmd.cpp
+++ b/pldmd/pldmd.cpp
@@ -282,6 +282,13 @@
return platformManager->handleCperEvent(
request, payloadLength, formatVersion, tid, eventDataOffset);
}}},
+ {PLDM_MESSAGE_POLL_EVENT,
+ {[&platformManager](const pldm_msg* request, size_t payloadLength,
+ uint8_t formatVersion, uint8_t tid,
+ size_t eventDataOffset) {
+ return platformManager->handlePldmMessagePollEvent(
+ request, payloadLength, formatVersion, tid, eventDataOffset);
+ }}},
{PLDM_SENSOR_EVENT,
{[&platformManager](const pldm_msg* request, size_t payloadLength,
uint8_t formatVersion, uint8_t tid,