| Alexander Hansen | 4e1142d | 2025-07-25 17:07:27 +0200 | [diff] [blame] | 1 | // SPDX-License-Identifier: Apache-2.0 | 
|  | 2 | // SPDX-FileCopyrightText: Copyright 2024 Hewlett Packard Enterprise | 
| Chris Sides | 2ab7341 | 2024-10-15 16:04:11 -0500 | [diff] [blame] | 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: | 
|  | 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 | }; |