xref: /openbmc/bmcweb/redfish-core/include/generated/enums/control.hpp (revision a08c3de2e9a788addf7c71fc2db1912e39a85d3b)
1 // SPDX-License-Identifier: Apache-2.0
2 // SPDX-FileCopyrightText: Copyright OpenBMC Authors
3 #pragma once
4 #include <nlohmann/json.hpp>
5 
6 namespace control
7 {
8 // clang-format off
9 
10 enum class ControlType{
11     Invalid,
12     Temperature,
13     Power,
14     Frequency,
15     FrequencyMHz,
16     Pressure,
17     PressurekPa,
18     Valve,
19     Percent,
20     DutyCycle,
21     LinearPosition,
22     LinearVelocity,
23     LinearAcceleration,
24     RotationalPosition,
25     RotationalVelocity,
26     RotationalAcceleration,
27     LiquidFlowLPM,
28 };
29 
30 enum class SetPointType{
31     Invalid,
32     Single,
33     Range,
34     Monitor,
35 };
36 
37 enum class ControlMode{
38     Invalid,
39     Automatic,
40     Override,
41     Manual,
42     Disabled,
43 };
44 
45 enum class ImplementationType{
46     Invalid,
47     Programmable,
48     Direct,
49     Monitored,
50 };
51 
52 NLOHMANN_JSON_SERIALIZE_ENUM(ControlType, {
53     {ControlType::Invalid, "Invalid"},
54     {ControlType::Temperature, "Temperature"},
55     {ControlType::Power, "Power"},
56     {ControlType::Frequency, "Frequency"},
57     {ControlType::FrequencyMHz, "FrequencyMHz"},
58     {ControlType::Pressure, "Pressure"},
59     {ControlType::PressurekPa, "PressurekPa"},
60     {ControlType::Valve, "Valve"},
61     {ControlType::Percent, "Percent"},
62     {ControlType::DutyCycle, "DutyCycle"},
63     {ControlType::LinearPosition, "LinearPosition"},
64     {ControlType::LinearVelocity, "LinearVelocity"},
65     {ControlType::LinearAcceleration, "LinearAcceleration"},
66     {ControlType::RotationalPosition, "RotationalPosition"},
67     {ControlType::RotationalVelocity, "RotationalVelocity"},
68     {ControlType::RotationalAcceleration, "RotationalAcceleration"},
69     {ControlType::LiquidFlowLPM, "LiquidFlowLPM"},
70 });
71 
72 NLOHMANN_JSON_SERIALIZE_ENUM(SetPointType, {
73     {SetPointType::Invalid, "Invalid"},
74     {SetPointType::Single, "Single"},
75     {SetPointType::Range, "Range"},
76     {SetPointType::Monitor, "Monitor"},
77 });
78 
79 NLOHMANN_JSON_SERIALIZE_ENUM(ControlMode, {
80     {ControlMode::Invalid, "Invalid"},
81     {ControlMode::Automatic, "Automatic"},
82     {ControlMode::Override, "Override"},
83     {ControlMode::Manual, "Manual"},
84     {ControlMode::Disabled, "Disabled"},
85 });
86 
87 NLOHMANN_JSON_SERIALIZE_ENUM(ImplementationType, {
88     {ImplementationType::Invalid, "Invalid"},
89     {ImplementationType::Programmable, "Programmable"},
90     {ImplementationType::Direct, "Direct"},
91     {ImplementationType::Monitored, "Monitored"},
92 });
93 
94 }
95 // clang-format on
96