blob: 32017552568339e26ed132069b6a6daa8694a7f7 [file] [log] [blame]
Sunny Srivastavafa5e4d32023-03-12 11:59:49 -05001#pragma once
2
3#include <cstdint>
Rekha Aparna9f255f52025-04-23 05:25:07 -05004#include <string>
5#include <vector>
Sunny Srivastavafa5e4d32023-03-12 11:59:49 -05006
7namespace vpd
8{
9namespace constants
10{
11static constexpr auto KEYWORD_SIZE = 2;
12static constexpr auto RECORD_SIZE = 4;
13static constexpr auto INDENTATION = 4;
14static constexpr auto SUCCESS = 0;
15static constexpr auto FAILURE = -1;
16
17// To be explicitly used for string comparison.
18static constexpr auto STR_CMP_SUCCESS = 0;
19
20constexpr auto inventoryManagerService =
21 "xyz.openbmc_project.Inventory.Manager";
22constexpr auto baseInventoryPath = "/xyz/openbmc_project/inventory";
Anupama B R844f88f2025-01-26 02:47:06 -060023constexpr auto pimPersistPath = "/var/lib/phosphor-inventory-manager";
Sunny Srivastavafa5e4d32023-03-12 11:59:49 -050024constexpr auto ipzVpdInfPrefix = "com.ibm.ipzvpd.";
25
26constexpr auto vpdManagerService = "com.ibm.VPD.Manager";
27constexpr auto vpdManagerObjectPath = "/com/ibm/VPD/Manager";
28constexpr auto vpdManagerInfName = "com.ibm.VPD.Manager";
29constexpr auto inventoryItemInf = "xyz.openbmc_project.Inventory.Item";
Sunny Srivastavadf9e5542025-02-12 12:33:07 -060030constexpr auto viniInf = "com.ibm.ipzvpd.VINI";
Sunny Srivastavafa5e4d32023-03-12 11:59:49 -050031constexpr auto locationCodeInf = "com.ibm.ipzvpd.Location";
32constexpr auto assetInf = "xyz.openbmc_project.Inventory.Decorator.Asset";
33constexpr auto objectMapperService = "xyz.openbmc_project.ObjectMapper";
34constexpr auto objectMapperObjectPath = "/xyz/openbmc_project/object_mapper";
35constexpr auto objectMapperInfName = "xyz.openbmc_project.ObjectMapper";
Anupama B R6be2c012025-01-23 02:59:27 -060036constexpr auto chassisStateManagerService = "xyz.openbmc_project.State.Chassis";
37constexpr auto chassisStateManagerObjectPath =
38 "/xyz/openbmc_project/state/chassis0";
39constexpr auto chassisStateManagerInfName = "xyz.openbmc_project.State.Chassis";
Souvik Roy7f749a62025-02-10 22:23:41 -060040constexpr auto dbusService = "org.freedesktop.DBus";
41constexpr auto dbusObjectPath = "/org/freedesktop/DBus";
42constexpr auto dbusInterface = "org.freedesktop.DBus";
43constexpr auto biosConfigMgrService = "xyz.openbmc_project.BIOSConfigManager";
Sunny Srivastavadf9e5542025-02-12 12:33:07 -060044constexpr auto networkInf =
45 "xyz.openbmc_project.Inventory.Item.NetworkInterface";
46constexpr auto pcieSlotInf = "xyz.openbmc_project.Inventory.Item.PCIeSlot";
47constexpr auto slotNumInf = "xyz.openbmc_project.Inventory.Decorator.Slot";
48constexpr auto i2cDeviceInf =
49 "xyz.openbmc_project.Inventory.Decorator.I2CDevice";
Anupama B R844f88f2025-01-26 02:47:06 -060050constexpr auto vpdManagerProcessName = "vpd-manager";
Souvik Roy36dba302025-01-23 03:38:04 -060051constexpr auto biosConfigMgrObjPath =
52 "/xyz/openbmc_project/bios_config/manager";
53constexpr auto biosConfigMgrInterface =
54 "xyz.openbmc_project.BIOSConfig.Manager";
55
Rekha Aparna9f255f52025-04-23 05:25:07 -050056constexpr auto KwdIM = "IM";
57
58// Valid IM values list.
59static std::vector<std::string> validImValues{
60 "0x50001000", "0x50001001", "0x50001002", "0x50003000", "0x50004000",
61 "0x60001000", "0x60001001", "0x60001002", "0x60002000", "0x60004000"};
62
Souvik Roy36dba302025-01-23 03:38:04 -060063static constexpr auto VALUE_0 = 0;
64static constexpr auto VALUE_1 = 1;
65static constexpr auto VALUE_2 = 2;
66static constexpr auto VALUE_3 = 3;
67static constexpr auto VALUE_4 = 4;
68static constexpr auto VALUE_5 = 5;
69static constexpr auto VALUE_6 = 6;
70static constexpr auto VALUE_7 = 7;
71static constexpr auto VALUE_8 = 8;
72static constexpr auto VALUE_32 = 32;
Sunny Srivastavafa5e4d32023-03-12 11:59:49 -050073} // namespace constants
74} // namespace vpd