140e9b92eSEd Tanous // SPDX-License-Identifier: Apache-2.0 240e9b92eSEd Tanous // SPDX-FileCopyrightText: Copyright OpenBMC Authors 3665e7602SGunnar Mills #pragma once 4665e7602SGunnar Mills /**************************************************************** 5665e7602SGunnar Mills * READ THIS WARNING FIRST 6665e7602SGunnar Mills * This is an auto-generated header which contains definitions 7665e7602SGunnar Mills * for Redfish DMTF defined messages. 8665e7602SGunnar Mills * DO NOT modify this registry outside of running the 9665e7602SGunnar Mills * parse_registries.py script. The definitions contained within 10665e7602SGunnar Mills * this file are owned by DMTF. Any modifications to these files 11665e7602SGunnar Mills * should be first pushed to the relevant registry in the DMTF 12665e7602SGunnar Mills * github organization. 13665e7602SGunnar Mills ***************************************************************/ 14665e7602SGunnar Mills #include "registries.hpp" 15665e7602SGunnar Mills 16665e7602SGunnar Mills #include <array> 17665e7602SGunnar Mills 18665e7602SGunnar Mills // clang-format off 19665e7602SGunnar Mills 20*4a102cd4SPatrick Williams namespace redfish::registries 21665e7602SGunnar Mills { 22*4a102cd4SPatrick Williams struct SensorEvent 23*4a102cd4SPatrick Williams { 24*4a102cd4SPatrick Williams static constexpr Header header = { 25665e7602SGunnar Mills "Copyright 2022-2023 DMTF. All rights reserved.", 26665e7602SGunnar Mills "#MessageRegistry.v1_6_2.MessageRegistry", 2756b81992SEd Tanous 1, 2856b81992SEd Tanous 0, 2956b81992SEd Tanous 1, 30665e7602SGunnar Mills "Sensor Event Message Registry", 31665e7602SGunnar Mills "en", 32665e7602SGunnar Mills "This registry defines messages used for general events related to Sensor resources.", 33665e7602SGunnar Mills "SensorEvent", 34665e7602SGunnar Mills "DMTF", 35665e7602SGunnar Mills }; 36*4a102cd4SPatrick Williams 37*4a102cd4SPatrick Williams static constexpr const char* url = 38665e7602SGunnar Mills "https://redfish.dmtf.org/registries/SensorEvent.1.0.1.json"; 39665e7602SGunnar Mills 40*4a102cd4SPatrick Williams static constexpr std::array registry = 41665e7602SGunnar Mills { 42665e7602SGunnar Mills MessageEntry{ 43665e7602SGunnar Mills "InvalidSensorReading", 44665e7602SGunnar Mills { 45665e7602SGunnar Mills "Indicates that the service received an invalid reading from a sensor.", 46665e7602SGunnar Mills "Invalid reading received from sensor '%1'.", 47665e7602SGunnar Mills "Warning", 48665e7602SGunnar Mills 1, 49665e7602SGunnar Mills { 50665e7602SGunnar Mills "string", 51665e7602SGunnar Mills }, 52665e7602SGunnar Mills "Check the sensor hardware or connection.", 53665e7602SGunnar Mills }}, 54665e7602SGunnar Mills MessageEntry{ 55665e7602SGunnar Mills "ReadingAboveLowerCriticalThreshold", 56665e7602SGunnar Mills { 57665e7602SGunnar Mills "Indicates that a sensor reading is no longer below the lower critical threshold but is still outside of normal operating range.", 58665e7602SGunnar Mills "Sensor '%1' reading of %2 (%3) is now above the %4 lower critical threshold but remains outside of normal range.", 59665e7602SGunnar Mills "Warning", 60665e7602SGunnar Mills 4, 61665e7602SGunnar Mills { 62665e7602SGunnar Mills "string", 63665e7602SGunnar Mills "number", 64665e7602SGunnar Mills "string", 65665e7602SGunnar Mills "number", 66665e7602SGunnar Mills }, 67665e7602SGunnar Mills "Check the condition of the resources listed in RelatedItem.", 68665e7602SGunnar Mills }}, 69665e7602SGunnar Mills MessageEntry{ 70665e7602SGunnar Mills "ReadingAboveLowerFatalThreshold", 71665e7602SGunnar Mills { 72665e7602SGunnar Mills "Indicates that a sensor reading is no longer below the lower fatal threshold but is still outside of normal operating range.", 73665e7602SGunnar Mills "Sensor '%1' reading of %2 (%3) is now above the %4 lower fatal threshold but remains outside of normal range.", 74665e7602SGunnar Mills "Critical", 75665e7602SGunnar Mills 4, 76665e7602SGunnar Mills { 77665e7602SGunnar Mills "string", 78665e7602SGunnar Mills "number", 79665e7602SGunnar Mills "string", 80665e7602SGunnar Mills "number", 81665e7602SGunnar Mills }, 82665e7602SGunnar Mills "Check the condition of the resources listed in RelatedItem.", 83665e7602SGunnar Mills }}, 84665e7602SGunnar Mills MessageEntry{ 85665e7602SGunnar Mills "ReadingAboveUpperCautionThreshold", 86665e7602SGunnar Mills { 87665e7602SGunnar Mills "Indicates that a sensor reading is above the upper caution threshold.", 88665e7602SGunnar Mills "Sensor '%1' reading of %2 (%3) is above the %4 upper caution threshold.", 89665e7602SGunnar Mills "Warning", 90665e7602SGunnar Mills 4, 91665e7602SGunnar Mills { 92665e7602SGunnar Mills "string", 93665e7602SGunnar Mills "number", 94665e7602SGunnar Mills "string", 95665e7602SGunnar Mills "number", 96665e7602SGunnar Mills }, 97665e7602SGunnar Mills "Check the condition of the resources listed in RelatedItem.", 98665e7602SGunnar Mills }}, 99665e7602SGunnar Mills MessageEntry{ 100665e7602SGunnar Mills "ReadingAboveUpperCriticalThreshold", 101665e7602SGunnar Mills { 102665e7602SGunnar Mills "Indicates that a sensor reading is above the upper critical threshold.", 103665e7602SGunnar Mills "Sensor '%1' reading of %2 (%3) is above the %4 upper critical threshold.", 104665e7602SGunnar Mills "Critical", 105665e7602SGunnar Mills 4, 106665e7602SGunnar Mills { 107665e7602SGunnar Mills "string", 108665e7602SGunnar Mills "number", 109665e7602SGunnar Mills "string", 110665e7602SGunnar Mills "number", 111665e7602SGunnar Mills }, 112665e7602SGunnar Mills "Check the condition of the resources listed in RelatedItem.", 113665e7602SGunnar Mills }}, 114665e7602SGunnar Mills MessageEntry{ 115665e7602SGunnar Mills "ReadingAboveUpperFatalThreshold", 116665e7602SGunnar Mills { 117665e7602SGunnar Mills "Indicates that a sensor reading is above the upper fatal threshold.", 118665e7602SGunnar Mills "Sensor '%1' reading of %2 (%3) is above the %4 upper fatal threshold.", 119665e7602SGunnar Mills "Critical", 120665e7602SGunnar Mills 4, 121665e7602SGunnar Mills { 122665e7602SGunnar Mills "string", 123665e7602SGunnar Mills "number", 124665e7602SGunnar Mills "string", 125665e7602SGunnar Mills "number", 126665e7602SGunnar Mills }, 127665e7602SGunnar Mills "Check the condition of the resources listed in RelatedItem.", 128665e7602SGunnar Mills }}, 129665e7602SGunnar Mills MessageEntry{ 130665e7602SGunnar Mills "ReadingBelowLowerCautionThreshold", 131665e7602SGunnar Mills { 132665e7602SGunnar Mills "Indicates that a sensor reading is below the lower caution threshold.", 133665e7602SGunnar Mills "Sensor '%1' reading of %2 (%3) is below the %4 lower caution threshold.", 134665e7602SGunnar Mills "Warning", 135665e7602SGunnar Mills 4, 136665e7602SGunnar Mills { 137665e7602SGunnar Mills "string", 138665e7602SGunnar Mills "number", 139665e7602SGunnar Mills "string", 140665e7602SGunnar Mills "number", 141665e7602SGunnar Mills }, 142665e7602SGunnar Mills "Check the condition of the resources listed in RelatedItem.", 143665e7602SGunnar Mills }}, 144665e7602SGunnar Mills MessageEntry{ 145665e7602SGunnar Mills "ReadingBelowLowerCriticalThreshold", 146665e7602SGunnar Mills { 147665e7602SGunnar Mills "Indicates that a sensor reading is below the lower critical threshold.", 148665e7602SGunnar Mills "Sensor '%1' reading of %2 (%3) is below the %4 lower critical threshold.", 149665e7602SGunnar Mills "Critical", 150665e7602SGunnar Mills 4, 151665e7602SGunnar Mills { 152665e7602SGunnar Mills "string", 153665e7602SGunnar Mills "number", 154665e7602SGunnar Mills "string", 155665e7602SGunnar Mills "number", 156665e7602SGunnar Mills }, 157665e7602SGunnar Mills "Check the condition of the resources listed in RelatedItem.", 158665e7602SGunnar Mills }}, 159665e7602SGunnar Mills MessageEntry{ 160665e7602SGunnar Mills "ReadingBelowLowerFatalThreshold", 161665e7602SGunnar Mills { 162665e7602SGunnar Mills "Indicates that a sensor reading is below the lower fatal threshold.", 163665e7602SGunnar Mills "Sensor '%1' reading of %2 (%3) is below the %4 lower fatal threshold.", 164665e7602SGunnar Mills "Critical", 165665e7602SGunnar Mills 4, 166665e7602SGunnar Mills { 167665e7602SGunnar Mills "string", 168665e7602SGunnar Mills "number", 169665e7602SGunnar Mills "string", 170665e7602SGunnar Mills "number", 171665e7602SGunnar Mills }, 172665e7602SGunnar Mills "Check the condition of the resources listed in RelatedItem.", 173665e7602SGunnar Mills }}, 174665e7602SGunnar Mills MessageEntry{ 175665e7602SGunnar Mills "ReadingBelowUpperCriticalThreshold", 176665e7602SGunnar Mills { 177665e7602SGunnar Mills "Indicates that a sensor reading is no longer above the upper critical threshold but is still outside of normal operating range.", 178665e7602SGunnar Mills "Sensor '%1' reading of %2 (%3) is now below the %4 upper critical threshold but remains outside of normal range.", 179665e7602SGunnar Mills "Warning", 180665e7602SGunnar Mills 4, 181665e7602SGunnar Mills { 182665e7602SGunnar Mills "string", 183665e7602SGunnar Mills "number", 184665e7602SGunnar Mills "string", 185665e7602SGunnar Mills "number", 186665e7602SGunnar Mills }, 187665e7602SGunnar Mills "Check the condition of the resources listed in RelatedItem.", 188665e7602SGunnar Mills }}, 189665e7602SGunnar Mills MessageEntry{ 190665e7602SGunnar Mills "ReadingBelowUpperFatalThreshold", 191665e7602SGunnar Mills { 192665e7602SGunnar Mills "Indicates that a sensor reading is no longer above the upper fatal threshold but is still outside of normal operating range.", 193665e7602SGunnar Mills "Sensor '%1' reading of %2 (%3) is now below the %4 upper fatal threshold but remains outside of normal range.", 194665e7602SGunnar Mills "Critical", 195665e7602SGunnar Mills 4, 196665e7602SGunnar Mills { 197665e7602SGunnar Mills "string", 198665e7602SGunnar Mills "number", 199665e7602SGunnar Mills "string", 200665e7602SGunnar Mills "number", 201665e7602SGunnar Mills }, 202665e7602SGunnar Mills "Check the condition of the resources listed in RelatedItem.", 203665e7602SGunnar Mills }}, 204665e7602SGunnar Mills MessageEntry{ 205665e7602SGunnar Mills "ReadingCritical", 206665e7602SGunnar Mills { 207665e7602SGunnar Mills "Indicates that a sensor reading exceeds an internal critical level.", 208665e7602SGunnar Mills "Sensor '%1' reading of %2 (%3) exceeds the critical level.", 209665e7602SGunnar Mills "Critical", 210665e7602SGunnar Mills 3, 211665e7602SGunnar Mills { 212665e7602SGunnar Mills "string", 213665e7602SGunnar Mills "number", 214665e7602SGunnar Mills "string", 215665e7602SGunnar Mills }, 216665e7602SGunnar Mills "Check the condition of the resources listed in RelatedItem.", 217665e7602SGunnar Mills }}, 218665e7602SGunnar Mills MessageEntry{ 219665e7602SGunnar Mills "ReadingNoLongerCritical", 220665e7602SGunnar Mills { 221665e7602SGunnar Mills "Indicates that a sensor reading no longer exceeds an internal critical level but still exceeds an internal warning level.", 222665e7602SGunnar Mills "Sensor '%1' reading of %2 (%3) no longer exceeds the critical level.", 223665e7602SGunnar Mills "Warning", 224665e7602SGunnar Mills 3, 225665e7602SGunnar Mills { 226665e7602SGunnar Mills "string", 227665e7602SGunnar Mills "number", 228665e7602SGunnar Mills "string", 229665e7602SGunnar Mills }, 230665e7602SGunnar Mills "Check the condition of the resources listed in RelatedItem.", 231665e7602SGunnar Mills }}, 232665e7602SGunnar Mills MessageEntry{ 233665e7602SGunnar Mills "ReadingWarning", 234665e7602SGunnar Mills { 235665e7602SGunnar Mills "Indicates that a sensor reading exceeds an internal warning level.", 236665e7602SGunnar Mills "Sensor '%1' reading of %2 (%3) exceeds the warning level.", 237665e7602SGunnar Mills "Warning", 238665e7602SGunnar Mills 3, 239665e7602SGunnar Mills { 240665e7602SGunnar Mills "string", 241665e7602SGunnar Mills "number", 242665e7602SGunnar Mills "string", 243665e7602SGunnar Mills }, 244665e7602SGunnar Mills "Check the condition of the resources listed in RelatedItem.", 245665e7602SGunnar Mills }}, 246665e7602SGunnar Mills MessageEntry{ 247665e7602SGunnar Mills "SensorFailure", 248665e7602SGunnar Mills { 249665e7602SGunnar Mills "Indicates that the service cannot communicate with a sensor or has detected a failure.", 250665e7602SGunnar Mills "Sensor '%1' has failed.", 251665e7602SGunnar Mills "Warning", 252665e7602SGunnar Mills 1, 253665e7602SGunnar Mills { 254665e7602SGunnar Mills "string", 255665e7602SGunnar Mills }, 256665e7602SGunnar Mills "Check the sensor hardware or connection.", 257665e7602SGunnar Mills }}, 258665e7602SGunnar Mills MessageEntry{ 259665e7602SGunnar Mills "SensorReadingNormalRange", 260665e7602SGunnar Mills { 261665e7602SGunnar Mills "Indicates that a sensor reading is now within normal operating range.", 262665e7602SGunnar Mills "Sensor '%1' reading of %2 (%3) is within normal operating range.", 263665e7602SGunnar Mills "OK", 264665e7602SGunnar Mills 3, 265665e7602SGunnar Mills { 266665e7602SGunnar Mills "string", 267665e7602SGunnar Mills "number", 268665e7602SGunnar Mills "string", 269665e7602SGunnar Mills }, 270665e7602SGunnar Mills "None.", 271665e7602SGunnar Mills }}, 272665e7602SGunnar Mills MessageEntry{ 273665e7602SGunnar Mills "SensorRestored", 274665e7602SGunnar Mills { 275665e7602SGunnar Mills "Indicates that a sensor was repaired or communications were restored. It may also indicate that the service is receiving valid data from a sensor.", 276665e7602SGunnar Mills "Sensor '%1' was restored.", 277665e7602SGunnar Mills "OK", 278665e7602SGunnar Mills 1, 279665e7602SGunnar Mills { 280665e7602SGunnar Mills "string", 281665e7602SGunnar Mills }, 282665e7602SGunnar Mills "None.", 283665e7602SGunnar Mills }}, 284665e7602SGunnar Mills 285665e7602SGunnar Mills }; 286665e7602SGunnar Mills 287665e7602SGunnar Mills enum class Index 288665e7602SGunnar Mills { 289665e7602SGunnar Mills invalidSensorReading = 0, 290665e7602SGunnar Mills readingAboveLowerCriticalThreshold = 1, 291665e7602SGunnar Mills readingAboveLowerFatalThreshold = 2, 292665e7602SGunnar Mills readingAboveUpperCautionThreshold = 3, 293665e7602SGunnar Mills readingAboveUpperCriticalThreshold = 4, 294665e7602SGunnar Mills readingAboveUpperFatalThreshold = 5, 295665e7602SGunnar Mills readingBelowLowerCautionThreshold = 6, 296665e7602SGunnar Mills readingBelowLowerCriticalThreshold = 7, 297665e7602SGunnar Mills readingBelowLowerFatalThreshold = 8, 298665e7602SGunnar Mills readingBelowUpperCriticalThreshold = 9, 299665e7602SGunnar Mills readingBelowUpperFatalThreshold = 10, 300665e7602SGunnar Mills readingCritical = 11, 301665e7602SGunnar Mills readingNoLongerCritical = 12, 302665e7602SGunnar Mills readingWarning = 13, 303665e7602SGunnar Mills sensorFailure = 14, 304665e7602SGunnar Mills sensorReadingNormalRange = 15, 305665e7602SGunnar Mills sensorRestored = 16, 306665e7602SGunnar Mills }; 307*4a102cd4SPatrick Williams }; // struct sensor_event 308*4a102cd4SPatrick Williams 309*4a102cd4SPatrick Williams [[gnu::constructor]] inline void registerSensorEvent() 310*4a102cd4SPatrick Williams { registerRegistry<SensorEvent>(); } 311*4a102cd4SPatrick Williams 312*4a102cd4SPatrick Williams } // namespace redfish::registries 313