diff options
author | Harisuddin Mohamed Isa <harisuddin@gmail.com> | 2019-12-20 12:42:26 +0800 |
---|---|---|
committer | Harisuddin Mohamed Isa <harisuddin@gmail.com> | 2020-01-09 00:04:34 +0800 |
commit | 600d15afba0c72ab4e7bf6769dccffffe08ca5aa (patch) | |
tree | a2d73dc372b4617636205d6556e47642500b183a /extensions/openpower-pels/pel_values.hpp | |
parent | b3f5186e89a1ff8887e41863da39d30d373e3c08 (diff) | |
download | phosphor-logging-600d15afba0c72ab4e7bf6769dccffffe08ca5aa.tar.gz phosphor-logging-600d15afba0c72ab4e7bf6769dccffffe08ca5aa.zip |
PEL: Print action flags into JSON aligned
"User Header": {
"Section Version": "1",
"Sub-section type": "0",
"Log Committed by": "0x4552",
"Subsystem": "System Hypervisor Firmware",
"Event Scope": "Entire Platform",
"Event Severity": "Informational Event",
"Event Type": "Miscellaneous, Informational Only",
"Action Flags": [
"Report Externally"
]
}
Testing: Manually run peltool and verified output
Signed-off-by: Harisuddin Mohamed Isa <harisuddin@gmail.com>
Change-Id: Ie8376953b5f1baa093fc0aa9564d50cd4208564e
Diffstat (limited to 'extensions/openpower-pels/pel_values.hpp')
-rw-r--r-- | extensions/openpower-pels/pel_values.hpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/extensions/openpower-pels/pel_values.hpp b/extensions/openpower-pels/pel_values.hpp index 8d86acf..9a1ed88 100644 --- a/extensions/openpower-pels/pel_values.hpp +++ b/extensions/openpower-pels/pel_values.hpp @@ -33,6 +33,16 @@ using PELValues = std::vector<PELFieldValue>; std::string getValue(const uint8_t field, const pel_values::PELValues& values); /** + * @brief Helper function to get value vector from lookup tables. + * + * @param[in] value - the value to lookup + * @param[in] table - lookup table + * + * @return std::vector<std::string> - the value vector + */ +std::vector<std::string> getValuesBitwise(uint16_t value, + const pel_values::PELValues& table); +/** * @brief Find the desired entry in a PELValues table based on the * field value. * |