blob: 7e79a290610e43fd745c20092d3f78f50d475309 [file] [log] [blame]
Gilbert Chen6c7fed42022-02-22 15:40:17 +00001#include "manager.hpp"
2
3#include <phosphor-logging/lg2.hpp>
4
5PHOSPHOR_LOG2_USING;
6
7namespace pldm
8{
9namespace platform_mc
10{
11exec::task<int> Manager::beforeDiscoverTerminus()
12{
13 // Add any setup or checks needed before discovering a terminus
14 // If any setup/check fails, return the appropriate error code
15 // For now, we assume everything is successful
16 co_return PLDM_SUCCESS;
17}
18
19exec::task<int> Manager::afterDiscoverTerminus()
20{
21 auto rc = co_await platformManager.initTerminus();
22 if (rc != PLDM_SUCCESS)
23 {
24 lg2::error("Failed to initialize platform manager, error {RC}", "RC",
25 rc);
26 }
27 else
28 {
29 lg2::info("Successfully initialized platform manager");
30 }
31 co_return rc;
32}
33
34} // namespace platform_mc
35} // namespace pldm