blob: 09217af1618ba93f41f1eda08ce45eb4b051e2d8 [file] [log] [blame]
Deepak Kodihalli35c7fb12016-11-21 04:32:44 -06001#pragma once
2
3#include <climits>
Deepak Kodihalli76794492017-02-16 23:48:18 -06004#include <map>
5#include <sdbusplus/server.hpp>
Patrick Venturec83c4dc2018-11-01 16:29:18 -07006#include <string>
SunnySrivastava1984de3c60d2020-02-03 10:34:33 -06007#include <unordered_map>
Patrick Venturec83c4dc2018-11-01 16:29:18 -07008#include <vector>
Deepak Kodihalli35c7fb12016-11-21 04:32:44 -06009
10namespace openpower
11{
12namespace vpd
13{
14
15/** @brief The OpenPOWER VPD, in binary, is specified as a
16 * sequence of characters */
17static_assert((8 == CHAR_BIT), "A byte is not 8 bits!");
18using Byte = uint8_t;
19using Binary = std::vector<Byte>;
20
Deepak Kodihalli76794492017-02-16 23:48:18 -060021namespace inventory
22{
23
24using Path = std::string;
25using Property = std::string;
Patrick Williamsbd070082020-06-02 14:34:03 -050026using Value = std::variant<bool, int64_t, std::string, Binary>;
Deepak Kodihalli76794492017-02-16 23:48:18 -060027using PropertyMap = std::map<Property, Value>;
28
29using Interface = std::string;
30using InterfaceMap = std::map<Interface, PropertyMap>;
31
32using Object = sdbusplus::message::object_path;
33using ObjectMap = std::map<Object, InterfaceMap>;
34
SunnySrivastava1984de3c60d2020-02-03 10:34:33 -060035using VPDfilepath = std::string;
36using FrusMap = std::unordered_map<Path, VPDfilepath>;
37
Deepak Kodihalli76794492017-02-16 23:48:18 -060038using namespace std::string_literals;
Deepak Kodihalli193b2282017-06-07 08:34:30 -050039constexpr auto pimPath = "/xyz/openbmc_project/inventory";
40constexpr auto pimIntf = "xyz.openbmc_project.Inventory.Manager";
Deepak Kodihalli76794492017-02-16 23:48:18 -060041
42} // namespace inventory
43
Deepak Kodihalli35c7fb12016-11-21 04:32:44 -060044} // namespace vpd
45} // namespace openpower