host-bmc: Implement Chassis interface
Adding support to host Chassis dbus interface. Based on the PDRs
received from remote PLDM terminus, PLDM hosts the dbus interface based
on the entity type. The Chassis interface is defined at [1].
Tested: Functional test passed
[1]: https://github.com/openbmc/phosphor-dbus-interfaces/blob/master/yaml/xyz/openbmc_project/Inventory/Item/Chassis.interface.yaml
Change-Id: Ia07c5974ae78314e0812cb09fbc6c738b4853cb9
Signed-off-by: Archana Kakani <archana.kakani@ibm.com>
diff --git a/host-bmc/dbus/custom_dbus.hpp b/host-bmc/dbus/custom_dbus.hpp
index 02807a1..9ca8926 100644
--- a/host-bmc/dbus/custom_dbus.hpp
+++ b/host-bmc/dbus/custom_dbus.hpp
@@ -1,6 +1,7 @@
#pragma once
#include "cable.hpp"
+#include "chassis.hpp"
#include "common/utils.hpp"
#include "cpu_core.hpp"
#include "fan.hpp"
@@ -143,9 +144,15 @@
*/
void implementFanInterface(const std::string& path);
+ /** @brief Implement Chassis Interface
+ * @param[in] path - the object path
+ */
+ void implementChassisInterface(const std::string& path);
+
private:
std::unordered_map<ObjectPath, std::unique_ptr<LocationIntf>> location;
std::unordered_map<ObjectPath, std::unique_ptr<CPUCore>> cpuCore;
+ std::unordered_map<ObjectPath, std::unique_ptr<ItemChassis>> chassis;
std::unordered_map<ObjectPath, std::unique_ptr<PCIeDevice>> pcieDevice;
std::unordered_map<ObjectPath, std::unique_ptr<PCIeSlot>> pcieSlot;
std::unordered_map<ObjectPath, std::unique_ptr<Cable>> cable;