commit | 2ed986c91a0c64c967c85607caa2b66d634e1c07 | [log] [tgz] |
---|---|---|
author | Kamalkumar Patel <kamalkumar.patel@ibm.com> | Wed May 08 02:20:47 2024 -0500 |
committer | Kamalkumar Patel <kamalkumar.patel@ibm.com> | Tue Jul 16 01:00:01 2024 -0500 |
tree | 76274d37449585bb8dc306c9ad2d831c11603fad | |
parent | eb43d6c8320604e18c7ea5595fb1ae20b6d85ce5 [diff] [blame] |
Implementing Motherboard interface This commit adds support to host motherboard interface which can be used to generate Dbus Object paths. The Dbus object paths will be represents the hardware components within the system architecture and help to understand the architecture better way. The motherboard will represent the system board and other entity are connected to it. The interface is implemented at:[1] [1] https://github.com/openbmc/phosphor-dbus-interfaces/blob/master/yaml/xyz/openbmc_project/Inventory/Item/Board/Motherboard.interface.yaml Change-Id: Ie7987ea0fb03d2d6ffd9e485924cfea7446d97d9 Signed-off-by: Kamalkumar Patel <kamalkumar.patel@ibm.com>
diff --git a/host-bmc/dbus/custom_dbus.cpp b/host-bmc/dbus/custom_dbus.cpp index 204c9fa..1277d7a 100644 --- a/host-bmc/dbus/custom_dbus.cpp +++ b/host-bmc/dbus/custom_dbus.cpp
@@ -117,5 +117,14 @@ } } +void CustomDBus::implementMotherboardInterface(const std::string& path) +{ + if (!motherboard.contains(path)) + { + motherboard.emplace(path, + std::make_unique<Motherboard>( + pldm::utils::DBusHandler::getBus(), path)); + } +} } // namespace dbus } // namespace pldm