summaryrefslogtreecommitdiffstats
path: root/extensions/openpower-pels/private_header.hpp
Commit message (Collapse)AuthorAgeFilesLines
* PEL: private header in JSONAatir2019-12-091-0/+6
| | | | | | | | | | | | | | | | | | | | | | The PELTool application is able to convert sections to JSON. This commit takes care of converting the private header section to JSON. private header section in JSON sample: "Private Header":[ {"Section Version": "1"}, {"Sub-section type": "0"}, {"Log Committed by": "0x1000"}, {"Entry Creation": "10/24/2019 15:50:08"}, {"Entry Commit": "10/24/2019 15:50:08"}, {"Creator ID": "BMC"}, {"Creator Implementation": ""}, {"Platform Log ID": "0x50000004"}, {"Log Entry ID": "0x50000004"} ] Signed-off-by: Aatir <aatrapps@gmail.com> Change-Id: I8b0d7dc7b70cd2a03f67f7c9a48755803634005d
* PEL: Make PEL::flatten() constMatt Spinler2019-11-121-3/+3
| | | | | | | | This includes making the flatten() method const in the PEL section base class and in all of its derived classes. Signed-off-by: Matt Spinler <spinler@us.ibm.com> Change-Id: I6be787962c6d7dfa01bdced2f9024564e6ac1b08
* PEL: Const accessors for Private/UserHeaderMatt Spinler2019-11-041-16/+56
| | | | | | | | | | | | | | | | | | | Change the combined non-const accessor/setter functions for the PrivateHeader and UserHeader fields to the standard const accessors, and have separate setters for the fields that need to be modified. In addition, make the 'get PrivateHeader' and 'get UserHeader' functions on the PEL class return a const reference. This allows const enforcement on the PEL class, for things like: void func(const PEL& pel) { auto id = pel.privateHeader().id(); } Signed-off-by: Matt Spinler <spinler@us.ibm.com> Change-Id: I840170e72b41e9e2465f716617500269244de6d9
* PEL: Create PrivateHeader from parametersMatt Spinler2019-10-091-0/+16
| | | | | | | | | | Add a constructor to the PrivateHeader class so it can be built from the creator's component ID, the OpenBMC log ID, and the creation timestamp. This will be used when creating PELs from OpenBMC event logs. Signed-off-by: Matt Spinler <spinler@us.ibm.com> Change-Id: I2d1217b9ff0317195366bee50fa72953fd5341dc
* PEL: Move PEL section IDs into a header fileMatt Spinler2019-09-271-2/+1
| | | | | | | | | These will eventually need to be known to a piece of code that unflattens a PEL into the appropriate section class objects based on the section ID field in the PEL data. Signed-off-by: Matt Spinler <spinler@us.ibm.com> Change-Id: I90b9d4be49b2e3807a620745fa663f94f7f4e62c
* PEL: Add a flatten() to Section base classMatt Spinler2019-09-101-19/+14
| | | | | | | | | | | | | | | To prepare for supporting PEL sections that can be in any order, which will probably be stored in a std::vector<unique_ptr<Section>>, add a pure virtual function in the Section base class so this list of sections can just be iterated on and have every object in it flattened. This flatten() call replaces the operator<<(Stream&, <object>) functions currently in use, so also convert the operator>> to unflatten() to make things consistent. Signed-off-by: Matt Spinler <spinler@us.ibm.com> Change-Id: Id68f16fe4197b389a8495c21539a64f9f583c800
* PEL: Add PrivateHeader classMatt Spinler2019-07-261-0/+256
The first section in a PEL is always the 'Private Header' section. This commit adds a class to represent that. Right now, the only constructor available is filling in its data fields from a PEL stream. The Section base class, which will be the base class of all PEL sections, is also being introduced here. It contains the section header structure, and a valid flag that derived classes can use. Signed-off-by: Matt Spinler <spinler@us.ibm.com> Change-Id: Ia5806017155fe1ef29ea57bf8ab202ff861bde2e
OpenPOWER on IntegriCloud