platform-mc: Added Terminus/TerminusManager class
Added requester::sendRecvPldmMsg awaiter type to be able to send and
receive PLDM message by coroutine.
Added TerminusManager to discover terminus from EID list updated by
MCTPDiscovery class. The TerminusManager will initialize TID.
Signed-off-by: Gilbert Chen <gilbert.chen@arm.com>
Signed-off-by: Thu Nguyen <thu@os.amperecomputing.com>
Change-Id: Ifa5bdfff50648f1d7fba8710e160de662e8f9e06
diff --git a/platform-mc/platform_manager.cpp b/platform-mc/platform_manager.cpp
new file mode 100644
index 0000000..e1d7f96
--- /dev/null
+++ b/platform-mc/platform_manager.cpp
@@ -0,0 +1,28 @@
+#include "platform_manager.hpp"
+
+#include "terminus_manager.hpp"
+
+#include <phosphor-logging/lg2.hpp>
+
+PHOSPHOR_LOG2_USING;
+
+namespace pldm
+{
+namespace platform_mc
+{
+
+exec::task<int> PlatformManager::initTerminus()
+{
+ for (auto& [tid, terminus] : termini)
+ {
+ if (terminus->initialized)
+ {
+ continue;
+ }
+ terminus->initialized = true;
+ }
+ co_return PLDM_SUCCESS;
+}
+
+} // namespace platform_mc
+} // namespace pldm