xref: /openbmc/bmcweb/features/redfish/include/generated/enums/sensor.hpp (revision f263e09c81b798bcf123df8fb144499389e9cbd1)
10ec8b83dSEd Tanous #pragma once
20ec8b83dSEd Tanous #include <nlohmann/json.hpp>
30ec8b83dSEd Tanous 
40ec8b83dSEd Tanous namespace sensor
50ec8b83dSEd Tanous {
60ec8b83dSEd Tanous // clang-format off
70ec8b83dSEd Tanous 
80ec8b83dSEd Tanous enum class VoltageType{
90ec8b83dSEd Tanous     Invalid,
100ec8b83dSEd Tanous     AC,
110ec8b83dSEd Tanous     DC,
120ec8b83dSEd Tanous };
130ec8b83dSEd Tanous 
140ec8b83dSEd Tanous enum class ElectricalContext{
150ec8b83dSEd Tanous     Invalid,
160ec8b83dSEd Tanous     Line1,
170ec8b83dSEd Tanous     Line2,
180ec8b83dSEd Tanous     Line3,
190ec8b83dSEd Tanous     Neutral,
200ec8b83dSEd Tanous     LineToLine,
210ec8b83dSEd Tanous     Line1ToLine2,
220ec8b83dSEd Tanous     Line2ToLine3,
230ec8b83dSEd Tanous     Line3ToLine1,
240ec8b83dSEd Tanous     LineToNeutral,
250ec8b83dSEd Tanous     Line1ToNeutral,
260ec8b83dSEd Tanous     Line2ToNeutral,
270ec8b83dSEd Tanous     Line3ToNeutral,
280ec8b83dSEd Tanous     Line1ToNeutralAndL1L2,
290ec8b83dSEd Tanous     Line2ToNeutralAndL1L2,
300ec8b83dSEd Tanous     Line2ToNeutralAndL2L3,
310ec8b83dSEd Tanous     Line3ToNeutralAndL3L1,
320ec8b83dSEd Tanous     Total,
330ec8b83dSEd Tanous };
340ec8b83dSEd Tanous 
350ec8b83dSEd Tanous enum class ThresholdActivation{
360ec8b83dSEd Tanous     Invalid,
370ec8b83dSEd Tanous     Increasing,
380ec8b83dSEd Tanous     Decreasing,
390ec8b83dSEd Tanous     Either,
40*f263e09cSEd Tanous     Disabled,
410ec8b83dSEd Tanous };
420ec8b83dSEd Tanous 
430ec8b83dSEd Tanous enum class ReadingType{
440ec8b83dSEd Tanous     Invalid,
450ec8b83dSEd Tanous     Temperature,
460ec8b83dSEd Tanous     Humidity,
470ec8b83dSEd Tanous     Power,
480ec8b83dSEd Tanous     EnergykWh,
490ec8b83dSEd Tanous     EnergyJoules,
500ec8b83dSEd Tanous     EnergyWh,
510ec8b83dSEd Tanous     ChargeAh,
520ec8b83dSEd Tanous     Voltage,
530ec8b83dSEd Tanous     Current,
540ec8b83dSEd Tanous     Frequency,
550ec8b83dSEd Tanous     Pressure,
560ec8b83dSEd Tanous     PressurekPa,
57*f263e09cSEd Tanous     PressurePa,
580ec8b83dSEd Tanous     LiquidLevel,
590ec8b83dSEd Tanous     Rotational,
600ec8b83dSEd Tanous     AirFlow,
61*f263e09cSEd Tanous     AirFlowCMM,
620ec8b83dSEd Tanous     LiquidFlow,
63*f263e09cSEd Tanous     LiquidFlowLPM,
640ec8b83dSEd Tanous     Barometric,
650ec8b83dSEd Tanous     Altitude,
660ec8b83dSEd Tanous     Percent,
670ec8b83dSEd Tanous     AbsoluteHumidity,
68*f263e09cSEd Tanous     Heat,
690ec8b83dSEd Tanous };
700ec8b83dSEd Tanous 
710ec8b83dSEd Tanous enum class ImplementationType{
720ec8b83dSEd Tanous     Invalid,
730ec8b83dSEd Tanous     PhysicalSensor,
740ec8b83dSEd Tanous     Synthesized,
750ec8b83dSEd Tanous     Reported,
760ec8b83dSEd Tanous };
770ec8b83dSEd Tanous 
78*f263e09cSEd Tanous enum class ReadingBasisType{
79*f263e09cSEd Tanous     Invalid,
80*f263e09cSEd Tanous     Zero,
81*f263e09cSEd Tanous     Delta,
82*f263e09cSEd Tanous     Headroom,
83*f263e09cSEd Tanous };
84*f263e09cSEd Tanous 
850ec8b83dSEd Tanous NLOHMANN_JSON_SERIALIZE_ENUM(VoltageType, {
860ec8b83dSEd Tanous     {VoltageType::Invalid, "Invalid"},
870ec8b83dSEd Tanous     {VoltageType::AC, "AC"},
880ec8b83dSEd Tanous     {VoltageType::DC, "DC"},
890ec8b83dSEd Tanous });
900ec8b83dSEd Tanous 
910ec8b83dSEd Tanous NLOHMANN_JSON_SERIALIZE_ENUM(ElectricalContext, {
920ec8b83dSEd Tanous     {ElectricalContext::Invalid, "Invalid"},
930ec8b83dSEd Tanous     {ElectricalContext::Line1, "Line1"},
940ec8b83dSEd Tanous     {ElectricalContext::Line2, "Line2"},
950ec8b83dSEd Tanous     {ElectricalContext::Line3, "Line3"},
960ec8b83dSEd Tanous     {ElectricalContext::Neutral, "Neutral"},
970ec8b83dSEd Tanous     {ElectricalContext::LineToLine, "LineToLine"},
980ec8b83dSEd Tanous     {ElectricalContext::Line1ToLine2, "Line1ToLine2"},
990ec8b83dSEd Tanous     {ElectricalContext::Line2ToLine3, "Line2ToLine3"},
1000ec8b83dSEd Tanous     {ElectricalContext::Line3ToLine1, "Line3ToLine1"},
1010ec8b83dSEd Tanous     {ElectricalContext::LineToNeutral, "LineToNeutral"},
1020ec8b83dSEd Tanous     {ElectricalContext::Line1ToNeutral, "Line1ToNeutral"},
1030ec8b83dSEd Tanous     {ElectricalContext::Line2ToNeutral, "Line2ToNeutral"},
1040ec8b83dSEd Tanous     {ElectricalContext::Line3ToNeutral, "Line3ToNeutral"},
1050ec8b83dSEd Tanous     {ElectricalContext::Line1ToNeutralAndL1L2, "Line1ToNeutralAndL1L2"},
1060ec8b83dSEd Tanous     {ElectricalContext::Line2ToNeutralAndL1L2, "Line2ToNeutralAndL1L2"},
1070ec8b83dSEd Tanous     {ElectricalContext::Line2ToNeutralAndL2L3, "Line2ToNeutralAndL2L3"},
1080ec8b83dSEd Tanous     {ElectricalContext::Line3ToNeutralAndL3L1, "Line3ToNeutralAndL3L1"},
1090ec8b83dSEd Tanous     {ElectricalContext::Total, "Total"},
1100ec8b83dSEd Tanous });
1110ec8b83dSEd Tanous 
1120ec8b83dSEd Tanous NLOHMANN_JSON_SERIALIZE_ENUM(ThresholdActivation, {
1130ec8b83dSEd Tanous     {ThresholdActivation::Invalid, "Invalid"},
1140ec8b83dSEd Tanous     {ThresholdActivation::Increasing, "Increasing"},
1150ec8b83dSEd Tanous     {ThresholdActivation::Decreasing, "Decreasing"},
1160ec8b83dSEd Tanous     {ThresholdActivation::Either, "Either"},
117*f263e09cSEd Tanous     {ThresholdActivation::Disabled, "Disabled"},
1180ec8b83dSEd Tanous });
1190ec8b83dSEd Tanous 
1200ec8b83dSEd Tanous NLOHMANN_JSON_SERIALIZE_ENUM(ReadingType, {
1210ec8b83dSEd Tanous     {ReadingType::Invalid, "Invalid"},
1220ec8b83dSEd Tanous     {ReadingType::Temperature, "Temperature"},
1230ec8b83dSEd Tanous     {ReadingType::Humidity, "Humidity"},
1240ec8b83dSEd Tanous     {ReadingType::Power, "Power"},
1250ec8b83dSEd Tanous     {ReadingType::EnergykWh, "EnergykWh"},
1260ec8b83dSEd Tanous     {ReadingType::EnergyJoules, "EnergyJoules"},
1270ec8b83dSEd Tanous     {ReadingType::EnergyWh, "EnergyWh"},
1280ec8b83dSEd Tanous     {ReadingType::ChargeAh, "ChargeAh"},
1290ec8b83dSEd Tanous     {ReadingType::Voltage, "Voltage"},
1300ec8b83dSEd Tanous     {ReadingType::Current, "Current"},
1310ec8b83dSEd Tanous     {ReadingType::Frequency, "Frequency"},
1320ec8b83dSEd Tanous     {ReadingType::Pressure, "Pressure"},
1330ec8b83dSEd Tanous     {ReadingType::PressurekPa, "PressurekPa"},
134*f263e09cSEd Tanous     {ReadingType::PressurePa, "PressurePa"},
1350ec8b83dSEd Tanous     {ReadingType::LiquidLevel, "LiquidLevel"},
1360ec8b83dSEd Tanous     {ReadingType::Rotational, "Rotational"},
1370ec8b83dSEd Tanous     {ReadingType::AirFlow, "AirFlow"},
138*f263e09cSEd Tanous     {ReadingType::AirFlowCMM, "AirFlowCMM"},
1390ec8b83dSEd Tanous     {ReadingType::LiquidFlow, "LiquidFlow"},
140*f263e09cSEd Tanous     {ReadingType::LiquidFlowLPM, "LiquidFlowLPM"},
1410ec8b83dSEd Tanous     {ReadingType::Barometric, "Barometric"},
1420ec8b83dSEd Tanous     {ReadingType::Altitude, "Altitude"},
1430ec8b83dSEd Tanous     {ReadingType::Percent, "Percent"},
1440ec8b83dSEd Tanous     {ReadingType::AbsoluteHumidity, "AbsoluteHumidity"},
145*f263e09cSEd Tanous     {ReadingType::Heat, "Heat"},
1460ec8b83dSEd Tanous });
1470ec8b83dSEd Tanous 
1480ec8b83dSEd Tanous NLOHMANN_JSON_SERIALIZE_ENUM(ImplementationType, {
1490ec8b83dSEd Tanous     {ImplementationType::Invalid, "Invalid"},
1500ec8b83dSEd Tanous     {ImplementationType::PhysicalSensor, "PhysicalSensor"},
1510ec8b83dSEd Tanous     {ImplementationType::Synthesized, "Synthesized"},
1520ec8b83dSEd Tanous     {ImplementationType::Reported, "Reported"},
1530ec8b83dSEd Tanous });
1540ec8b83dSEd Tanous 
155*f263e09cSEd Tanous NLOHMANN_JSON_SERIALIZE_ENUM(ReadingBasisType, {
156*f263e09cSEd Tanous     {ReadingBasisType::Invalid, "Invalid"},
157*f263e09cSEd Tanous     {ReadingBasisType::Zero, "Zero"},
158*f263e09cSEd Tanous     {ReadingBasisType::Delta, "Delta"},
159*f263e09cSEd Tanous     {ReadingBasisType::Headroom, "Headroom"},
160*f263e09cSEd Tanous });
161*f263e09cSEd Tanous 
1620ec8b83dSEd Tanous }
1630ec8b83dSEd Tanous // clang-format on
164