blob: 8fa5e82de41971acaced4c9cb3d668012841ecc7 [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";
Nagaraju Goruganti22be97b2018-02-07 01:19:59 -060032static constexpr auto dhcpIntf =
Patrick Venture0b02be92018-08-31 11:55:55 -070033 "xyz.openbmc_project.Network.DHCPConfiguration";
Nagaraju Goruganti22be97b2018-02-07 01:19:59 -060034static constexpr auto systemBusName = "org.freedesktop.systemd1";
35static constexpr auto systemPath = "/org/freedesktop/systemd1";
36static constexpr auto systemIntf = "org.freedesktop.systemd1.Manager";
Kirill Pakhomova2573622018-11-02 19:00:18 +030037static constexpr auto gDCMICapabilitiesConfig =
38 "/usr/share/ipmi-providers/dcmi_cap.json";
Kirill Pakhomov2c2af2c2018-11-06 16:06:10 +030039static constexpr auto gDCMIPowerMgmtCapability = "PowerManagement";
40static constexpr auto gDCMIPowerMgmtSupported = 0x1;
Kirill Pakhomovdb5d9b02018-11-06 19:17:51 +030041static constexpr auto gMaxSELEntriesMask = 0xFFF;
42static constexpr auto gByteBitSize = 8;
Tom Josephbe5eaa12017-07-12 19:54:44 +053043
Kirill Pakhomov2c2af2c2018-11-06 16:06:10 +030044/** @brief Check whether DCMI power management is supported
45 * in the DCMI Capabilities config file.
46 *
47 * @return True if DCMI power management is supported
48 */
49bool isDCMIPowerMgmtSupported();
50
Tom Josephbe5eaa12017-07-12 19:54:44 +053051} // namespace dcmi