blob: 3a5852947e20e922d39411e783dfc7f2666fd3c9 [file] [log] [blame]
Kamalkumar Patel56da5742024-05-23 04:53:07 -05001#pragma once
2
3#include <sdbusplus/bus.hpp>
4#include <sdbusplus/server.hpp>
5#include <sdbusplus/server/object.hpp>
6#include <xyz/openbmc_project/Inventory/Item/CpuCore/server.hpp>
7
8#include <string>
9
10namespace pldm
11{
12namespace dbus
13{
14using CoreIntf = sdbusplus::server::object_t<
15 sdbusplus::xyz::openbmc_project::Inventory::Item::server::CpuCore>;
16
17class CPUCore : public CoreIntf
18{
19 public:
20 CPUCore() = delete;
21 ~CPUCore() = default;
22 CPUCore(const CPUCore&) = delete;
23 CPUCore& operator=(const CPUCore&) = delete;
24 CPUCore(CPUCore&&) = default;
25 CPUCore& operator=(CPUCore&&) = default;
26
27 CPUCore(sdbusplus::bus_t& bus, const std::string& objPath) :
28 CoreIntf(bus, objPath.c_str())
29 {}
30
31 /** Get value of Microcode */
32 uint32_t microcode() const override;
33
34 /** Set value of Microcode */
35 uint32_t microcode(uint32_t value) override;
36};
37
38} // namespace dbus
39} // namespace pldm