Attn: Add support for raw pel symptom-id
Update raw pel symptom-id based on TI info data.
Signed-off-by: Ben Tyner <ben.tyner@ibm.com>
Change-Id: I501938e0fc9dba189999ab1491d23acd15628068
diff --git a/attn/pel/pel_minimal.cpp b/attn/pel/pel_minimal.cpp
index 9d7dfc1..11f589f 100644
--- a/attn/pel/pel_minimal.cpp
+++ b/attn/pel/pel_minimal.cpp
@@ -14,6 +14,7 @@
_ph = std::make_unique<PrivateHeader>(pelData);
_uh = std::make_unique<UserHeader>(pelData);
_ps = std::make_unique<PrimarySrc>(pelData);
+ _eh = std::make_unique<ExtendedUserHeader>(pelData);
}
void PelMinimal::raw(std::vector<uint8_t>& pelBuffer) const
@@ -24,6 +25,7 @@
_ph->flatten(pelData);
_uh->flatten(pelData);
_ps->flatten(pelData);
+ _eh->flatten(pelData);
}
size_t PelMinimal::size() const
@@ -48,6 +50,12 @@
size += _ph->header().size;
}
+ // size of extended user section
+ if (_eh)
+ {
+ size += _eh->header().size;
+ }
+
return ((size > _maxPELSize) ? _maxPELSize : size);
}
@@ -91,5 +99,10 @@
_ph->setSectionCount(sectionCount);
}
+void PelMinimal::setSymptomId(const std::string& symptomId)
+{
+ _eh->setSymptomId(symptomId);
+}
+
} // namespace pel
} // namespace attn