1 // SPDX-License-Identifier: Apache-2.0 2 // SPDX-FileCopyrightText: Copyright 2024 Hewlett Packard Enterprise 3 4 #pragma once 5 6 #include <sdbusplus/async.hpp> 7 #include <xyz/openbmc_project/Inventory/Decorator/Asset/aserver.hpp> 8 9 class MachineContext : 10 public sdbusplus::aserver::xyz::openbmc_project::inventory::decorator:: 11 Asset<MachineContext> 12 { 13 public: MachineContext(sdbusplus::async::context & ctx,auto path)14 explicit MachineContext(sdbusplus::async::context& ctx, auto path) : 15 sdbusplus::aserver::xyz::openbmc_project::inventory::decorator::Asset< 16 MachineContext>(ctx, path) {}; 17 18 void populateFromDeviceTree(); 19 20 static bool keyNodeExists(); 21 22 private: 23 static constexpr auto nodeBasePath = "/proc/device-tree/"; 24 }; 25