1 #pragma once 2 3 #include "nlohmann/json.hpp" 4 5 #include <sdbusplus/bus.hpp> 6 7 #include <map> 8 #include <string> 9 #include <vector> 10 11 namespace dcmi 12 { 13 14 static constexpr auto propIntf = "org.freedesktop.DBus.Properties"; 15 static constexpr auto assetTagIntf = 16 "xyz.openbmc_project.Inventory.Decorator.AssetTag"; 17 static constexpr auto assetTagProp = "AssetTag"; 18 static constexpr auto networkServiceName = "xyz.openbmc_project.Network"; 19 static constexpr auto networkConfigObj = "/xyz/openbmc_project/network/config"; 20 static constexpr auto networkConfigIntf = 21 "xyz.openbmc_project.Network.SystemConfiguration"; 22 static constexpr auto hostNameProp = "HostName"; 23 static constexpr auto temperatureSensorType = 0x01; 24 static constexpr size_t maxInstances = 255; 25 static constexpr uint8_t maxRecords = 8; 26 static constexpr auto gDCMISensorsConfig = 27 "/usr/share/ipmi-providers/dcmi_sensors.json"; 28 static constexpr auto ethernetIntf = 29 "xyz.openbmc_project.Network.EthernetInterface"; 30 static constexpr auto ethernetDefaultChannelNum = 0x1; 31 static constexpr auto networkRoot = "/xyz/openbmc_project/network"; 32 static constexpr auto dhcpIntf = 33 "xyz.openbmc_project.Network.DHCPConfiguration"; 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"; 37 static constexpr auto gDCMICapabilitiesConfig = 38 "/usr/share/ipmi-providers/dcmi_cap.json"; 39 static constexpr auto gDCMIPowerMgmtCapability = "PowerManagement"; 40 static constexpr auto gDCMIPowerMgmtSupported = 0x1; 41 static constexpr auto gMaxSELEntriesMask = 0xFFF; 42 static constexpr auto gByteBitSize = 8; 43 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 51 } // namespace dcmi 52