summaryrefslogtreecommitdiffstats
path: root/fruread.hpp
diff options
context:
space:
mode:
authorMarri Devender Rao <devenrao@in.ibm.com>2017-06-04 23:40:16 -0500
committerPatrick Williams <patrick@stwcx.xyz>2017-06-26 21:59:43 +0000
commita62bacc534234558f54bf96f368b2b9574f0def1 (patch)
treef7624723fa9c5406ee75daf4c941881043d014ae /fruread.hpp
parent8d44b5db8aabd2ed7acac84826931ad9ef68aa32 (diff)
downloadphosphor-host-ipmid-a62bacc534234558f54bf96f368b2b9574f0def1.tar.gz
phosphor-host-ipmid-a62bacc534234558f54bf96f368b2b9574f0def1.zip
generate map of phosphor-dbus fru properties
Reusing frup.hpp, example.yaml, fru-gen.py, writefru.mako.cpp from ipmi-fru-gen repository to generate map of frup properties. Generated map facilitates in reading data from the inventory. Change-Id: I6d6dbc55a340dd06b4639f8bded8cc09df815a59 Signed-off-by: Marri Devender Rao <devenrao@in.ibm.com>
Diffstat (limited to 'fruread.hpp')
-rw-r--r--fruread.hpp29
1 files changed, 29 insertions, 0 deletions
diff --git a/fruread.hpp b/fruread.hpp
new file mode 100644
index 0000000..203dfa0
--- /dev/null
+++ b/fruread.hpp
@@ -0,0 +1,29 @@
+#ifndef OPENBMC_IPMI_FRU_READ_H
+#define OPENBMC_IPMI_FRU_READ_H
+
+#include <systemd/sd-bus.h>
+#include <array>
+#include <string>
+#include <map>
+#include <vector>
+
+struct IPMIFruData
+{
+ std::string section;
+ std::string property;
+ std::string delimiter;
+};
+
+using DbusProperty = std::string;
+using DbusPropertyVec = std::vector<std::pair<DbusProperty, IPMIFruData>>;
+
+using DbusInterface = std::string;
+using DbusInterfaceVec = std::vector<std::pair<DbusInterface, DbusPropertyVec>>;
+
+using FruInstancePath = std::string;
+using FruInstanceVec = std::vector<std::pair<FruInstancePath, DbusInterfaceVec>>;
+
+using FruId = uint32_t;
+using FruMap = std::map<FruId, FruInstanceVec>;
+
+#endif
OpenPOWER on IntegriCloud