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