1 #pragma once
2 #include <nlohmann/json.hpp>
3 
4 namespace chassis
5 {
6 // clang-format off
7 
8 enum class ChassisType{
9     Invalid,
10     Rack,
11     Blade,
12     Enclosure,
13     StandAlone,
14     RackMount,
15     Card,
16     Cartridge,
17     Row,
18     Pod,
19     Expansion,
20     Sidecar,
21     Zone,
22     Sled,
23     Shelf,
24     Drawer,
25     Module,
26     Component,
27     IPBasedDrive,
28     RackGroup,
29     StorageEnclosure,
30     ImmersionTank,
31     HeatExchanger,
32     Other,
33 };
34 
35 enum class IndicatorLED{
36     Invalid,
37     Unknown,
38     Lit,
39     Blinking,
40     Off,
41 };
42 
43 enum class IntrusionSensor{
44     Invalid,
45     Normal,
46     HardwareIntrusion,
47     TamperingDetected,
48 };
49 
50 enum class IntrusionSensorReArm{
51     Invalid,
52     Manual,
53     Automatic,
54 };
55 
56 enum class EnvironmentalClass{
57     Invalid,
58     A1,
59     A2,
60     A3,
61     A4,
62 };
63 
64 enum class ThermalDirection{
65     Invalid,
66     FrontToBack,
67     BackToFront,
68     TopExhaust,
69     Sealed,
70 };
71 
72 NLOHMANN_JSON_SERIALIZE_ENUM(ChassisType, {
73     {ChassisType::Invalid, "Invalid"},
74     {ChassisType::Rack, "Rack"},
75     {ChassisType::Blade, "Blade"},
76     {ChassisType::Enclosure, "Enclosure"},
77     {ChassisType::StandAlone, "StandAlone"},
78     {ChassisType::RackMount, "RackMount"},
79     {ChassisType::Card, "Card"},
80     {ChassisType::Cartridge, "Cartridge"},
81     {ChassisType::Row, "Row"},
82     {ChassisType::Pod, "Pod"},
83     {ChassisType::Expansion, "Expansion"},
84     {ChassisType::Sidecar, "Sidecar"},
85     {ChassisType::Zone, "Zone"},
86     {ChassisType::Sled, "Sled"},
87     {ChassisType::Shelf, "Shelf"},
88     {ChassisType::Drawer, "Drawer"},
89     {ChassisType::Module, "Module"},
90     {ChassisType::Component, "Component"},
91     {ChassisType::IPBasedDrive, "IPBasedDrive"},
92     {ChassisType::RackGroup, "RackGroup"},
93     {ChassisType::StorageEnclosure, "StorageEnclosure"},
94     {ChassisType::ImmersionTank, "ImmersionTank"},
95     {ChassisType::HeatExchanger, "HeatExchanger"},
96     {ChassisType::Other, "Other"},
97 });
98 
99 NLOHMANN_JSON_SERIALIZE_ENUM(IndicatorLED, {
100     {IndicatorLED::Invalid, "Invalid"},
101     {IndicatorLED::Unknown, "Unknown"},
102     {IndicatorLED::Lit, "Lit"},
103     {IndicatorLED::Blinking, "Blinking"},
104     {IndicatorLED::Off, "Off"},
105 });
106 
107 NLOHMANN_JSON_SERIALIZE_ENUM(IntrusionSensor, {
108     {IntrusionSensor::Invalid, "Invalid"},
109     {IntrusionSensor::Normal, "Normal"},
110     {IntrusionSensor::HardwareIntrusion, "HardwareIntrusion"},
111     {IntrusionSensor::TamperingDetected, "TamperingDetected"},
112 });
113 
114 NLOHMANN_JSON_SERIALIZE_ENUM(IntrusionSensorReArm, {
115     {IntrusionSensorReArm::Invalid, "Invalid"},
116     {IntrusionSensorReArm::Manual, "Manual"},
117     {IntrusionSensorReArm::Automatic, "Automatic"},
118 });
119 
120 NLOHMANN_JSON_SERIALIZE_ENUM(EnvironmentalClass, {
121     {EnvironmentalClass::Invalid, "Invalid"},
122     {EnvironmentalClass::A1, "A1"},
123     {EnvironmentalClass::A2, "A2"},
124     {EnvironmentalClass::A3, "A3"},
125     {EnvironmentalClass::A4, "A4"},
126 });
127 
128 NLOHMANN_JSON_SERIALIZE_ENUM(ThermalDirection, {
129     {ThermalDirection::Invalid, "Invalid"},
130     {ThermalDirection::FrontToBack, "FrontToBack"},
131     {ThermalDirection::BackToFront, "BackToFront"},
132     {ThermalDirection::TopExhaust, "TopExhaust"},
133     {ThermalDirection::Sealed, "Sealed"},
134 });
135 
136 }
137 // clang-format on
138