commit | 413f51ea2c55609a69161528f0d9ef5c029df409 | [log] [tgz] |
---|---|---|
author | Archana Kakani <archana.kakani@ibm.com> | Mon Feb 03 04:14:36 2025 -0600 |
committer | Archana Kakani <archana.kakani@ibm.com> | Wed Feb 05 08:10:18 2025 -0600 |
tree | c4c99dc58f06f94ee706ca23fdc564dd43c2c6a3 | |
parent | 366507c82a4781c4a893ab9b9ca7b38f2157a353 [diff] [blame] |
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.cpp b/host-bmc/dbus/custom_dbus.cpp index d0979e9..e0d4fbf 100644 --- a/host-bmc/dbus/custom_dbus.cpp +++ b/host-bmc/dbus/custom_dbus.cpp
@@ -126,5 +126,16 @@ pldm::utils::DBusHandler::getBus(), path)); } } + +void CustomDBus::implementFanInterface(const std::string& path) +{ + if (!fan.contains(path)) + { + fan.emplace(path, + std::make_unique<Fan>(pldm::utils::DBusHandler::getBus(), + path.c_str())); + } +} + } // namespace dbus } // namespace pldm