blob: 3945b58085e76534496fc92c9ada04654b43205f [file] [log] [blame]
Alexander Hansen4e1142d2025-07-25 17:07:27 +02001// SPDX-License-Identifier: Apache-2.0
2// SPDX-FileCopyrightText: Copyright 2024 Hewlett Packard Enterprise
Chris Sides2ab73412024-10-15 16:04:11 -05003
4#pragma once
5
6#include <sdbusplus/async.hpp>
7#include <xyz/openbmc_project/Inventory/Decorator/Asset/aserver.hpp>
8
9class 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};