PLDM: Handling modified PDRs

This commit handles the PDRs which are modified.
This also prevents the looping of host PDRs when we get
the modified PDR in between the PDR exchange. With this
change we will fetch only the modified PDRs and not all
the PDRs again.

Change-Id: If674f23ce83f44853c74139c9d3c4e5aea05259a
Signed-off-by: Pavithra Barithaya <pavithra.b@ibm.com>
diff --git a/host-bmc/host_pdr_handler.hpp b/host-bmc/host_pdr_handler.hpp
index 694bcdd..6d33f5a 100644
--- a/host-bmc/host_pdr_handler.hpp
+++ b/host-bmc/host_pdr_handler.hpp
@@ -20,7 +20,6 @@
 
 namespace pldm
 {
-
 using EntityType = uint16_t;
 // vector which would hold the PDR record handle data returned by
 // pldmPDRRepositoryChgEvent event data
@@ -159,6 +158,11 @@
      */
     void setHostSensorState(const PDRList& stateSensorPDRs);
 
+    /** @brief whether we received PLDM_RECORDS_MODIFIED event data operation
+     *  from host
+     */
+    bool isHostPdrModified = false;
+
     /** @brief check whether Host is running when pldmd starts
      */
     bool isHostUp();
@@ -244,6 +248,10 @@
     /** @brief maps an entity type to parent pldm_entity from the BMC's entity
      *  association tree
      */
+
+    /** @brief list of PDR record handles modified pointing to host PDRs */
+    PDRRecordHandles modifiedPDRRecordHandles;
+
     std::map<EntityType, pldm_entity> parents;
     /** @brief D-Bus property changed signal match */
     std::unique_ptr<sdbusplus::bus::match_t> hostOffMatch;