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/platform-mc/test/mock_terminus_manager.hpp b/platform-mc/test/mock_terminus_manager.hpp
index 4e56a83..94d9c6d 100644
--- a/platform-mc/test/mock_terminus_manager.hpp
+++ b/platform-mc/test/mock_terminus_manager.hpp
@@ -17,7 +17,8 @@
MockTerminusManager(sdeventplus::Event& event, RequesterHandler& handler,
pldm::InstanceIdDb& instanceIdDb,
TerminiMapper& termini, Manager* manager) :
- TerminusManager(event, handler, instanceIdDb, termini, manager)
+ TerminusManager(event, handler, instanceIdDb, termini, manager,
+ pldm::BmcMctpEid)
{}
exec::task<int> sendRecvPldmMsgOverMctp(
diff --git a/platform-mc/test/sensor_manager_test.cpp b/platform-mc/test/sensor_manager_test.cpp
index b3a2d41..65505fb 100644
--- a/platform-mc/test/sensor_manager_test.cpp
+++ b/platform-mc/test/sensor_manager_test.cpp
@@ -17,7 +17,8 @@
bus(pldm::utils::DBusHandler::getBus()),
event(sdeventplus::Event::get_default()), instanceIdDb(),
reqHandler(pldmTransport, event, instanceIdDb, false),
- terminusManager(event, reqHandler, instanceIdDb, termini, nullptr),
+ terminusManager(event, reqHandler, instanceIdDb, termini, nullptr,
+ pldm::BmcMctpEid),
sensorManager(event, terminusManager, termini)
{}
diff --git a/platform-mc/test/terminus_manager_test.cpp b/platform-mc/test/terminus_manager_test.cpp
index 432ba21..6c425f2 100644
--- a/platform-mc/test/terminus_manager_test.cpp
+++ b/platform-mc/test/terminus_manager_test.cpp
@@ -32,7 +32,8 @@
event(sdeventplus::Event::get_default()), instanceIdDb(),
reqHandler(pldmTransport, event, instanceIdDb, false,
std::chrono::seconds(1), 2, std::chrono::milliseconds(100)),
- terminusManager(event, reqHandler, instanceIdDb, termini, nullptr),
+ terminusManager(event, reqHandler, instanceIdDb, termini, nullptr,
+ pldm::BmcMctpEid),
mockTerminusManager(event, reqHandler, instanceIdDb, termini, nullptr)
{}