platform-mc: Support register OEM mechanism to poll events
When the terminus only supports the `Poll-based message` type as `Table
17 - EventMessageSupported command format` in DSP0248 V1.3.0, BMC needs
polling the events from the terminus.
Add method to register OEM mechanism to poll the event from terminus.
Change-Id: I9c10d66ce076de3ddb38c9a391c3784b57ebb934
Signed-off-by: Dung Cao <dung@os.amperecomputing.com>
Signed-off-by: Dung Cao <dung@os.amperecomputing.com>
diff --git a/platform-mc/sensor_manager.cpp b/platform-mc/sensor_manager.cpp
index 2ffc679..95dd422 100644
--- a/platform-mc/sensor_manager.cpp
+++ b/platform-mc/sensor_manager.cpp
@@ -189,6 +189,11 @@
tid, terminus->pollEventId, terminus->pollDataTransferHandle);
}
+ if (manager && (!terminus->pollEvent))
+ {
+ co_await manager->oemPollForPlatformEvent(tid);
+ }
+
sd_event_now(event.get(), CLOCK_MONOTONIC, &t1);
auto toBeUpdated = roundRobinSensors[tid].size();
while (((t1 - t0) < pollingTimeInUsec) && (toBeUpdated > 0))