blob: 796ed4c5b9c8c39730062709e8a448c15cc401d7 [file] [log] [blame]
Zhikui Ren18a5ab92020-09-01 21:35:20 -07001/*
2// Copyright (c) 2020 intel Corporation
3//
4// Licensed under the Apache License, Version 2.0 (the "License");
5// you may not use this file except in compliance with the License.
6// You may obtain a copy of the License at
7//
8// http://www.apache.org/licenses/LICENSE-2.0
9//
10// Unless required by applicable law or agreed to in writing, software
11// distributed under the License is distributed on an "AS IS" BASIS,
12// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13// See the License for the specific language governing permissions and
14// limitations under the License.
15*/
16
17#pragma once
18
19#include <sdbusplus/asio/object_server.hpp>
20#include <xyz/openbmc_project/Inventory/Decorator/Asset/server.hpp>
21
22namespace phosphor
23{
24namespace cpu_info
25{
26static constexpr char const* cpuInfoObject = "xyz.openbmc_project.CPUInfo";
27static constexpr char const* cpuInfoPath = "/xyz/openbmc_project/CPUInfo";
28static constexpr char const* cpuInfoInterface = "xyz.openbmc_project.CPUInfo";
29
30static constexpr const int peciCheckInterval = 10;
31
32/** \ todo add cpu interface to CPUInfo and consolidate with smbios service
33 * using processor =
34 sdbusplus::xyz::openbmc_project::Inventory::Item::server::Cpu;
35*/
36using asset =
37 sdbusplus::xyz::openbmc_project::Inventory::Decorator::server::Asset;
38
39struct CPUInfo : sdbusplus::server::object_t<asset>
40{
41 public:
42 CPUInfo() = delete;
43 CPUInfo(const CPUInfo&) = delete;
44 CPUInfo& operator=(const CPUInfo&) = delete;
45 CPUInfo(CPUInfo&&) = delete;
46 CPUInfo& operator=(CPUInfo&&) = delete;
47 ~CPUInfo() = default;
48
49 CPUInfo(sdbusplus::bus::bus& bus, const std::string& path) :
50 sdbusplus::server::object_t<asset>(bus, path.c_str())
51 {}
52
53 private:
54};
55
56} // namespace cpu_info
57} // namespace phosphor