-
Notifications
You must be signed in to change notification settings - Fork 10
/
read_fru_data.hpp
38 lines (32 loc) · 1010 Bytes
/
read_fru_data.hpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#pragma once
#include "ipmi_fru_info_area.hpp"
#include <sdbusplus/bus.hpp>
#include <string>
namespace ipmi
{
namespace fru
{
using FRUId = uint8_t;
using FRUAreaMap = std::map<FRUId, FruAreaData>;
static constexpr auto xyzPrefix = "/xyz/openbmc_project/";
static constexpr auto invMgrInterface = "xyz.openbmc_project.Inventory.Manager";
static constexpr auto invObjPath = "/xyz/openbmc_project/inventory";
static constexpr auto propInterface = "org.freedesktop.DBus.Properties";
static constexpr auto invItemInterface = "xyz.openbmc_project.Inventory.Item";
static constexpr auto itemPresentProp = "Present";
/**
* @brief Get fru area data as per IPMI specification
*
* @param[in] fruNum FRU ID
*
* @return FRU area data as per IPMI specification
*/
const FruAreaData& getFruAreaData(const FRUId& fruNum);
/**
* @brief Register callback handler into DBUS for PropertyChange events
*
* @return negative value on failure
*/
int registerCallbackHandler();
} // namespace fru
} // namespace ipmi