summaryrefslogtreecommitdiffstats
path: root/ipmi_fru_info_area.hpp
diff options
context:
space:
mode:
authorMarri Devender Rao <devenrao@in.ibm.com>2017-07-01 16:11:40 -0500
committerPatrick Williams <patrick@stwcx.xyz>2017-07-25 21:03:36 +0000
commit7d9157ed0c91d2f6e76ff08e7a1c8db88bcca8c5 (patch)
tree0e267f6503f957101b62140e623d95ab849d29b9 /ipmi_fru_info_area.hpp
parent448e74e811d94a70793df9f036ec4d9a1bdb1501 (diff)
downloadphosphor-host-ipmid-7d9157ed0c91d2f6e76ff08e7a1c8db88bcca8c5.tar.gz
phosphor-host-ipmid-7d9157ed0c91d2f6e76ff08e7a1c8db88bcca8c5.zip
construct IPMI FRU Info data based on inventory data
Change-Id: If8ee75b48323d29b568ef807d381a3e5600527d5 Signed-off-by: Marri Devender Rao <devenrao@in.ibm.com>
Diffstat (limited to 'ipmi_fru_info_area.hpp')
-rw-r--r--ipmi_fru_info_area.hpp27
1 files changed, 27 insertions, 0 deletions
diff --git a/ipmi_fru_info_area.hpp b/ipmi_fru_info_area.hpp
new file mode 100644
index 0000000..61c4e81
--- /dev/null
+++ b/ipmi_fru_info_area.hpp
@@ -0,0 +1,27 @@
+#pragma once
+#include <string>
+#include <vector>
+
+namespace ipmi
+{
+namespace fru
+{
+using FruAreaData = std::vector<uint8_t>;
+using Section = std::string;
+using Value = std::string;
+using Property = std::string;
+using PropertyMap = std::map<Property, Value>;
+using FruInventoryData = std::map<Section, PropertyMap>;
+
+/**
+ * @brief Builds Fru area data from inventory data
+ *
+ * @param[in] invData FRU properties values read from inventory
+ *
+ * @return FruAreaData FRU area data as per IPMI specification
+ */
+FruAreaData buildFruAreaData(const FruInventoryData& inventory);
+
+} //fru
+} //ipmi
+
OpenPOWER on IntegriCloud