xref: /openbmc/pldm/host-bmc/dbus/cpu_core.hpp (revision 7a78ced6)
1 #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 
10 namespace pldm
11 {
12 namespace dbus
13 {
14 using CoreIntf = sdbusplus::server::object_t<
15     sdbusplus::xyz::openbmc_project::Inventory::Item::server::CpuCore>;
16 
17 class 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&&) = delete;
25     CPUCore& operator=(CPUCore&&) = delete;
26 
CPUCore(sdbusplus::bus_t & bus,const std::string & objPath)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
40