platform-mc: Set the local terminus as event receiver

Send `SetEventReceiver` to the discoveried terminus with the
configurable local EID to set the local terminus as event receiver.
Before send `SetEventReceiver` the local terminus also send
`EventMessageSupported` to get the `synchronyConfigurationSupported`.
The `eventMessageGlobalEnable` and `heartbeatTimer` options in the
`SetEventReceiver` command will depend on the responded
`synchronyConfigurationSupported`.

Signed-off-by: Thu Nguyen <thu@os.amperecomputing.com>
Signed-off-by: Gilbert Chen <gilbertc@nvidia.com>
Change-Id: Ia798c1cd5d946ac519933bca60620e970fe10b0a
diff --git a/libpldmresponder/pdr.hpp b/libpldmresponder/pdr.hpp
index d0ec8f1..ea12655 100644
--- a/libpldmresponder/pdr.hpp
+++ b/libpldmresponder/pdr.hpp
@@ -14,8 +14,6 @@
 namespace pdr
 {
 
-constexpr uint8_t BmcMctpEid = 8;
-
 /** @brief Build (if not built already) and retrieve PDR by the PDR types
  *
  *  @param[in] dir - directory housing platform specific PDR JSON files
diff --git a/libpldmresponder/platform.cpp b/libpldmresponder/platform.cpp
index 522899c..0a0de64 100644
--- a/libpldmresponder/platform.cpp
+++ b/libpldmresponder/platform.cpp
@@ -746,7 +746,7 @@
         sizeof(pldm_terminus_locator_type_mctp_eid);
     auto locatorValue = reinterpret_cast<pldm_terminus_locator_type_mctp_eid*>(
         pdr->terminus_locator_value);
-    locatorValue->eid = BmcMctpEid;
+    locatorValue->eid = pldm::BmcMctpEid;
 
     PdrEntry pdrEntry{};
     pdrEntry.data = pdrBuffer.data();
@@ -980,7 +980,7 @@
     uint8_t eventMessageGlobalEnable =
         PLDM_EVENT_MESSAGE_GLOBAL_ENABLE_ASYNC_KEEP_ALIVE;
     uint8_t transportProtocolType = PLDM_TRANSPORT_PROTOCOL_TYPE_MCTP;
-    uint8_t eventReceiverAddressInfo = pldm::responder::pdr::BmcMctpEid;
+    uint8_t eventReceiverAddressInfo = pldm::BmcMctpEid;
     uint16_t heartbeatTimer = HEARTBEAT_TIMEOUT;
 
     auto rc = encode_set_event_receiver_req(
diff --git a/libpldmresponder/test/libpldmresponder_platform_test.cpp b/libpldmresponder/test/libpldmresponder_platform_test.cpp
index d3606f5..4fbd81b 100644
--- a/libpldmresponder/test/libpldmresponder_platform_test.cpp
+++ b/libpldmresponder/test/libpldmresponder_platform_test.cpp
@@ -1,4 +1,5 @@
 #include "common/test/mocked_utils.hpp"
+#include "common/types.hpp"
 #include "common/utils.hpp"
 #include "host-bmc/dbus_to_event_handler.hpp"
 #include "libpldmresponder/event_parser.hpp"
@@ -774,7 +775,7 @@
     auto locatorValue =
         reinterpret_cast<const pldm_terminus_locator_type_mctp_eid*>(
             pdr->terminus_locator_value);
-    EXPECT_EQ(locatorValue->eid, BmcMctpEid);
+    EXPECT_EQ(locatorValue->eid, pldm::BmcMctpEid);
     pldm_pdr_destroy(inPDRRepo);
     pldm_pdr_destroy(outPDRRepo);
 }