1 // SPDX-License-Identifier: Apache-2.0 2 // SPDX-FileCopyrightText: Copyright OpenBMC Authors 3 #pragma once 4 /**************************************************************** 5 * READ THIS WARNING FIRST 6 * This is an auto-generated header which contains definitions 7 * for Redfish DMTF defined messages. 8 * DO NOT modify this registry outside of running the 9 * parse_registries.py script. The definitions contained within 10 * this file are owned by DMTF. Any modifications to these files 11 * should be first pushed to the relevant registry in the DMTF 12 * github organization. 13 ***************************************************************/ 14 #include "registries.hpp" 15 16 #include <array> 17 18 // clang-format off 19 20 namespace redfish::registries::sensor_event 21 { 22 const Header header = { 23 "Copyright 2022-2023 DMTF. All rights reserved.", 24 "#MessageRegistry.v1_6_2.MessageRegistry", 25 1, 26 0, 27 1, 28 "Sensor Event Message Registry", 29 "en", 30 "This registry defines messages used for general events related to Sensor resources.", 31 "SensorEvent", 32 "DMTF", 33 }; 34 constexpr const char* url = 35 "https://redfish.dmtf.org/registries/SensorEvent.1.0.1.json"; 36 37 constexpr std::array registry = 38 { 39 MessageEntry{ 40 "InvalidSensorReading", 41 { 42 "Indicates that the service received an invalid reading from a sensor.", 43 "Invalid reading received from sensor '%1'.", 44 "Warning", 45 1, 46 { 47 "string", 48 }, 49 "Check the sensor hardware or connection.", 50 }}, 51 MessageEntry{ 52 "ReadingAboveLowerCriticalThreshold", 53 { 54 "Indicates that a sensor reading is no longer below the lower critical threshold but is still outside of normal operating range.", 55 "Sensor '%1' reading of %2 (%3) is now above the %4 lower critical threshold but remains outside of normal range.", 56 "Warning", 57 4, 58 { 59 "string", 60 "number", 61 "string", 62 "number", 63 }, 64 "Check the condition of the resources listed in RelatedItem.", 65 }}, 66 MessageEntry{ 67 "ReadingAboveLowerFatalThreshold", 68 { 69 "Indicates that a sensor reading is no longer below the lower fatal threshold but is still outside of normal operating range.", 70 "Sensor '%1' reading of %2 (%3) is now above the %4 lower fatal threshold but remains outside of normal range.", 71 "Critical", 72 4, 73 { 74 "string", 75 "number", 76 "string", 77 "number", 78 }, 79 "Check the condition of the resources listed in RelatedItem.", 80 }}, 81 MessageEntry{ 82 "ReadingAboveUpperCautionThreshold", 83 { 84 "Indicates that a sensor reading is above the upper caution threshold.", 85 "Sensor '%1' reading of %2 (%3) is above the %4 upper caution threshold.", 86 "Warning", 87 4, 88 { 89 "string", 90 "number", 91 "string", 92 "number", 93 }, 94 "Check the condition of the resources listed in RelatedItem.", 95 }}, 96 MessageEntry{ 97 "ReadingAboveUpperCriticalThreshold", 98 { 99 "Indicates that a sensor reading is above the upper critical threshold.", 100 "Sensor '%1' reading of %2 (%3) is above the %4 upper critical threshold.", 101 "Critical", 102 4, 103 { 104 "string", 105 "number", 106 "string", 107 "number", 108 }, 109 "Check the condition of the resources listed in RelatedItem.", 110 }}, 111 MessageEntry{ 112 "ReadingAboveUpperFatalThreshold", 113 { 114 "Indicates that a sensor reading is above the upper fatal threshold.", 115 "Sensor '%1' reading of %2 (%3) is above the %4 upper fatal threshold.", 116 "Critical", 117 4, 118 { 119 "string", 120 "number", 121 "string", 122 "number", 123 }, 124 "Check the condition of the resources listed in RelatedItem.", 125 }}, 126 MessageEntry{ 127 "ReadingBelowLowerCautionThreshold", 128 { 129 "Indicates that a sensor reading is below the lower caution threshold.", 130 "Sensor '%1' reading of %2 (%3) is below the %4 lower caution threshold.", 131 "Warning", 132 4, 133 { 134 "string", 135 "number", 136 "string", 137 "number", 138 }, 139 "Check the condition of the resources listed in RelatedItem.", 140 }}, 141 MessageEntry{ 142 "ReadingBelowLowerCriticalThreshold", 143 { 144 "Indicates that a sensor reading is below the lower critical threshold.", 145 "Sensor '%1' reading of %2 (%3) is below the %4 lower critical threshold.", 146 "Critical", 147 4, 148 { 149 "string", 150 "number", 151 "string", 152 "number", 153 }, 154 "Check the condition of the resources listed in RelatedItem.", 155 }}, 156 MessageEntry{ 157 "ReadingBelowLowerFatalThreshold", 158 { 159 "Indicates that a sensor reading is below the lower fatal threshold.", 160 "Sensor '%1' reading of %2 (%3) is below the %4 lower fatal threshold.", 161 "Critical", 162 4, 163 { 164 "string", 165 "number", 166 "string", 167 "number", 168 }, 169 "Check the condition of the resources listed in RelatedItem.", 170 }}, 171 MessageEntry{ 172 "ReadingBelowUpperCriticalThreshold", 173 { 174 "Indicates that a sensor reading is no longer above the upper critical threshold but is still outside of normal operating range.", 175 "Sensor '%1' reading of %2 (%3) is now below the %4 upper critical threshold but remains outside of normal range.", 176 "Warning", 177 4, 178 { 179 "string", 180 "number", 181 "string", 182 "number", 183 }, 184 "Check the condition of the resources listed in RelatedItem.", 185 }}, 186 MessageEntry{ 187 "ReadingBelowUpperFatalThreshold", 188 { 189 "Indicates that a sensor reading is no longer above the upper fatal threshold but is still outside of normal operating range.", 190 "Sensor '%1' reading of %2 (%3) is now below the %4 upper fatal threshold but remains outside of normal range.", 191 "Critical", 192 4, 193 { 194 "string", 195 "number", 196 "string", 197 "number", 198 }, 199 "Check the condition of the resources listed in RelatedItem.", 200 }}, 201 MessageEntry{ 202 "ReadingCritical", 203 { 204 "Indicates that a sensor reading exceeds an internal critical level.", 205 "Sensor '%1' reading of %2 (%3) exceeds the critical level.", 206 "Critical", 207 3, 208 { 209 "string", 210 "number", 211 "string", 212 }, 213 "Check the condition of the resources listed in RelatedItem.", 214 }}, 215 MessageEntry{ 216 "ReadingNoLongerCritical", 217 { 218 "Indicates that a sensor reading no longer exceeds an internal critical level but still exceeds an internal warning level.", 219 "Sensor '%1' reading of %2 (%3) no longer exceeds the critical level.", 220 "Warning", 221 3, 222 { 223 "string", 224 "number", 225 "string", 226 }, 227 "Check the condition of the resources listed in RelatedItem.", 228 }}, 229 MessageEntry{ 230 "ReadingWarning", 231 { 232 "Indicates that a sensor reading exceeds an internal warning level.", 233 "Sensor '%1' reading of %2 (%3) exceeds the warning level.", 234 "Warning", 235 3, 236 { 237 "string", 238 "number", 239 "string", 240 }, 241 "Check the condition of the resources listed in RelatedItem.", 242 }}, 243 MessageEntry{ 244 "SensorFailure", 245 { 246 "Indicates that the service cannot communicate with a sensor or has detected a failure.", 247 "Sensor '%1' has failed.", 248 "Warning", 249 1, 250 { 251 "string", 252 }, 253 "Check the sensor hardware or connection.", 254 }}, 255 MessageEntry{ 256 "SensorReadingNormalRange", 257 { 258 "Indicates that a sensor reading is now within normal operating range.", 259 "Sensor '%1' reading of %2 (%3) is within normal operating range.", 260 "OK", 261 3, 262 { 263 "string", 264 "number", 265 "string", 266 }, 267 "None.", 268 }}, 269 MessageEntry{ 270 "SensorRestored", 271 { 272 "Indicates that a sensor was repaired or communications were restored. It may also indicate that the service is receiving valid data from a sensor.", 273 "Sensor '%1' was restored.", 274 "OK", 275 1, 276 { 277 "string", 278 }, 279 "None.", 280 }}, 281 282 }; 283 284 enum class Index 285 { 286 invalidSensorReading = 0, 287 readingAboveLowerCriticalThreshold = 1, 288 readingAboveLowerFatalThreshold = 2, 289 readingAboveUpperCautionThreshold = 3, 290 readingAboveUpperCriticalThreshold = 4, 291 readingAboveUpperFatalThreshold = 5, 292 readingBelowLowerCautionThreshold = 6, 293 readingBelowLowerCriticalThreshold = 7, 294 readingBelowLowerFatalThreshold = 8, 295 readingBelowUpperCriticalThreshold = 9, 296 readingBelowUpperFatalThreshold = 10, 297 readingCritical = 11, 298 readingNoLongerCritical = 12, 299 readingWarning = 13, 300 sensorFailure = 14, 301 sensorReadingNormalRange = 15, 302 sensorRestored = 16, 303 }; 304 } // namespace redfish::registries::sensor_event 305