xref: /openbmc/phosphor-host-ipmid/dcmihandler.hpp (revision cfd7fa83d3b5ab7d85eecc4b461df70cccf5ff45)
146470a38SPatrick Venture #pragma once
2be5eaa10STom Joseph 
30b02be92SPatrick Venture #include "nlohmann/json.hpp"
40b02be92SPatrick Venture 
50b02be92SPatrick Venture #include <sdbusplus/bus.hpp>
6fbc6c9d7SPatrick Williams 
7fbc6c9d7SPatrick Williams #include <map>
8be5eaa10STom Joseph #include <string>
9be5eaa10STom Joseph #include <vector>
10be5eaa10STom Joseph 
11be5eaa10STom Joseph namespace dcmi
12be5eaa10STom Joseph {
13be5eaa10STom Joseph 
14be5eaa10STom Joseph static constexpr auto propIntf = "org.freedesktop.DBus.Properties";
15be5eaa10STom Joseph static constexpr auto assetTagIntf =
16be5eaa10STom Joseph     "xyz.openbmc_project.Inventory.Decorator.AssetTag";
17be5eaa10STom Joseph static constexpr auto assetTagProp = "AssetTag";
188f7a6f68SVladislav Vovchenko static constexpr auto networkServiceName = "xyz.openbmc_project.Network";
190b02be92SPatrick Venture static constexpr auto networkConfigObj = "/xyz/openbmc_project/network/config";
208f7a6f68SVladislav Vovchenko static constexpr auto networkConfigIntf =
218f7a6f68SVladislav Vovchenko     "xyz.openbmc_project.Network.SystemConfiguration";
228f7a6f68SVladislav Vovchenko static constexpr auto hostNameProp = "HostName";
23ee717d71SDeepak Kodihalli static constexpr auto temperatureSensorType = 0x01;
24*cce9ffd9SVernon Mauery static constexpr size_t maxInstances = 255;
25*cce9ffd9SVernon Mauery static constexpr uint8_t maxRecords = 8;
26a2573622SKirill Pakhomov static constexpr auto gDCMISensorsConfig =
270b45955fSDeepak Kodihalli     "/usr/share/ipmi-providers/dcmi_sensors.json";
2822be97b3SNagaraju Goruganti static constexpr auto ethernetIntf =
2922be97b3SNagaraju Goruganti     "xyz.openbmc_project.Network.EthernetInterface";
3022be97b3SNagaraju Goruganti static constexpr auto ethernetDefaultChannelNum = 0x1;
3122be97b3SNagaraju Goruganti static constexpr auto networkRoot = "/xyz/openbmc_project/network";
3222be97b3SNagaraju Goruganti static constexpr auto dhcpIntf =
3322be97b3SNagaraju Goruganti     "xyz.openbmc_project.Network.DHCPConfiguration";
3422be97b3SNagaraju Goruganti static constexpr auto systemBusName = "org.freedesktop.systemd1";
3522be97b3SNagaraju Goruganti static constexpr auto systemPath = "/org/freedesktop/systemd1";
3622be97b3SNagaraju Goruganti static constexpr auto systemIntf = "org.freedesktop.systemd1.Manager";
37a2573622SKirill Pakhomov static constexpr auto gDCMICapabilitiesConfig =
38a2573622SKirill Pakhomov     "/usr/share/ipmi-providers/dcmi_cap.json";
392c2af2caSKirill Pakhomov static constexpr auto gDCMIPowerMgmtCapability = "PowerManagement";
402c2af2caSKirill Pakhomov static constexpr auto gDCMIPowerMgmtSupported = 0x1;
41db5d9b04SKirill Pakhomov static constexpr auto gMaxSELEntriesMask = 0xFFF;
42db5d9b04SKirill Pakhomov static constexpr auto gByteBitSize = 8;
43be5eaa10STom Joseph 
442c2af2caSKirill Pakhomov /** @brief Check whether DCMI power management is supported
452c2af2caSKirill Pakhomov  *         in the DCMI Capabilities config file.
462c2af2caSKirill Pakhomov  *
472c2af2caSKirill Pakhomov  *  @return True if DCMI power management is supported
482c2af2caSKirill Pakhomov  */
492c2af2caSKirill Pakhomov bool isDCMIPowerMgmtSupported();
502c2af2caSKirill Pakhomov 
51be5eaa10STom Joseph } // namespace dcmi
52