1 #pragma once 2 3 #include <cstdint> 4 #include <string> 5 #include <vector> 6 7 namespace vpd 8 { 9 namespace constants 10 { 11 static constexpr auto KEYWORD_SIZE = 2; 12 static constexpr auto RECORD_SIZE = 4; 13 static constexpr auto INDENTATION = 4; 14 static constexpr auto SUCCESS = 0; 15 static constexpr auto FAILURE = -1; 16 17 // To be explicitly used for string comparison. 18 static constexpr auto STR_CMP_SUCCESS = 0; 19 20 constexpr auto inventoryManagerService = 21 "xyz.openbmc_project.Inventory.Manager"; 22 constexpr auto baseInventoryPath = "/xyz/openbmc_project/inventory"; 23 constexpr auto pimPersistPath = "/var/lib/phosphor-inventory-manager"; 24 constexpr auto ipzVpdInfPrefix = "com.ibm.ipzvpd."; 25 26 constexpr auto vpdManagerService = "com.ibm.VPD.Manager"; 27 constexpr auto vpdManagerObjectPath = "/com/ibm/VPD/Manager"; 28 constexpr auto vpdManagerInfName = "com.ibm.VPD.Manager"; 29 constexpr auto inventoryItemInf = "xyz.openbmc_project.Inventory.Item"; 30 constexpr auto viniInf = "com.ibm.ipzvpd.VINI"; 31 constexpr auto locationCodeInf = "com.ibm.ipzvpd.Location"; 32 constexpr auto assetInf = "xyz.openbmc_project.Inventory.Decorator.Asset"; 33 constexpr auto objectMapperService = "xyz.openbmc_project.ObjectMapper"; 34 constexpr auto objectMapperObjectPath = "/xyz/openbmc_project/object_mapper"; 35 constexpr auto objectMapperInfName = "xyz.openbmc_project.ObjectMapper"; 36 constexpr auto chassisStateManagerService = "xyz.openbmc_project.State.Chassis"; 37 constexpr auto chassisStateManagerObjectPath = 38 "/xyz/openbmc_project/state/chassis0"; 39 constexpr auto chassisStateManagerInfName = "xyz.openbmc_project.State.Chassis"; 40 constexpr auto dbusService = "org.freedesktop.DBus"; 41 constexpr auto dbusObjectPath = "/org/freedesktop/DBus"; 42 constexpr auto dbusInterface = "org.freedesktop.DBus"; 43 constexpr auto biosConfigMgrService = "xyz.openbmc_project.BIOSConfigManager"; 44 constexpr auto networkInf = 45 "xyz.openbmc_project.Inventory.Item.NetworkInterface"; 46 constexpr auto pcieSlotInf = "xyz.openbmc_project.Inventory.Item.PCIeSlot"; 47 constexpr auto slotNumInf = "xyz.openbmc_project.Inventory.Decorator.Slot"; 48 constexpr auto i2cDeviceInf = 49 "xyz.openbmc_project.Inventory.Decorator.I2CDevice"; 50 constexpr auto vpdManagerProcessName = "vpd-manager"; 51 constexpr auto biosConfigMgrObjPath = 52 "/xyz/openbmc_project/bios_config/manager"; 53 constexpr auto biosConfigMgrInterface = 54 "xyz.openbmc_project.BIOSConfig.Manager"; 55 56 constexpr auto KwdIM = "IM"; 57 constexpr auto badVpdPath = "/var/lib/vpd/dumps"; 58 59 // Valid IM values list. 60 static std::vector<std::string> validImValues{ 61 "0x50001000", "0x50001001", "0x50001002", "0x50003000", "0x50004000", 62 "0x60001000", "0x60001001", "0x60001002", "0x60002000", "0x60004000"}; 63 64 static constexpr auto VALUE_0 = 0; 65 static constexpr auto VALUE_1 = 1; 66 static constexpr auto VALUE_2 = 2; 67 static constexpr auto VALUE_3 = 3; 68 static constexpr auto VALUE_4 = 4; 69 static constexpr auto VALUE_5 = 5; 70 static constexpr auto VALUE_6 = 6; 71 static constexpr auto VALUE_7 = 7; 72 static constexpr auto VALUE_8 = 8; 73 static constexpr auto VALUE_32 = 32; 74 } // namespace constants 75 } // namespace vpd 76