xref: /openbmc/bmcweb/redfish-core/include/generated/enums/circuit.hpp (revision 40e9b92ec19acffb46f83a6e55b18974da5d708e)
1  // SPDX-License-Identifier: Apache-2.0
2  // SPDX-FileCopyrightText: Copyright OpenBMC Authors
3  #pragma once
4  #include <nlohmann/json.hpp>
5  
6  namespace circuit
7  {
8  // clang-format off
9  
10  enum class PowerState{
11      Invalid,
12      On,
13      Off,
14      PowerCycle,
15  };
16  
17  enum class BreakerStates{
18      Invalid,
19      Normal,
20      Tripped,
21      Off,
22  };
23  
24  enum class PowerRestorePolicyTypes{
25      Invalid,
26      AlwaysOn,
27      AlwaysOff,
28      LastState,
29  };
30  
31  enum class PhaseWiringType{
32      Invalid,
33      OnePhase3Wire,
34      TwoPhase3Wire,
35      OneOrTwoPhase3Wire,
36      TwoPhase4Wire,
37      ThreePhase4Wire,
38      ThreePhase5Wire,
39  };
40  
41  enum class NominalVoltageType{
42      Invalid,
43      AC100To127V,
44      AC100To240V,
45      AC100To277V,
46      AC120V,
47      AC200To240V,
48      AC200To277V,
49      AC208V,
50      AC230V,
51      AC240V,
52      AC240AndDC380V,
53      AC277V,
54      AC277AndDC380V,
55      AC400V,
56      AC480V,
57      DC48V,
58      DC240V,
59      DC380V,
60      DCNeg48V,
61      DC16V,
62      DC12V,
63      DC9V,
64      DC5V,
65      DC3_3V,
66      DC1_8V,
67  };
68  
69  enum class PlugType{
70      Invalid,
71      NEMA_5_15P,
72      NEMA_L5_15P,
73      NEMA_5_20P,
74      NEMA_L5_20P,
75      NEMA_L5_30P,
76      NEMA_6_15P,
77      NEMA_L6_15P,
78      NEMA_6_20P,
79      NEMA_L6_20P,
80      NEMA_L6_30P,
81      NEMA_L14_20P,
82      NEMA_L14_30P,
83      NEMA_L15_20P,
84      NEMA_L15_30P,
85      NEMA_L21_20P,
86      NEMA_L21_30P,
87      NEMA_L22_20P,
88      NEMA_L22_30P,
89      California_CS8265,
90      California_CS8365,
91      IEC_60320_C14,
92      IEC_60320_C20,
93      IEC_60309_316P6,
94      IEC_60309_332P6,
95      IEC_60309_363P6,
96      IEC_60309_516P6,
97      IEC_60309_532P6,
98      IEC_60309_563P6,
99      IEC_60309_460P9,
100      IEC_60309_560P9,
101      Field_208V_3P4W_60A,
102      Field_400V_3P5W_32A,
103  };
104  
105  enum class CircuitType{
106      Invalid,
107      Mains,
108      Branch,
109      Subfeed,
110      Feeder,
111      Bus,
112  };
113  
114  enum class VoltageType{
115      Invalid,
116      AC,
117      DC,
118  };
119  
120  NLOHMANN_JSON_SERIALIZE_ENUM(PowerState, {
121      {PowerState::Invalid, "Invalid"},
122      {PowerState::On, "On"},
123      {PowerState::Off, "Off"},
124      {PowerState::PowerCycle, "PowerCycle"},
125  });
126  
127  NLOHMANN_JSON_SERIALIZE_ENUM(BreakerStates, {
128      {BreakerStates::Invalid, "Invalid"},
129      {BreakerStates::Normal, "Normal"},
130      {BreakerStates::Tripped, "Tripped"},
131      {BreakerStates::Off, "Off"},
132  });
133  
134  NLOHMANN_JSON_SERIALIZE_ENUM(PowerRestorePolicyTypes, {
135      {PowerRestorePolicyTypes::Invalid, "Invalid"},
136      {PowerRestorePolicyTypes::AlwaysOn, "AlwaysOn"},
137      {PowerRestorePolicyTypes::AlwaysOff, "AlwaysOff"},
138      {PowerRestorePolicyTypes::LastState, "LastState"},
139  });
140  
141  NLOHMANN_JSON_SERIALIZE_ENUM(PhaseWiringType, {
142      {PhaseWiringType::Invalid, "Invalid"},
143      {PhaseWiringType::OnePhase3Wire, "OnePhase3Wire"},
144      {PhaseWiringType::TwoPhase3Wire, "TwoPhase3Wire"},
145      {PhaseWiringType::OneOrTwoPhase3Wire, "OneOrTwoPhase3Wire"},
146      {PhaseWiringType::TwoPhase4Wire, "TwoPhase4Wire"},
147      {PhaseWiringType::ThreePhase4Wire, "ThreePhase4Wire"},
148      {PhaseWiringType::ThreePhase5Wire, "ThreePhase5Wire"},
149  });
150  
151  NLOHMANN_JSON_SERIALIZE_ENUM(NominalVoltageType, {
152      {NominalVoltageType::Invalid, "Invalid"},
153      {NominalVoltageType::AC100To127V, "AC100To127V"},
154      {NominalVoltageType::AC100To240V, "AC100To240V"},
155      {NominalVoltageType::AC100To277V, "AC100To277V"},
156      {NominalVoltageType::AC120V, "AC120V"},
157      {NominalVoltageType::AC200To240V, "AC200To240V"},
158      {NominalVoltageType::AC200To277V, "AC200To277V"},
159      {NominalVoltageType::AC208V, "AC208V"},
160      {NominalVoltageType::AC230V, "AC230V"},
161      {NominalVoltageType::AC240V, "AC240V"},
162      {NominalVoltageType::AC240AndDC380V, "AC240AndDC380V"},
163      {NominalVoltageType::AC277V, "AC277V"},
164      {NominalVoltageType::AC277AndDC380V, "AC277AndDC380V"},
165      {NominalVoltageType::AC400V, "AC400V"},
166      {NominalVoltageType::AC480V, "AC480V"},
167      {NominalVoltageType::DC48V, "DC48V"},
168      {NominalVoltageType::DC240V, "DC240V"},
169      {NominalVoltageType::DC380V, "DC380V"},
170      {NominalVoltageType::DCNeg48V, "DCNeg48V"},
171      {NominalVoltageType::DC16V, "DC16V"},
172      {NominalVoltageType::DC12V, "DC12V"},
173      {NominalVoltageType::DC9V, "DC9V"},
174      {NominalVoltageType::DC5V, "DC5V"},
175      {NominalVoltageType::DC3_3V, "DC3_3V"},
176      {NominalVoltageType::DC1_8V, "DC1_8V"},
177  });
178  
179  NLOHMANN_JSON_SERIALIZE_ENUM(PlugType, {
180      {PlugType::Invalid, "Invalid"},
181      {PlugType::NEMA_5_15P, "NEMA_5_15P"},
182      {PlugType::NEMA_L5_15P, "NEMA_L5_15P"},
183      {PlugType::NEMA_5_20P, "NEMA_5_20P"},
184      {PlugType::NEMA_L5_20P, "NEMA_L5_20P"},
185      {PlugType::NEMA_L5_30P, "NEMA_L5_30P"},
186      {PlugType::NEMA_6_15P, "NEMA_6_15P"},
187      {PlugType::NEMA_L6_15P, "NEMA_L6_15P"},
188      {PlugType::NEMA_6_20P, "NEMA_6_20P"},
189      {PlugType::NEMA_L6_20P, "NEMA_L6_20P"},
190      {PlugType::NEMA_L6_30P, "NEMA_L6_30P"},
191      {PlugType::NEMA_L14_20P, "NEMA_L14_20P"},
192      {PlugType::NEMA_L14_30P, "NEMA_L14_30P"},
193      {PlugType::NEMA_L15_20P, "NEMA_L15_20P"},
194      {PlugType::NEMA_L15_30P, "NEMA_L15_30P"},
195      {PlugType::NEMA_L21_20P, "NEMA_L21_20P"},
196      {PlugType::NEMA_L21_30P, "NEMA_L21_30P"},
197      {PlugType::NEMA_L22_20P, "NEMA_L22_20P"},
198      {PlugType::NEMA_L22_30P, "NEMA_L22_30P"},
199      {PlugType::California_CS8265, "California_CS8265"},
200      {PlugType::California_CS8365, "California_CS8365"},
201      {PlugType::IEC_60320_C14, "IEC_60320_C14"},
202      {PlugType::IEC_60320_C20, "IEC_60320_C20"},
203      {PlugType::IEC_60309_316P6, "IEC_60309_316P6"},
204      {PlugType::IEC_60309_332P6, "IEC_60309_332P6"},
205      {PlugType::IEC_60309_363P6, "IEC_60309_363P6"},
206      {PlugType::IEC_60309_516P6, "IEC_60309_516P6"},
207      {PlugType::IEC_60309_532P6, "IEC_60309_532P6"},
208      {PlugType::IEC_60309_563P6, "IEC_60309_563P6"},
209      {PlugType::IEC_60309_460P9, "IEC_60309_460P9"},
210      {PlugType::IEC_60309_560P9, "IEC_60309_560P9"},
211      {PlugType::Field_208V_3P4W_60A, "Field_208V_3P4W_60A"},
212      {PlugType::Field_400V_3P5W_32A, "Field_400V_3P5W_32A"},
213  });
214  
215  NLOHMANN_JSON_SERIALIZE_ENUM(CircuitType, {
216      {CircuitType::Invalid, "Invalid"},
217      {CircuitType::Mains, "Mains"},
218      {CircuitType::Branch, "Branch"},
219      {CircuitType::Subfeed, "Subfeed"},
220      {CircuitType::Feeder, "Feeder"},
221      {CircuitType::Bus, "Bus"},
222  });
223  
224  NLOHMANN_JSON_SERIALIZE_ENUM(VoltageType, {
225      {VoltageType::Invalid, "Invalid"},
226      {VoltageType::AC, "AC"},
227      {VoltageType::DC, "DC"},
228  });
229  
230  }
231  // clang-format on
232