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