1*f1e85e20SMatt Spinler #pragma once 2*f1e85e20SMatt Spinler 3*f1e85e20SMatt Spinler #include <cstdint> 4*f1e85e20SMatt Spinler #include <tuple> 5*f1e85e20SMatt Spinler 6*f1e85e20SMatt Spinler namespace openpower 7*f1e85e20SMatt Spinler { 8*f1e85e20SMatt Spinler namespace pels 9*f1e85e20SMatt Spinler { 10*f1e85e20SMatt Spinler namespace pel_rules 11*f1e85e20SMatt Spinler { 12*f1e85e20SMatt Spinler 13*f1e85e20SMatt Spinler /** 14*f1e85e20SMatt Spinler * @brief Ensure certain PEL fields are in agreement, and fix them if they 15*f1e85e20SMatt Spinler * aren't. These rules are documented in the README.md in this 16*f1e85e20SMatt Spinler * directory. 17*f1e85e20SMatt Spinler * 18*f1e85e20SMatt Spinler * Note: The message registry schema enforces that there are no undefined 19*f1e85e20SMatt Spinler * bits set in these fields. 20*f1e85e20SMatt Spinler * 21*f1e85e20SMatt Spinler * @param[in] actionFlags - The current Action Flags value 22*f1e85e20SMatt Spinler * @param[in] eventType - The current Event Type value 23*f1e85e20SMatt Spinler * @param[in] severity - The current Severity value 24*f1e85e20SMatt Spinler * 25*f1e85e20SMatt Spinler * @return std::tuple<actionFlags, eventType> - The corrected values. 26*f1e85e20SMatt Spinler */ 27*f1e85e20SMatt Spinler std::tuple<uint16_t, uint8_t> check(uint16_t actionFlags, uint8_t eventType, 28*f1e85e20SMatt Spinler uint8_t severity); 29*f1e85e20SMatt Spinler 30*f1e85e20SMatt Spinler } // namespace pel_rules 31*f1e85e20SMatt Spinler } // namespace pels 32*f1e85e20SMatt Spinler } // namespace openpower 33