summaryrefslogtreecommitdiffstats
path: root/extensions/openpower-pels/manager.hpp
diff options
context:
space:
mode:
authorMatt Spinler <spinler@us.ibm.com>2019-07-08 16:50:06 -0500
committerMatt Spinler <spinler@us.ibm.com>2019-07-26 12:38:38 -0500
commit15ee6aee19ec5357392078dfe692b7f02baeb725 (patch)
tree26c2cedd42e75f9d970a117b1b12655cf4a93880 /extensions/openpower-pels/manager.hpp
parent1787c5215b337ba55530b15fd51acaf5164ad3ea (diff)
downloadphosphor-logging-15ee6aee19ec5357392078dfe692b7f02baeb725.tar.gz
phosphor-logging-15ee6aee19ec5357392078dfe692b7f02baeb725.zip
PEL: Add class to wrap AdditionalData
The AdditionalData property on the xyz.openbmc_project.Logging.Entry interface is a vector of strings of the form: "KEY=VALUE". The PEL processing code will be interested in those keys and values, and this class adds a way to get at those values based on a key without having to do string parsing each time. It returns an std::optional<std::string> value, and if the key isn't found, then the std::optional value will be empty. For Example: AdditionalData ad{additionalDataPropertyValue}; // Get the value for the FOO key std::optional<std::string> val = ad.getValue("FOO"); if (val) std::cout << (*val).size(); Signed-off-by: Matt Spinler <spinler@us.ibm.com> Change-Id: I6ba458840278784b1cc6a0ed88a7fece8794df7d
Diffstat (limited to 'extensions/openpower-pels/manager.hpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud