blob: 1f9dad9a81b8af0822041c5f24be2095916ceedd [file] [log] [blame]
Patrick Venture46470a32018-09-07 19:26:25 -07001#pragma once
Tom Josephbe5eaa12017-07-12 19:54:44 +05302
Patrick Venture0b02be92018-08-31 11:55:55 -07003#include "nlohmann/json.hpp"
4
Patrick Venture0b02be92018-08-31 11:55:55 -07005#include <sdbusplus/bus.hpp>
Patrick Williamsfbc6c9d2023-05-10 07:50:16 -05006
7#include <map>
Tom Josephbe5eaa12017-07-12 19:54:44 +05308#include <string>
9#include <vector>
10
Tom Josephbe5eaa12017-07-12 19:54:44 +053011namespace dcmi
12{
13
14static constexpr auto propIntf = "org.freedesktop.DBus.Properties";
15static constexpr auto assetTagIntf =
Patrick Venture0b02be92018-08-31 11:55:55 -070016 "xyz.openbmc_project.Inventory.Decorator.AssetTag";
Tom Josephbe5eaa12017-07-12 19:54:44 +053017static constexpr auto assetTagProp = "AssetTag";
Vladislav Vovchenko8f7a6f62017-08-17 00:31:14 +030018static constexpr auto networkServiceName = "xyz.openbmc_project.Network";
Patrick Venture0b02be92018-08-31 11:55:55 -070019static constexpr auto networkConfigObj = "/xyz/openbmc_project/network/config";
Vladislav Vovchenko8f7a6f62017-08-17 00:31:14 +030020static constexpr auto networkConfigIntf =
Patrick Venture0b02be92018-08-31 11:55:55 -070021 "xyz.openbmc_project.Network.SystemConfiguration";
Vladislav Vovchenko8f7a6f62017-08-17 00:31:14 +030022static constexpr auto hostNameProp = "HostName";
Deepak Kodihalliee717d72018-01-24 04:53:09 -060023static constexpr auto temperatureSensorType = 0x01;
Vernon Mauerycce9ffd2023-07-27 14:15:17 -070024static constexpr size_t maxInstances = 255;
25static constexpr uint8_t maxRecords = 8;
Kirill Pakhomova2573622018-11-02 19:00:18 +030026static constexpr auto gDCMISensorsConfig =
Deepak Kodihalli0b459552018-02-06 06:25:12 -060027 "/usr/share/ipmi-providers/dcmi_sensors.json";
Nagaraju Goruganti22be97b2018-02-07 01:19:59 -060028static constexpr auto ethernetIntf =
Patrick Venture0b02be92018-08-31 11:55:55 -070029 "xyz.openbmc_project.Network.EthernetInterface";
Nagaraju Goruganti22be97b2018-02-07 01:19:59 -060030static constexpr auto ethernetDefaultChannelNum = 0x1;
31static constexpr auto networkRoot = "/xyz/openbmc_project/network";
Jian Zhang958806d2022-12-13 13:37:09 +080032static constexpr auto dhcpObj = "/xyz/openbmc_project/network/dhcp";
Nagaraju Goruganti22be97b2018-02-07 01:19:59 -060033static constexpr auto dhcpIntf =
Patrick Venture0b02be92018-08-31 11:55:55 -070034 "xyz.openbmc_project.Network.DHCPConfiguration";
Nagaraju Goruganti22be97b2018-02-07 01:19:59 -060035static constexpr auto systemBusName = "org.freedesktop.systemd1";
36static constexpr auto systemPath = "/org/freedesktop/systemd1";
37static constexpr auto systemIntf = "org.freedesktop.systemd1.Manager";
Kirill Pakhomova2573622018-11-02 19:00:18 +030038static constexpr auto gDCMICapabilitiesConfig =
39 "/usr/share/ipmi-providers/dcmi_cap.json";
Kirill Pakhomov2c2af2c2018-11-06 16:06:10 +030040static constexpr auto gDCMIPowerMgmtCapability = "PowerManagement";
41static constexpr auto gDCMIPowerMgmtSupported = 0x1;
Kirill Pakhomovdb5d9b02018-11-06 19:17:51 +030042static constexpr auto gMaxSELEntriesMask = 0xFFF;
43static constexpr auto gByteBitSize = 8;
Tom Josephbe5eaa12017-07-12 19:54:44 +053044
Kirill Pakhomov2c2af2c2018-11-06 16:06:10 +030045/** @brief Check whether DCMI power management is supported
46 * in the DCMI Capabilities config file.
47 *
48 * @return True if DCMI power management is supported
49 */
50bool isDCMIPowerMgmtSupported();
51
Tom Josephbe5eaa12017-07-12 19:54:44 +053052} // namespace dcmi