summaryrefslogtreecommitdiffstats
path: root/frup.hpp
diff options
context:
space:
mode:
authorRatan Gupta <ratagupt@in.ibm.com>2018-02-04 23:24:44 +0530
committerRatan Gupta <ratagupt@in.ibm.com>2018-02-04 23:29:19 +0530
commitc19c054c01b7a42c24cdf38a270b33f56290abf3 (patch)
treefacd1c74c94462dac182ba1552a17c5ac13c741c /frup.hpp
parent9606ba3efe9d61458ad2ede6f0639856d580ef7e (diff)
downloadipmi-fru-parser-c19c054c01b7a42c24cdf38a270b33f56290abf3.tar.gz
ipmi-fru-parser-c19c054c01b7a42c24cdf38a270b33f56290abf3.zip
Inventory:- Make changes in the mako and the C++ structure
This change lies in the Write Fru Data command processing. As fru yaml would be having extra properties like entityID,entityInstance,So changes were needed to make the change in the corresponding c++ structure. Change-Id: If23bb12563cdef34438746e2d6a8be7f54b7486d Signed-off-by: Ratan Gupta <ratagupt@in.ibm.com>
Diffstat (limited to 'frup.hpp')
-rw-r--r--frup.hpp17
1 files changed, 13 insertions, 4 deletions
diff --git a/frup.hpp b/frup.hpp
index 15b5eaf..3f68acd 100644
--- a/frup.hpp
+++ b/frup.hpp
@@ -84,16 +84,25 @@ struct IPMIFruData
};
using DbusProperty = std::string;
-using DbusPropertyVec = std::vector<std::pair<DbusProperty,IPMIFruData>>;
+using DbusPropertyVec = std::vector<std::pair<DbusProperty, IPMIFruData>>;
using DbusInterface = std::string;
-using DbusInterfaceVec = std::vector<std::pair<DbusInterface,DbusPropertyVec>>;
+using DbusInterfaceVec = std::vector<std::pair<DbusInterface, DbusPropertyVec>>;
using FruInstancePath = std::string;
-using FruInstanceVec = std::vector<std::pair<FruInstancePath,DbusInterfaceVec>>;
+
+struct FruInstance
+{
+ uint8_t entityID;
+ uint8_t entityInstance;
+ FruInstancePath path;
+ DbusInterfaceVec interfaces;
+};
+
+using FruInstanceVec = std::vector<FruInstance>;
using FruId = uint32_t;
-using FruMap = std::map<FruId,FruInstanceVec>;
+using FruMap = std::map<FruId, FruInstanceVec>;
/* Parse an IPMI write fru data message into a dictionary containing name value pair of VPD entries.*/
int parse_fru (const void* msgbuf, sd_bus_message* vpdtbl);
OpenPOWER on IntegriCloud