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 dhcpObj = "/xyz/openbmc_project/network/dhcp"; 33 static constexpr auto dhcpIntf = 34 "xyz.openbmc_project.Network.DHCPConfiguration"; 35 static constexpr auto systemBusName = "org.freedesktop.systemd1"; 36 static constexpr auto systemPath = "/org/freedesktop/systemd1"; 37 static constexpr auto systemIntf = "org.freedesktop.systemd1.Manager"; 38 static constexpr auto gDCMICapabilitiesConfig = 39 "/usr/share/ipmi-providers/dcmi_cap.json"; 40 static constexpr auto gDCMIPowerMgmtCapability = "PowerManagement"; 41 static constexpr auto gDCMIPowerMgmtSupported = 0x1; 42 static constexpr auto gMaxSELEntriesMask = 0xFFF; 43 static constexpr auto gByteBitSize = 8; 44 45 /** @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 */ 50 bool isDCMIPowerMgmtSupported(); 51 52 } // namespace dcmi 53