diff options
author | Matt Spinler <spinler@us.ibm.com> | 2019-11-07 13:25:53 -0600 |
---|---|---|
committer | Matt Spinler <spinler@us.ibm.com> | 2019-12-09 13:47:57 -0600 |
commit | f38ce984a435299c4c6f60e7222941fdc25f18ac (patch) | |
tree | fd15ccd5222133e1f40eb1d7df3d4a21f3b46c67 /extensions | |
parent | eb111447c755eabec4d89e4ccf74cc0c7887dedb (diff) | |
download | phosphor-logging-f38ce984a435299c4c6f60e7222941fdc25f18ac.tar.gz phosphor-logging-f38ce984a435299c4c6f60e7222941fdc25f18ac.zip |
PEL: Add enums for transmission states
So far, the states are new, sent, and acked.
Also added PEL object access to getting and setting these on the User
Header section object.
Signed-off-by: Matt Spinler <spinler@us.ibm.com>
Change-Id: I0dfb2d1a39fe69b2a47bf7d461f08e92039a3e03
Diffstat (limited to 'extensions')
-rw-r--r-- | extensions/openpower-pels/pel.hpp | 40 | ||||
-rw-r--r-- | extensions/openpower-pels/pel_types.hpp | 11 |
2 files changed, 51 insertions, 0 deletions
diff --git a/extensions/openpower-pels/pel.hpp b/extensions/openpower-pels/pel.hpp index 49b1d55..139fda8 100644 --- a/extensions/openpower-pels/pel.hpp +++ b/extensions/openpower-pels/pel.hpp @@ -219,6 +219,46 @@ class PEL */ void toJSON() const; + /** + * @brief Sets the host transmission state in the User Header + * + * @param[in] state - The state value + */ + void setHostTransmissionState(TransmissionState state) + { + _uh->setHostTransmissionState(static_cast<uint8_t>(state)); + } + + /** + * @brief Returns the host transmission state + * + * @return HostTransmissionState - The state + */ + TransmissionState hostTransmissionState() const + { + return static_cast<TransmissionState>(_uh->hostTransmissionState()); + } + + /** + * @brief Sets the HMC transmission state in the User Header + * + * @param[in] state - The state value + */ + void setHMCTransmissionState(TransmissionState state) + { + _uh->setHMCTransmissionState(static_cast<uint8_t>(state)); + } + + /** + * @brief Returns the HMC transmission state + * + * @return HMCTransmissionState - The state + */ + TransmissionState hmcTransmissionState() const + { + return static_cast<TransmissionState>(_uh->hmcTransmissionState()); + } + private: /** * @brief Builds the section objects from a PEL data buffer diff --git a/extensions/openpower-pels/pel_types.hpp b/extensions/openpower-pels/pel_types.hpp index ae886eb..9a33ccf 100644 --- a/extensions/openpower-pels/pel_types.hpp +++ b/extensions/openpower-pels/pel_types.hpp @@ -119,5 +119,16 @@ enum ActionFlagsBits osHWErrorBit = 6 // 0x0040 }; +/** + * @brief The PEL transmission states + */ +enum class TransmissionState +{ + newPEL = 0, + badPEL = 1, + sent = 2, + acked = 3 +}; + } // namespace pels } // namespace openpower |