pldm: Implement Fan Interface
Adding support to host Fan dbus interface.
Based on the PDRs received from remote PLDM terminus,
PLDM hosts the dbus interface based on the entity type.
The Fan 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/Fan.interface.yaml
Change-Id: I353085817abb3646e607659d116207660d0bd0d4
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 9baa1dc..02807a1 100644
--- a/host-bmc/dbus/custom_dbus.hpp
+++ b/host-bmc/dbus/custom_dbus.hpp
@@ -3,6 +3,7 @@
#include "cable.hpp"
#include "common/utils.hpp"
#include "cpu_core.hpp"
+#include "fan.hpp"
#include "motherboard.hpp"
#include "pcie_device.hpp"
#include "pcie_slot.hpp"
@@ -135,6 +136,13 @@
*/
void implementMotherboardInterface(const std::string& path);
+ /** @brief Implement Fan Interface
+ *
+ * @param[in] path - The object path
+ *
+ */
+ void implementFanInterface(const std::string& path);
+
private:
std::unordered_map<ObjectPath, std::unique_ptr<LocationIntf>> location;
std::unordered_map<ObjectPath, std::unique_ptr<CPUCore>> cpuCore;
@@ -142,6 +150,7 @@
std::unordered_map<ObjectPath, std::unique_ptr<PCIeSlot>> pcieSlot;
std::unordered_map<ObjectPath, std::unique_ptr<Cable>> cable;
std::unordered_map<ObjectPath, std::unique_ptr<Motherboard>> motherboard;
+ std::unordered_map<ObjectPath, std::unique_ptr<Fan>> fan;
};
} // namespace dbus