Support for callout list FFDC
The FFDC contains relevent fields to a callout that otherwise would not
be displayed in the callout user data section.
Signed-off-by: Zane Shelley <zshelle@us.ibm.com>
Change-Id: Iadb71587b7219c4d352fa583ddd86f290de4a747
diff --git a/analyzer/service_data.hpp b/analyzer/service_data.hpp
index 3664550..ce9993e 100644
--- a/analyzer/service_data.hpp
+++ b/analyzer/service_data.hpp
@@ -45,6 +45,10 @@
/** The list of callouts that will be added to a PEL. */
nlohmann::json iv_calloutList = nlohmann::json::array();
+ /** FFDC for callouts that would otherwise not be available in the
+ * callout list (unit paths, bus types, etc.). */
+ nlohmann::json iv_calloutFFDC = nlohmann::json::array();
+
/** The list of hardware guard requests. Some information will be added to
* the PEL, but the actual guard record will be created after submitting
* the PEL. */
@@ -74,11 +78,22 @@
}
/**
+ * @brief Add FFDC for a callout that would otherwise not be available in
+ * the callout list (unit paths, bus types, etc.).
+ * @param The JSON object for this callout.
+ */
+ void addCalloutFFDC(const nlohmann::json& i_ffdc)
+ {
+ iv_calloutFFDC.push_back(i_ffdc);
+ }
+
+ /**
* @brief Add a guard request to the guard list.
* @param i_path Entity path for the target part.
* @param i_guard True, if the part should be guarded. False, otherwise.
+ * @return A reference to the object just added to the guard list.
*/
- void addGuard(const std::string& i_path, bool i_guard)
+ const Guard& addGuard(const std::string& i_path, bool i_guard)
{
Guard::Type guardType = Guard::Type::NONE;
if (i_guard)
@@ -89,7 +104,7 @@
queryCheckstop() ? Guard::Type::FATAL : Guard::Type::NON_FATAL;
}
- iv_guardList.emplace_back(i_path, guardType);
+ return iv_guardList.emplace_back(i_path, guardType);
}
/** @brief Accessor to iv_calloutList. */
@@ -98,6 +113,12 @@
return iv_calloutList;
}
+ /** @brief Accessor to iv_calloutFFDC. */
+ const nlohmann::json& getCalloutFFDC() const
+ {
+ return iv_calloutFFDC;
+ }
+
/** @brief Accessor to iv_guardList. */
const std::vector<Guard>& getGuardList() const
{