xref: /openbmc/bmcweb/features/redfish/include/generated/enums/sensor.hpp (revision 40e9b92ec19acffb46f83a6e55b18974da5d708e)
1*40e9b92eSEd Tanous // SPDX-License-Identifier: Apache-2.0
2*40e9b92eSEd Tanous // SPDX-FileCopyrightText: Copyright OpenBMC Authors
30ec8b83dSEd Tanous #pragma once
40ec8b83dSEd Tanous #include <nlohmann/json.hpp>
50ec8b83dSEd Tanous 
60ec8b83dSEd Tanous namespace sensor
70ec8b83dSEd Tanous {
80ec8b83dSEd Tanous // clang-format off
90ec8b83dSEd Tanous 
100ec8b83dSEd Tanous enum class VoltageType{
110ec8b83dSEd Tanous     Invalid,
120ec8b83dSEd Tanous     AC,
130ec8b83dSEd Tanous     DC,
140ec8b83dSEd Tanous };
150ec8b83dSEd Tanous 
160ec8b83dSEd Tanous enum class ElectricalContext{
170ec8b83dSEd Tanous     Invalid,
180ec8b83dSEd Tanous     Line1,
190ec8b83dSEd Tanous     Line2,
200ec8b83dSEd Tanous     Line3,
210ec8b83dSEd Tanous     Neutral,
220ec8b83dSEd Tanous     LineToLine,
230ec8b83dSEd Tanous     Line1ToLine2,
240ec8b83dSEd Tanous     Line2ToLine3,
250ec8b83dSEd Tanous     Line3ToLine1,
260ec8b83dSEd Tanous     LineToNeutral,
270ec8b83dSEd Tanous     Line1ToNeutral,
280ec8b83dSEd Tanous     Line2ToNeutral,
290ec8b83dSEd Tanous     Line3ToNeutral,
300ec8b83dSEd Tanous     Line1ToNeutralAndL1L2,
310ec8b83dSEd Tanous     Line2ToNeutralAndL1L2,
320ec8b83dSEd Tanous     Line2ToNeutralAndL2L3,
330ec8b83dSEd Tanous     Line3ToNeutralAndL3L1,
340ec8b83dSEd Tanous     Total,
350ec8b83dSEd Tanous };
360ec8b83dSEd Tanous 
370ec8b83dSEd Tanous enum class ThresholdActivation{
380ec8b83dSEd Tanous     Invalid,
390ec8b83dSEd Tanous     Increasing,
400ec8b83dSEd Tanous     Decreasing,
410ec8b83dSEd Tanous     Either,
42f263e09cSEd Tanous     Disabled,
430ec8b83dSEd Tanous };
440ec8b83dSEd Tanous 
450ec8b83dSEd Tanous enum class ReadingType{
460ec8b83dSEd Tanous     Invalid,
470ec8b83dSEd Tanous     Temperature,
480ec8b83dSEd Tanous     Humidity,
490ec8b83dSEd Tanous     Power,
500ec8b83dSEd Tanous     EnergykWh,
510ec8b83dSEd Tanous     EnergyJoules,
520ec8b83dSEd Tanous     EnergyWh,
530ec8b83dSEd Tanous     ChargeAh,
540ec8b83dSEd Tanous     Voltage,
550ec8b83dSEd Tanous     Current,
560ec8b83dSEd Tanous     Frequency,
570ec8b83dSEd Tanous     Pressure,
580ec8b83dSEd Tanous     PressurekPa,
59f263e09cSEd Tanous     PressurePa,
600ec8b83dSEd Tanous     LiquidLevel,
610ec8b83dSEd Tanous     Rotational,
620ec8b83dSEd Tanous     AirFlow,
63f263e09cSEd Tanous     AirFlowCMM,
640ec8b83dSEd Tanous     LiquidFlow,
65f263e09cSEd Tanous     LiquidFlowLPM,
660ec8b83dSEd Tanous     Barometric,
670ec8b83dSEd Tanous     Altitude,
680ec8b83dSEd Tanous     Percent,
690ec8b83dSEd Tanous     AbsoluteHumidity,
70f263e09cSEd Tanous     Heat,
710ec8b83dSEd Tanous };
720ec8b83dSEd Tanous 
730ec8b83dSEd Tanous enum class ImplementationType{
740ec8b83dSEd Tanous     Invalid,
750ec8b83dSEd Tanous     PhysicalSensor,
760ec8b83dSEd Tanous     Synthesized,
770ec8b83dSEd Tanous     Reported,
780ec8b83dSEd Tanous };
790ec8b83dSEd Tanous 
80f263e09cSEd Tanous enum class ReadingBasisType{
81f263e09cSEd Tanous     Invalid,
82f263e09cSEd Tanous     Zero,
83f263e09cSEd Tanous     Delta,
84f263e09cSEd Tanous     Headroom,
85f263e09cSEd Tanous };
86f263e09cSEd Tanous 
870ec8b83dSEd Tanous NLOHMANN_JSON_SERIALIZE_ENUM(VoltageType, {
880ec8b83dSEd Tanous     {VoltageType::Invalid, "Invalid"},
890ec8b83dSEd Tanous     {VoltageType::AC, "AC"},
900ec8b83dSEd Tanous     {VoltageType::DC, "DC"},
910ec8b83dSEd Tanous });
920ec8b83dSEd Tanous 
930ec8b83dSEd Tanous NLOHMANN_JSON_SERIALIZE_ENUM(ElectricalContext, {
940ec8b83dSEd Tanous     {ElectricalContext::Invalid, "Invalid"},
950ec8b83dSEd Tanous     {ElectricalContext::Line1, "Line1"},
960ec8b83dSEd Tanous     {ElectricalContext::Line2, "Line2"},
970ec8b83dSEd Tanous     {ElectricalContext::Line3, "Line3"},
980ec8b83dSEd Tanous     {ElectricalContext::Neutral, "Neutral"},
990ec8b83dSEd Tanous     {ElectricalContext::LineToLine, "LineToLine"},
1000ec8b83dSEd Tanous     {ElectricalContext::Line1ToLine2, "Line1ToLine2"},
1010ec8b83dSEd Tanous     {ElectricalContext::Line2ToLine3, "Line2ToLine3"},
1020ec8b83dSEd Tanous     {ElectricalContext::Line3ToLine1, "Line3ToLine1"},
1030ec8b83dSEd Tanous     {ElectricalContext::LineToNeutral, "LineToNeutral"},
1040ec8b83dSEd Tanous     {ElectricalContext::Line1ToNeutral, "Line1ToNeutral"},
1050ec8b83dSEd Tanous     {ElectricalContext::Line2ToNeutral, "Line2ToNeutral"},
1060ec8b83dSEd Tanous     {ElectricalContext::Line3ToNeutral, "Line3ToNeutral"},
1070ec8b83dSEd Tanous     {ElectricalContext::Line1ToNeutralAndL1L2, "Line1ToNeutralAndL1L2"},
1080ec8b83dSEd Tanous     {ElectricalContext::Line2ToNeutralAndL1L2, "Line2ToNeutralAndL1L2"},
1090ec8b83dSEd Tanous     {ElectricalContext::Line2ToNeutralAndL2L3, "Line2ToNeutralAndL2L3"},
1100ec8b83dSEd Tanous     {ElectricalContext::Line3ToNeutralAndL3L1, "Line3ToNeutralAndL3L1"},
1110ec8b83dSEd Tanous     {ElectricalContext::Total, "Total"},
1120ec8b83dSEd Tanous });
1130ec8b83dSEd Tanous 
1140ec8b83dSEd Tanous NLOHMANN_JSON_SERIALIZE_ENUM(ThresholdActivation, {
1150ec8b83dSEd Tanous     {ThresholdActivation::Invalid, "Invalid"},
1160ec8b83dSEd Tanous     {ThresholdActivation::Increasing, "Increasing"},
1170ec8b83dSEd Tanous     {ThresholdActivation::Decreasing, "Decreasing"},
1180ec8b83dSEd Tanous     {ThresholdActivation::Either, "Either"},
119f263e09cSEd Tanous     {ThresholdActivation::Disabled, "Disabled"},
1200ec8b83dSEd Tanous });
1210ec8b83dSEd Tanous 
1220ec8b83dSEd Tanous NLOHMANN_JSON_SERIALIZE_ENUM(ReadingType, {
1230ec8b83dSEd Tanous     {ReadingType::Invalid, "Invalid"},
1240ec8b83dSEd Tanous     {ReadingType::Temperature, "Temperature"},
1250ec8b83dSEd Tanous     {ReadingType::Humidity, "Humidity"},
1260ec8b83dSEd Tanous     {ReadingType::Power, "Power"},
1270ec8b83dSEd Tanous     {ReadingType::EnergykWh, "EnergykWh"},
1280ec8b83dSEd Tanous     {ReadingType::EnergyJoules, "EnergyJoules"},
1290ec8b83dSEd Tanous     {ReadingType::EnergyWh, "EnergyWh"},
1300ec8b83dSEd Tanous     {ReadingType::ChargeAh, "ChargeAh"},
1310ec8b83dSEd Tanous     {ReadingType::Voltage, "Voltage"},
1320ec8b83dSEd Tanous     {ReadingType::Current, "Current"},
1330ec8b83dSEd Tanous     {ReadingType::Frequency, "Frequency"},
1340ec8b83dSEd Tanous     {ReadingType::Pressure, "Pressure"},
1350ec8b83dSEd Tanous     {ReadingType::PressurekPa, "PressurekPa"},
136f263e09cSEd Tanous     {ReadingType::PressurePa, "PressurePa"},
1370ec8b83dSEd Tanous     {ReadingType::LiquidLevel, "LiquidLevel"},
1380ec8b83dSEd Tanous     {ReadingType::Rotational, "Rotational"},
1390ec8b83dSEd Tanous     {ReadingType::AirFlow, "AirFlow"},
140f263e09cSEd Tanous     {ReadingType::AirFlowCMM, "AirFlowCMM"},
1410ec8b83dSEd Tanous     {ReadingType::LiquidFlow, "LiquidFlow"},
142f263e09cSEd Tanous     {ReadingType::LiquidFlowLPM, "LiquidFlowLPM"},
1430ec8b83dSEd Tanous     {ReadingType::Barometric, "Barometric"},
1440ec8b83dSEd Tanous     {ReadingType::Altitude, "Altitude"},
1450ec8b83dSEd Tanous     {ReadingType::Percent, "Percent"},
1460ec8b83dSEd Tanous     {ReadingType::AbsoluteHumidity, "AbsoluteHumidity"},
147f263e09cSEd Tanous     {ReadingType::Heat, "Heat"},
1480ec8b83dSEd Tanous });
1490ec8b83dSEd Tanous 
1500ec8b83dSEd Tanous NLOHMANN_JSON_SERIALIZE_ENUM(ImplementationType, {
1510ec8b83dSEd Tanous     {ImplementationType::Invalid, "Invalid"},
1520ec8b83dSEd Tanous     {ImplementationType::PhysicalSensor, "PhysicalSensor"},
1530ec8b83dSEd Tanous     {ImplementationType::Synthesized, "Synthesized"},
1540ec8b83dSEd Tanous     {ImplementationType::Reported, "Reported"},
1550ec8b83dSEd Tanous });
1560ec8b83dSEd Tanous 
157f263e09cSEd Tanous NLOHMANN_JSON_SERIALIZE_ENUM(ReadingBasisType, {
158f263e09cSEd Tanous     {ReadingBasisType::Invalid, "Invalid"},
159f263e09cSEd Tanous     {ReadingBasisType::Zero, "Zero"},
160f263e09cSEd Tanous     {ReadingBasisType::Delta, "Delta"},
161f263e09cSEd Tanous     {ReadingBasisType::Headroom, "Headroom"},
162f263e09cSEd Tanous });
163f263e09cSEd Tanous 
1640ec8b83dSEd Tanous }
1650ec8b83dSEd Tanous // clang-format on
166