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     Other,
31 };
32 
33 enum class IndicatorLED{
34     Invalid,
35     Unknown,
36     Lit,
37     Blinking,
38     Off,
39 };
40 
41 enum class IntrusionSensor{
42     Invalid,
43     Normal,
44     HardwareIntrusion,
45     TamperingDetected,
46 };
47 
48 enum class IntrusionSensorReArm{
49     Invalid,
50     Manual,
51     Automatic,
52 };
53 
54 enum class EnvironmentalClass{
55     Invalid,
56     A1,
57     A2,
58     A3,
59     A4,
60 };
61 
62 enum class ThermalDirection{
63     Invalid,
64     FrontToBack,
65     BackToFront,
66     TopExhaust,
67     Sealed,
68 };
69 
70 NLOHMANN_JSON_SERIALIZE_ENUM(ChassisType, {
71     {ChassisType::Invalid, "Invalid"},
72     {ChassisType::Rack, "Rack"},
73     {ChassisType::Blade, "Blade"},
74     {ChassisType::Enclosure, "Enclosure"},
75     {ChassisType::StandAlone, "StandAlone"},
76     {ChassisType::RackMount, "RackMount"},
77     {ChassisType::Card, "Card"},
78     {ChassisType::Cartridge, "Cartridge"},
79     {ChassisType::Row, "Row"},
80     {ChassisType::Pod, "Pod"},
81     {ChassisType::Expansion, "Expansion"},
82     {ChassisType::Sidecar, "Sidecar"},
83     {ChassisType::Zone, "Zone"},
84     {ChassisType::Sled, "Sled"},
85     {ChassisType::Shelf, "Shelf"},
86     {ChassisType::Drawer, "Drawer"},
87     {ChassisType::Module, "Module"},
88     {ChassisType::Component, "Component"},
89     {ChassisType::IPBasedDrive, "IPBasedDrive"},
90     {ChassisType::RackGroup, "RackGroup"},
91     {ChassisType::StorageEnclosure, "StorageEnclosure"},
92     {ChassisType::Other, "Other"},
93 });
94 
95 NLOHMANN_JSON_SERIALIZE_ENUM(IndicatorLED, {
96     {IndicatorLED::Invalid, "Invalid"},
97     {IndicatorLED::Unknown, "Unknown"},
98     {IndicatorLED::Lit, "Lit"},
99     {IndicatorLED::Blinking, "Blinking"},
100     {IndicatorLED::Off, "Off"},
101 });
102 
103 NLOHMANN_JSON_SERIALIZE_ENUM(IntrusionSensor, {
104     {IntrusionSensor::Invalid, "Invalid"},
105     {IntrusionSensor::Normal, "Normal"},
106     {IntrusionSensor::HardwareIntrusion, "HardwareIntrusion"},
107     {IntrusionSensor::TamperingDetected, "TamperingDetected"},
108 });
109 
110 NLOHMANN_JSON_SERIALIZE_ENUM(IntrusionSensorReArm, {
111     {IntrusionSensorReArm::Invalid, "Invalid"},
112     {IntrusionSensorReArm::Manual, "Manual"},
113     {IntrusionSensorReArm::Automatic, "Automatic"},
114 });
115 
116 NLOHMANN_JSON_SERIALIZE_ENUM(EnvironmentalClass, {
117     {EnvironmentalClass::Invalid, "Invalid"},
118     {EnvironmentalClass::A1, "A1"},
119     {EnvironmentalClass::A2, "A2"},
120     {EnvironmentalClass::A3, "A3"},
121     {EnvironmentalClass::A4, "A4"},
122 });
123 
124 NLOHMANN_JSON_SERIALIZE_ENUM(ThermalDirection, {
125     {ThermalDirection::Invalid, "Invalid"},
126     {ThermalDirection::FrontToBack, "FrontToBack"},
127     {ThermalDirection::BackToFront, "BackToFront"},
128     {ThermalDirection::TopExhaust, "TopExhaust"},
129     {ThermalDirection::Sealed, "Sealed"},
130 });
131 
132 }
133 // clang-format on
134