store IsolationData in ServiceData class

Instead of passing both the IsolationData and ServiceData around
everywhere, store the IsolationData inside the ServiceData class so
that we only need to pass around one object.

Signed-off-by: Zane Shelley <zshelle@us.ibm.com>
Change-Id: I13f02fe43ede324ba51242a16daab107bc81a678
diff --git a/analyzer/analyzer_main.cpp b/analyzer/analyzer_main.cpp
index 4be14f5..e59c95b 100644
--- a/analyzer/analyzer_main.cpp
+++ b/analyzer/analyzer_main.cpp
@@ -35,12 +35,10 @@
 
 /**
  * @brief Will create and submit a PEL using the given data.
- * @param i_isoData   The data gathered during isolation (for FFDC).
  * @param i_servData  Data regarding service actions gathered during analysis.
  * @return The platform log ID. Will return zero if no PEL is generated.
  */
-uint32_t createPel(const libhei::IsolationData& i_isoData,
-                   const ServiceData& i_servData);
+uint32_t createPel(const ServiceData& i_servData);
 
 //------------------------------------------------------------------------------
 
@@ -151,7 +149,7 @@
         }
 
         // Start building the service data.
-        ServiceData servData{rootCause, i_type};
+        ServiceData servData{rootCause, i_type, isoData};
 
         // Apply any service actions, if needed. Note that there are no
         // resolutions for manual analysis.
@@ -173,7 +171,7 @@
         }
 
         // Create and commit a PEL.
-        o_plid = createPel(isoData, servData);
+        o_plid = createPel(servData);
 
         if (0 == o_plid)
         {
diff --git a/analyzer/create_pel.cpp b/analyzer/create_pel.cpp
index 5afe6ba..a5982ea 100644
--- a/analyzer/create_pel.cpp
+++ b/analyzer/create_pel.cpp
@@ -316,8 +316,7 @@
 
 //------------------------------------------------------------------------------
 
-uint32_t createPel(const libhei::IsolationData& i_isoData,
-                   const ServiceData& i_servData)
+uint32_t createPel(const ServiceData& i_servData)
 {
     uint32_t o_plid = 0; // default, zero indicates PEL was not created
 
@@ -344,10 +343,10 @@
     __addCalloutFFDC(i_servData, userDataFiles);
 
     // Capture the complete signature list.
-    __captureSignatureList(i_isoData, userDataFiles);
+    __captureSignatureList(i_servData.getIsolationData(), userDataFiles);
 
     // Capture the complete signature list.
-    __captureRegisterDump(i_isoData, userDataFiles);
+    __captureRegisterDump(i_servData.getIsolationData(), userDataFiles);
 
     // Now, that all of the user data files have been created, transform the
     // data into the proper format for the PEL.
diff --git a/analyzer/service_data.hpp b/analyzer/service_data.hpp
index 1639ed0..44f31b9 100644
--- a/analyzer/service_data.hpp
+++ b/analyzer/service_data.hpp
@@ -18,13 +18,15 @@
   public:
     /**
      * @brief Constructor from components.
-     * @param The signature of the root cause attention.
-     * @param The type of analysis to perform.
+     * @param i_rootCause    The signature of the root cause attention.
+     * @param i_analysisType The type of analysis to perform.
+     * @param i_isoData      The data found during isolation.
      */
     ServiceData(const libhei::Signature& i_rootCause,
-                AnalysisType i_analysisType) :
+                AnalysisType i_analysisType,
+                const libhei::IsolationData& i_isoData) :
         iv_rootCause(i_rootCause),
-        iv_analysisType(i_analysisType)
+        iv_analysisType(i_analysisType), iv_isoData(i_isoData)
     {}
 
     /** @brief Destructor. */
@@ -43,6 +45,9 @@
     /** The type of analysis to perform. */
     const AnalysisType iv_analysisType;
 
+    /** The data found during isolation. */
+    const libhei::IsolationData iv_isoData;
+
     /** The list of callouts that will be added to a PEL. */
     nlohmann::json iv_calloutList = nlohmann::json::array();
 
@@ -63,6 +68,12 @@
         return iv_analysisType;
     }
 
+    /** @return The data found during isolation. */
+    const libhei::IsolationData& getIsolationData() const
+    {
+        return iv_isoData;
+    }
+
     /** @return Returns the guard type based on current analysis policies. */
     callout::GuardType queryGuardPolicy() const
     {
diff --git a/test/resolution_test.cpp b/test/resolution_test.cpp
index 23f952c..e9b2104 100644
--- a/test/resolution_test.cpp
+++ b/test/resolution_test.cpp
@@ -56,8 +56,10 @@
     // Get some ServiceData objects
     libhei::Chip chip{util::pdbg::getTrgt(chip_str), 0xdeadbeef};
     libhei::Signature sig{chip, 0xabcd, 0, 0, libhei::ATTN_TYPE_CHECKSTOP};
-    ServiceData sd1{sig, AnalysisType::SYSTEM_CHECKSTOP};
-    ServiceData sd2{sig, AnalysisType::TERMINATE_IMMEDIATE};
+    ServiceData sd1{sig, AnalysisType::SYSTEM_CHECKSTOP,
+                    libhei::IsolationData{}};
+    ServiceData sd2{sig, AnalysisType::TERMINATE_IMMEDIATE,
+                    libhei::IsolationData{}};
 
     // Resolve
     l1->resolve(sd1);
@@ -139,7 +141,8 @@
 
     libhei::Chip chip{util::pdbg::getTrgt(chip_str), 0xdeadbeef};
     libhei::Signature sig{chip, 0xabcd, 0, 0, libhei::ATTN_TYPE_CHECKSTOP};
-    ServiceData sd{sig, AnalysisType::SYSTEM_CHECKSTOP};
+    ServiceData sd{sig, AnalysisType::SYSTEM_CHECKSTOP,
+                   libhei::IsolationData{}};
 
     c1->resolve(sd);
 
@@ -188,7 +191,8 @@
 
     libhei::Chip chip{util::pdbg::getTrgt(chip_str), 0xdeadbeef};
     libhei::Signature sig{chip, 0xabcd, 0, 0, libhei::ATTN_TYPE_CHECKSTOP};
-    ServiceData sd{sig, AnalysisType::SYSTEM_CHECKSTOP};
+    ServiceData sd{sig, AnalysisType::SYSTEM_CHECKSTOP,
+                   libhei::IsolationData{}};
 
     nlohmann::json j{};
     std::string s{};
@@ -273,7 +277,8 @@
 
     libhei::Chip chip{util::pdbg::getTrgt(chip_str), 0xdeadbeef};
     libhei::Signature sig{chip, 0xabcd, 0, 0, libhei::ATTN_TYPE_CHECKSTOP};
-    ServiceData sd{sig, AnalysisType::SYSTEM_CHECKSTOP};
+    ServiceData sd{sig, AnalysisType::SYSTEM_CHECKSTOP,
+                   libhei::IsolationData{}};
 
     nlohmann::json j{};
     std::string s{};
@@ -348,7 +353,8 @@
 
     libhei::Chip chip{util::pdbg::getTrgt(chip_str), 0xdeadbeef};
     libhei::Signature sig{chip, 0xabcd, 0, 0, libhei::ATTN_TYPE_CHECKSTOP};
-    ServiceData sd{sig, AnalysisType::SYSTEM_CHECKSTOP};
+    ServiceData sd{sig, AnalysisType::SYSTEM_CHECKSTOP,
+                   libhei::IsolationData{}};
 
     c1->resolve(sd);
 
@@ -388,7 +394,8 @@
 
     libhei::Chip chip{util::pdbg::getTrgt(chip_str), 0xdeadbeef};
     libhei::Signature sig{chip, 0xabcd, 0, 0, libhei::ATTN_TYPE_CHECKSTOP};
-    ServiceData sd{sig, AnalysisType::SYSTEM_CHECKSTOP};
+    ServiceData sd{sig, AnalysisType::SYSTEM_CHECKSTOP,
+                   libhei::IsolationData{}};
 
     c1->resolve(sd);
 
@@ -426,7 +433,8 @@
 
     libhei::Chip chip{util::pdbg::getTrgt(chip_str), 0xdeadbeef};
     libhei::Signature sig{chip, 0xabcd, 0, 0, libhei::ATTN_TYPE_CHECKSTOP};
-    ServiceData sd{sig, AnalysisType::SYSTEM_CHECKSTOP};
+    ServiceData sd{sig, AnalysisType::SYSTEM_CHECKSTOP,
+                   libhei::IsolationData{}};
 
     c1->resolve(sd);