10ec8b83dSEd Tanous #pragma once 20ec8b83dSEd Tanous #include <nlohmann/json.hpp> 30ec8b83dSEd Tanous 40ec8b83dSEd Tanous namespace chassis 50ec8b83dSEd Tanous { 60ec8b83dSEd Tanous // clang-format off 70ec8b83dSEd Tanous 80ec8b83dSEd Tanous enum class ChassisType{ 90ec8b83dSEd Tanous Invalid, 100ec8b83dSEd Tanous Rack, 110ec8b83dSEd Tanous Blade, 120ec8b83dSEd Tanous Enclosure, 130ec8b83dSEd Tanous StandAlone, 140ec8b83dSEd Tanous RackMount, 150ec8b83dSEd Tanous Card, 160ec8b83dSEd Tanous Cartridge, 170ec8b83dSEd Tanous Row, 180ec8b83dSEd Tanous Pod, 190ec8b83dSEd Tanous Expansion, 200ec8b83dSEd Tanous Sidecar, 210ec8b83dSEd Tanous Zone, 220ec8b83dSEd Tanous Sled, 230ec8b83dSEd Tanous Shelf, 240ec8b83dSEd Tanous Drawer, 250ec8b83dSEd Tanous Module, 260ec8b83dSEd Tanous Component, 270ec8b83dSEd Tanous IPBasedDrive, 280ec8b83dSEd Tanous RackGroup, 290ec8b83dSEd Tanous StorageEnclosure, 30f263e09cSEd Tanous ImmersionTank, 31f263e09cSEd Tanous HeatExchanger, 32*2ae81db9SGunnar Mills PowerStrip, 330ec8b83dSEd Tanous Other, 340ec8b83dSEd Tanous }; 350ec8b83dSEd Tanous 360ec8b83dSEd Tanous enum class IndicatorLED{ 370ec8b83dSEd Tanous Invalid, 380ec8b83dSEd Tanous Unknown, 390ec8b83dSEd Tanous Lit, 400ec8b83dSEd Tanous Blinking, 410ec8b83dSEd Tanous Off, 420ec8b83dSEd Tanous }; 430ec8b83dSEd Tanous 440ec8b83dSEd Tanous enum class IntrusionSensor{ 450ec8b83dSEd Tanous Invalid, 460ec8b83dSEd Tanous Normal, 470ec8b83dSEd Tanous HardwareIntrusion, 480ec8b83dSEd Tanous TamperingDetected, 490ec8b83dSEd Tanous }; 500ec8b83dSEd Tanous 510ec8b83dSEd Tanous enum class IntrusionSensorReArm{ 520ec8b83dSEd Tanous Invalid, 530ec8b83dSEd Tanous Manual, 540ec8b83dSEd Tanous Automatic, 550ec8b83dSEd Tanous }; 560ec8b83dSEd Tanous 570ec8b83dSEd Tanous enum class EnvironmentalClass{ 580ec8b83dSEd Tanous Invalid, 590ec8b83dSEd Tanous A1, 600ec8b83dSEd Tanous A2, 610ec8b83dSEd Tanous A3, 620ec8b83dSEd Tanous A4, 630ec8b83dSEd Tanous }; 640ec8b83dSEd Tanous 650ec8b83dSEd Tanous enum class ThermalDirection{ 660ec8b83dSEd Tanous Invalid, 670ec8b83dSEd Tanous FrontToBack, 680ec8b83dSEd Tanous BackToFront, 690ec8b83dSEd Tanous TopExhaust, 700ec8b83dSEd Tanous Sealed, 710ec8b83dSEd Tanous }; 720ec8b83dSEd Tanous 73e9cc1bc9SEd Tanous enum class DoorState{ 74e9cc1bc9SEd Tanous Invalid, 75e9cc1bc9SEd Tanous Locked, 76e9cc1bc9SEd Tanous Closed, 77e9cc1bc9SEd Tanous LockedAndOpen, 78e9cc1bc9SEd Tanous Open, 79e9cc1bc9SEd Tanous }; 80e9cc1bc9SEd Tanous 810ec8b83dSEd Tanous NLOHMANN_JSON_SERIALIZE_ENUM(ChassisType, { 820ec8b83dSEd Tanous {ChassisType::Invalid, "Invalid"}, 830ec8b83dSEd Tanous {ChassisType::Rack, "Rack"}, 840ec8b83dSEd Tanous {ChassisType::Blade, "Blade"}, 850ec8b83dSEd Tanous {ChassisType::Enclosure, "Enclosure"}, 860ec8b83dSEd Tanous {ChassisType::StandAlone, "StandAlone"}, 870ec8b83dSEd Tanous {ChassisType::RackMount, "RackMount"}, 880ec8b83dSEd Tanous {ChassisType::Card, "Card"}, 890ec8b83dSEd Tanous {ChassisType::Cartridge, "Cartridge"}, 900ec8b83dSEd Tanous {ChassisType::Row, "Row"}, 910ec8b83dSEd Tanous {ChassisType::Pod, "Pod"}, 920ec8b83dSEd Tanous {ChassisType::Expansion, "Expansion"}, 930ec8b83dSEd Tanous {ChassisType::Sidecar, "Sidecar"}, 940ec8b83dSEd Tanous {ChassisType::Zone, "Zone"}, 950ec8b83dSEd Tanous {ChassisType::Sled, "Sled"}, 960ec8b83dSEd Tanous {ChassisType::Shelf, "Shelf"}, 970ec8b83dSEd Tanous {ChassisType::Drawer, "Drawer"}, 980ec8b83dSEd Tanous {ChassisType::Module, "Module"}, 990ec8b83dSEd Tanous {ChassisType::Component, "Component"}, 1000ec8b83dSEd Tanous {ChassisType::IPBasedDrive, "IPBasedDrive"}, 1010ec8b83dSEd Tanous {ChassisType::RackGroup, "RackGroup"}, 1020ec8b83dSEd Tanous {ChassisType::StorageEnclosure, "StorageEnclosure"}, 103f263e09cSEd Tanous {ChassisType::ImmersionTank, "ImmersionTank"}, 104f263e09cSEd Tanous {ChassisType::HeatExchanger, "HeatExchanger"}, 105*2ae81db9SGunnar Mills {ChassisType::PowerStrip, "PowerStrip"}, 1060ec8b83dSEd Tanous {ChassisType::Other, "Other"}, 1070ec8b83dSEd Tanous }); 1080ec8b83dSEd Tanous 1090ec8b83dSEd Tanous NLOHMANN_JSON_SERIALIZE_ENUM(IndicatorLED, { 1100ec8b83dSEd Tanous {IndicatorLED::Invalid, "Invalid"}, 1110ec8b83dSEd Tanous {IndicatorLED::Unknown, "Unknown"}, 1120ec8b83dSEd Tanous {IndicatorLED::Lit, "Lit"}, 1130ec8b83dSEd Tanous {IndicatorLED::Blinking, "Blinking"}, 1140ec8b83dSEd Tanous {IndicatorLED::Off, "Off"}, 1150ec8b83dSEd Tanous }); 1160ec8b83dSEd Tanous 1170ec8b83dSEd Tanous NLOHMANN_JSON_SERIALIZE_ENUM(IntrusionSensor, { 1180ec8b83dSEd Tanous {IntrusionSensor::Invalid, "Invalid"}, 1190ec8b83dSEd Tanous {IntrusionSensor::Normal, "Normal"}, 1200ec8b83dSEd Tanous {IntrusionSensor::HardwareIntrusion, "HardwareIntrusion"}, 1210ec8b83dSEd Tanous {IntrusionSensor::TamperingDetected, "TamperingDetected"}, 1220ec8b83dSEd Tanous }); 1230ec8b83dSEd Tanous 1240ec8b83dSEd Tanous NLOHMANN_JSON_SERIALIZE_ENUM(IntrusionSensorReArm, { 1250ec8b83dSEd Tanous {IntrusionSensorReArm::Invalid, "Invalid"}, 1260ec8b83dSEd Tanous {IntrusionSensorReArm::Manual, "Manual"}, 1270ec8b83dSEd Tanous {IntrusionSensorReArm::Automatic, "Automatic"}, 1280ec8b83dSEd Tanous }); 1290ec8b83dSEd Tanous 1300ec8b83dSEd Tanous NLOHMANN_JSON_SERIALIZE_ENUM(EnvironmentalClass, { 1310ec8b83dSEd Tanous {EnvironmentalClass::Invalid, "Invalid"}, 1320ec8b83dSEd Tanous {EnvironmentalClass::A1, "A1"}, 1330ec8b83dSEd Tanous {EnvironmentalClass::A2, "A2"}, 1340ec8b83dSEd Tanous {EnvironmentalClass::A3, "A3"}, 1350ec8b83dSEd Tanous {EnvironmentalClass::A4, "A4"}, 1360ec8b83dSEd Tanous }); 1370ec8b83dSEd Tanous 1380ec8b83dSEd Tanous NLOHMANN_JSON_SERIALIZE_ENUM(ThermalDirection, { 1390ec8b83dSEd Tanous {ThermalDirection::Invalid, "Invalid"}, 1400ec8b83dSEd Tanous {ThermalDirection::FrontToBack, "FrontToBack"}, 1410ec8b83dSEd Tanous {ThermalDirection::BackToFront, "BackToFront"}, 1420ec8b83dSEd Tanous {ThermalDirection::TopExhaust, "TopExhaust"}, 1430ec8b83dSEd Tanous {ThermalDirection::Sealed, "Sealed"}, 1440ec8b83dSEd Tanous }); 1450ec8b83dSEd Tanous 146e9cc1bc9SEd Tanous NLOHMANN_JSON_SERIALIZE_ENUM(DoorState, { 147e9cc1bc9SEd Tanous {DoorState::Invalid, "Invalid"}, 148e9cc1bc9SEd Tanous {DoorState::Locked, "Locked"}, 149e9cc1bc9SEd Tanous {DoorState::Closed, "Closed"}, 150e9cc1bc9SEd Tanous {DoorState::LockedAndOpen, "LockedAndOpen"}, 151e9cc1bc9SEd Tanous {DoorState::Open, "Open"}, 152e9cc1bc9SEd Tanous }); 153e9cc1bc9SEd Tanous 1540ec8b83dSEd Tanous } 1550ec8b83dSEd Tanous // clang-format on 156