blob: 4a18e9fd4fff5c2621eddf6f36208852e74d86a2 [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";
Anupama B R4ed13db2025-11-10 00:54:35 -060031constexpr auto xyzLocationCodeInf =
32 "xyz.openbmc_project.Inventory.Decorator.LocationCode";
Sunny Srivastavafa5e4d32023-03-12 11:59:49 -050033constexpr auto assetInf = "xyz.openbmc_project.Inventory.Decorator.Asset";
34constexpr auto objectMapperService = "xyz.openbmc_project.ObjectMapper";
35constexpr auto objectMapperObjectPath = "/xyz/openbmc_project/object_mapper";
36constexpr auto objectMapperInfName = "xyz.openbmc_project.ObjectMapper";
Anupama B R6be2c012025-01-23 02:59:27 -060037constexpr auto chassisStateManagerService = "xyz.openbmc_project.State.Chassis";
38constexpr auto chassisStateManagerObjectPath =
39 "/xyz/openbmc_project/state/chassis0";
40constexpr auto chassisStateManagerInfName = "xyz.openbmc_project.State.Chassis";
Souvik Roy7f749a62025-02-10 22:23:41 -060041constexpr auto dbusService = "org.freedesktop.DBus";
42constexpr auto dbusObjectPath = "/org/freedesktop/DBus";
43constexpr auto dbusInterface = "org.freedesktop.DBus";
44constexpr auto biosConfigMgrService = "xyz.openbmc_project.BIOSConfigManager";
Sunny Srivastavadf9e5542025-02-12 12:33:07 -060045constexpr auto networkInf =
46 "xyz.openbmc_project.Inventory.Item.NetworkInterface";
47constexpr auto pcieSlotInf = "xyz.openbmc_project.Inventory.Item.PCIeSlot";
48constexpr auto slotNumInf = "xyz.openbmc_project.Inventory.Decorator.Slot";
49constexpr auto i2cDeviceInf =
50 "xyz.openbmc_project.Inventory.Decorator.I2CDevice";
Anupama B R844f88f2025-01-26 02:47:06 -060051constexpr auto vpdManagerProcessName = "vpd-manager";
Souvik Roy36dba302025-01-23 03:38:04 -060052constexpr auto biosConfigMgrObjPath =
53 "/xyz/openbmc_project/bios_config/manager";
54constexpr auto biosConfigMgrInterface =
55 "xyz.openbmc_project.BIOSConfig.Manager";
Anupama B R18b840b2025-09-29 09:29:22 -050056constexpr auto waitVpdParserProcessName = "wait-vpd-parsers";
Souvik Roy36dba302025-01-23 03:38:04 -060057
Rekha Aparna9f255f52025-04-23 05:25:07 -050058constexpr auto KwdIM = "IM";
Souvik Roy963e8422025-05-05 02:18:22 -050059constexpr auto badVpdPath = "/var/lib/vpd/dumps";
Rekha Aparna9f255f52025-04-23 05:25:07 -050060
61// Valid IM values list.
62static std::vector<std::string> validImValues{
63 "0x50001000", "0x50001001", "0x50001002", "0x50003000", "0x50004000",
64 "0x60001000", "0x60001001", "0x60001002", "0x60002000", "0x60004000"};
65
Souvik Roy36dba302025-01-23 03:38:04 -060066static constexpr auto VALUE_0 = 0;
67static constexpr auto VALUE_1 = 1;
68static constexpr auto VALUE_2 = 2;
69static constexpr auto VALUE_3 = 3;
70static constexpr auto VALUE_4 = 4;
71static constexpr auto VALUE_5 = 5;
72static constexpr auto VALUE_6 = 6;
73static constexpr auto VALUE_7 = 7;
74static constexpr auto VALUE_8 = 8;
75static constexpr auto VALUE_32 = 32;
Sunny Srivastavafa5e4d32023-03-12 11:59:49 -050076} // namespace constants
77} // namespace vpd