Patrick Venture | 46470a3 | 2018-09-07 19:26:25 -0700 | [diff] [blame] | 1 | #pragma once |
Tom Joseph | be5eaa1 | 2017-07-12 19:54:44 +0530 | [diff] [blame] | 2 | |
Patrick Venture | 0b02be9 | 2018-08-31 11:55:55 -0700 | [diff] [blame] | 3 | #include "nlohmann/json.hpp" |
| 4 | |
Patrick Venture | 0b02be9 | 2018-08-31 11:55:55 -0700 | [diff] [blame] | 5 | #include <sdbusplus/bus.hpp> |
Patrick Williams | fbc6c9d | 2023-05-10 07:50:16 -0500 | [diff] [blame] | 6 | |
| 7 | #include <map> |
Tom Joseph | be5eaa1 | 2017-07-12 19:54:44 +0530 | [diff] [blame] | 8 | #include <string> |
| 9 | #include <vector> |
| 10 | |
Tom Joseph | be5eaa1 | 2017-07-12 19:54:44 +0530 | [diff] [blame] | 11 | namespace dcmi |
| 12 | { |
| 13 | |
| 14 | static constexpr auto propIntf = "org.freedesktop.DBus.Properties"; |
| 15 | static constexpr auto assetTagIntf = |
Patrick Venture | 0b02be9 | 2018-08-31 11:55:55 -0700 | [diff] [blame] | 16 | "xyz.openbmc_project.Inventory.Decorator.AssetTag"; |
Tom Joseph | be5eaa1 | 2017-07-12 19:54:44 +0530 | [diff] [blame] | 17 | static constexpr auto assetTagProp = "AssetTag"; |
Vladislav Vovchenko | 8f7a6f6 | 2017-08-17 00:31:14 +0300 | [diff] [blame] | 18 | static constexpr auto networkServiceName = "xyz.openbmc_project.Network"; |
Patrick Venture | 0b02be9 | 2018-08-31 11:55:55 -0700 | [diff] [blame] | 19 | static constexpr auto networkConfigObj = "/xyz/openbmc_project/network/config"; |
Vladislav Vovchenko | 8f7a6f6 | 2017-08-17 00:31:14 +0300 | [diff] [blame] | 20 | static constexpr auto networkConfigIntf = |
Patrick Venture | 0b02be9 | 2018-08-31 11:55:55 -0700 | [diff] [blame] | 21 | "xyz.openbmc_project.Network.SystemConfiguration"; |
Vladislav Vovchenko | 8f7a6f6 | 2017-08-17 00:31:14 +0300 | [diff] [blame] | 22 | static constexpr auto hostNameProp = "HostName"; |
Deepak Kodihalli | ee717d7 | 2018-01-24 04:53:09 -0600 | [diff] [blame] | 23 | static constexpr auto temperatureSensorType = 0x01; |
Vernon Mauery | cce9ffd | 2023-07-27 14:15:17 -0700 | [diff] [blame] | 24 | static constexpr size_t maxInstances = 255; |
| 25 | static constexpr uint8_t maxRecords = 8; |
Kirill Pakhomov | a257362 | 2018-11-02 19:00:18 +0300 | [diff] [blame] | 26 | static constexpr auto gDCMISensorsConfig = |
Deepak Kodihalli | 0b45955 | 2018-02-06 06:25:12 -0600 | [diff] [blame] | 27 | "/usr/share/ipmi-providers/dcmi_sensors.json"; |
Nagaraju Goruganti | 22be97b | 2018-02-07 01:19:59 -0600 | [diff] [blame] | 28 | static constexpr auto ethernetIntf = |
Patrick Venture | 0b02be9 | 2018-08-31 11:55:55 -0700 | [diff] [blame] | 29 | "xyz.openbmc_project.Network.EthernetInterface"; |
Nagaraju Goruganti | 22be97b | 2018-02-07 01:19:59 -0600 | [diff] [blame] | 30 | static constexpr auto ethernetDefaultChannelNum = 0x1; |
| 31 | static constexpr auto networkRoot = "/xyz/openbmc_project/network"; |
Nagaraju Goruganti | 22be97b | 2018-02-07 01:19:59 -0600 | [diff] [blame] | 32 | static constexpr auto dhcpIntf = |
Patrick Venture | 0b02be9 | 2018-08-31 11:55:55 -0700 | [diff] [blame] | 33 | "xyz.openbmc_project.Network.DHCPConfiguration"; |
Nagaraju Goruganti | 22be97b | 2018-02-07 01:19:59 -0600 | [diff] [blame] | 34 | static constexpr auto systemBusName = "org.freedesktop.systemd1"; |
| 35 | static constexpr auto systemPath = "/org/freedesktop/systemd1"; |
| 36 | static constexpr auto systemIntf = "org.freedesktop.systemd1.Manager"; |
Kirill Pakhomov | a257362 | 2018-11-02 19:00:18 +0300 | [diff] [blame] | 37 | static constexpr auto gDCMICapabilitiesConfig = |
| 38 | "/usr/share/ipmi-providers/dcmi_cap.json"; |
Kirill Pakhomov | 2c2af2c | 2018-11-06 16:06:10 +0300 | [diff] [blame] | 39 | static constexpr auto gDCMIPowerMgmtCapability = "PowerManagement"; |
| 40 | static constexpr auto gDCMIPowerMgmtSupported = 0x1; |
Kirill Pakhomov | db5d9b0 | 2018-11-06 19:17:51 +0300 | [diff] [blame] | 41 | static constexpr auto gMaxSELEntriesMask = 0xFFF; |
| 42 | static constexpr auto gByteBitSize = 8; |
Tom Joseph | be5eaa1 | 2017-07-12 19:54:44 +0530 | [diff] [blame] | 43 | |
Kirill Pakhomov | 2c2af2c | 2018-11-06 16:06:10 +0300 | [diff] [blame] | 44 | /** @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 | */ |
| 49 | bool isDCMIPowerMgmtSupported(); |
| 50 | |
Tom Joseph | be5eaa1 | 2017-07-12 19:54:44 +0530 | [diff] [blame] | 51 | } // namespace dcmi |