summaryrefslogtreecommitdiffstats
path: root/extensions
diff options
context:
space:
mode:
authorMatt Spinler <spinler@us.ibm.com>2019-11-07 13:25:53 -0600
committerMatt Spinler <spinler@us.ibm.com>2019-12-09 13:47:57 -0600
commitf38ce984a435299c4c6f60e7222941fdc25f18ac (patch)
treefd15ccd5222133e1f40eb1d7df3d4a21f3b46c67 /extensions
parenteb111447c755eabec4d89e4ccf74cc0c7887dedb (diff)
downloadphosphor-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.hpp40
-rw-r--r--extensions/openpower-pels/pel_types.hpp11
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
OpenPOWER on IntegriCloud