libpldmresponder: FRU: construct PDRs

Construct FRU record set and entity association PDRs for the FRUs for
which the BMC collects VPD (FRU information off of an EEPROM).

These PDRs are structured as per PLDM spec DSP0248 v1.2.0.

Signed-off-by: Deepak Kodihalli <dkodihal@in.ibm.com>
Change-Id: I2c72d74dad449561b26c74482e00d1606546c5a2
diff --git a/libpldmresponder/fru_parser.hpp b/libpldmresponder/fru_parser.hpp
index f49c04b..a11610a 100644
--- a/libpldmresponder/fru_parser.hpp
+++ b/libpldmresponder/fru_parser.hpp
@@ -2,6 +2,7 @@
 
 #include <filesystem>
 #include <map>
+#include <set>
 #include <string>
 #include <tuple>
 #include <vector>
@@ -18,9 +19,10 @@
 using Service = std::string;
 using RootPath = std::string;
 using Interface = std::string;
-using Interfaces = std::vector<Interface>;
+using Interfaces = std::set<Interface>;
 using Property = std::string;
 using PropertyType = std::string;
+using EntityType = uint8_t;
 
 } // namespace dbus
 
@@ -95,6 +97,11 @@
         return recordMap.at(intf);
     }
 
+    EntityType getEntityType(const Interface& intf) const
+    {
+        return intfToEntityType.at(intf);
+    }
+
   private:
     /** @brief Parse the FRU_Master.json file and populate the D-Bus lookup
      *         information which provides the service, root D-Bus path and the
@@ -114,6 +121,7 @@
 
     std::optional<DBusLookupInfo> lookupInfo;
     FruRecordMap recordMap;
+    std::map<Interface, EntityType> intfToEntityType;
 };
 
 } // namespace fru_parser