Correction of VPD using ECC

ECC algorithm corrects VPD data in 32:1 bit ratio in the
event of corruption.
Main Test Cases:
1) Check correction of KW in records.
2) Check correction while writing and reading VPD.
3) Check for Module VPD correction.

Signed-off-by: Giridhari Krishna <giridharikrishnan@gmail.com>
Change-Id: I48a3db18df9d3a2aecde814610ab1b357e6f310d
diff --git a/ibm_vpd_app.cpp b/ibm_vpd_app.cpp
index 367f8d2..57109b6 100644
--- a/ibm_vpd_app.cpp
+++ b/ibm_vpd_app.cpp
@@ -1460,9 +1460,18 @@
 
         try
         {
+            uint32_t vpdStartOffset = 0;
+            for (const auto& item : js["frus"][file])
+            {
+                if (item.find("offset") != item.end())
+                {
+                    vpdStartOffset = item["offset"];
+                }
+            }
             vpdVector = getVpdDataInVector(js, file);
             ParserInterface* parser = ParserFactory::getParser(
-                vpdVector, (pimPath + baseFruInventoryPath));
+                vpdVector, (pimPath + baseFruInventoryPath), file,
+                vpdStartOffset);
             variant<KeywordVpdMap, Store> parseResult;
             parseResult = parser->parse();