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, 320ec8b83dSEd Tanous Other, 330ec8b83dSEd Tanous }; 340ec8b83dSEd Tanous 350ec8b83dSEd Tanous enum class IndicatorLED{ 360ec8b83dSEd Tanous Invalid, 370ec8b83dSEd Tanous Unknown, 380ec8b83dSEd Tanous Lit, 390ec8b83dSEd Tanous Blinking, 400ec8b83dSEd Tanous Off, 410ec8b83dSEd Tanous }; 420ec8b83dSEd Tanous 430ec8b83dSEd Tanous enum class IntrusionSensor{ 440ec8b83dSEd Tanous Invalid, 450ec8b83dSEd Tanous Normal, 460ec8b83dSEd Tanous HardwareIntrusion, 470ec8b83dSEd Tanous TamperingDetected, 480ec8b83dSEd Tanous }; 490ec8b83dSEd Tanous 500ec8b83dSEd Tanous enum class IntrusionSensorReArm{ 510ec8b83dSEd Tanous Invalid, 520ec8b83dSEd Tanous Manual, 530ec8b83dSEd Tanous Automatic, 540ec8b83dSEd Tanous }; 550ec8b83dSEd Tanous 560ec8b83dSEd Tanous enum class EnvironmentalClass{ 570ec8b83dSEd Tanous Invalid, 580ec8b83dSEd Tanous A1, 590ec8b83dSEd Tanous A2, 600ec8b83dSEd Tanous A3, 610ec8b83dSEd Tanous A4, 620ec8b83dSEd Tanous }; 630ec8b83dSEd Tanous 640ec8b83dSEd Tanous enum class ThermalDirection{ 650ec8b83dSEd Tanous Invalid, 660ec8b83dSEd Tanous FrontToBack, 670ec8b83dSEd Tanous BackToFront, 680ec8b83dSEd Tanous TopExhaust, 690ec8b83dSEd Tanous Sealed, 700ec8b83dSEd Tanous }; 710ec8b83dSEd Tanous 72*e9cc1bc9SEd Tanous enum class DoorState{ 73*e9cc1bc9SEd Tanous Invalid, 74*e9cc1bc9SEd Tanous Locked, 75*e9cc1bc9SEd Tanous Closed, 76*e9cc1bc9SEd Tanous LockedAndOpen, 77*e9cc1bc9SEd Tanous Open, 78*e9cc1bc9SEd Tanous }; 79*e9cc1bc9SEd Tanous 800ec8b83dSEd Tanous NLOHMANN_JSON_SERIALIZE_ENUM(ChassisType, { 810ec8b83dSEd Tanous {ChassisType::Invalid, "Invalid"}, 820ec8b83dSEd Tanous {ChassisType::Rack, "Rack"}, 830ec8b83dSEd Tanous {ChassisType::Blade, "Blade"}, 840ec8b83dSEd Tanous {ChassisType::Enclosure, "Enclosure"}, 850ec8b83dSEd Tanous {ChassisType::StandAlone, "StandAlone"}, 860ec8b83dSEd Tanous {ChassisType::RackMount, "RackMount"}, 870ec8b83dSEd Tanous {ChassisType::Card, "Card"}, 880ec8b83dSEd Tanous {ChassisType::Cartridge, "Cartridge"}, 890ec8b83dSEd Tanous {ChassisType::Row, "Row"}, 900ec8b83dSEd Tanous {ChassisType::Pod, "Pod"}, 910ec8b83dSEd Tanous {ChassisType::Expansion, "Expansion"}, 920ec8b83dSEd Tanous {ChassisType::Sidecar, "Sidecar"}, 930ec8b83dSEd Tanous {ChassisType::Zone, "Zone"}, 940ec8b83dSEd Tanous {ChassisType::Sled, "Sled"}, 950ec8b83dSEd Tanous {ChassisType::Shelf, "Shelf"}, 960ec8b83dSEd Tanous {ChassisType::Drawer, "Drawer"}, 970ec8b83dSEd Tanous {ChassisType::Module, "Module"}, 980ec8b83dSEd Tanous {ChassisType::Component, "Component"}, 990ec8b83dSEd Tanous {ChassisType::IPBasedDrive, "IPBasedDrive"}, 1000ec8b83dSEd Tanous {ChassisType::RackGroup, "RackGroup"}, 1010ec8b83dSEd Tanous {ChassisType::StorageEnclosure, "StorageEnclosure"}, 102f263e09cSEd Tanous {ChassisType::ImmersionTank, "ImmersionTank"}, 103f263e09cSEd Tanous {ChassisType::HeatExchanger, "HeatExchanger"}, 1040ec8b83dSEd Tanous {ChassisType::Other, "Other"}, 1050ec8b83dSEd Tanous }); 1060ec8b83dSEd Tanous 1070ec8b83dSEd Tanous NLOHMANN_JSON_SERIALIZE_ENUM(IndicatorLED, { 1080ec8b83dSEd Tanous {IndicatorLED::Invalid, "Invalid"}, 1090ec8b83dSEd Tanous {IndicatorLED::Unknown, "Unknown"}, 1100ec8b83dSEd Tanous {IndicatorLED::Lit, "Lit"}, 1110ec8b83dSEd Tanous {IndicatorLED::Blinking, "Blinking"}, 1120ec8b83dSEd Tanous {IndicatorLED::Off, "Off"}, 1130ec8b83dSEd Tanous }); 1140ec8b83dSEd Tanous 1150ec8b83dSEd Tanous NLOHMANN_JSON_SERIALIZE_ENUM(IntrusionSensor, { 1160ec8b83dSEd Tanous {IntrusionSensor::Invalid, "Invalid"}, 1170ec8b83dSEd Tanous {IntrusionSensor::Normal, "Normal"}, 1180ec8b83dSEd Tanous {IntrusionSensor::HardwareIntrusion, "HardwareIntrusion"}, 1190ec8b83dSEd Tanous {IntrusionSensor::TamperingDetected, "TamperingDetected"}, 1200ec8b83dSEd Tanous }); 1210ec8b83dSEd Tanous 1220ec8b83dSEd Tanous NLOHMANN_JSON_SERIALIZE_ENUM(IntrusionSensorReArm, { 1230ec8b83dSEd Tanous {IntrusionSensorReArm::Invalid, "Invalid"}, 1240ec8b83dSEd Tanous {IntrusionSensorReArm::Manual, "Manual"}, 1250ec8b83dSEd Tanous {IntrusionSensorReArm::Automatic, "Automatic"}, 1260ec8b83dSEd Tanous }); 1270ec8b83dSEd Tanous 1280ec8b83dSEd Tanous NLOHMANN_JSON_SERIALIZE_ENUM(EnvironmentalClass, { 1290ec8b83dSEd Tanous {EnvironmentalClass::Invalid, "Invalid"}, 1300ec8b83dSEd Tanous {EnvironmentalClass::A1, "A1"}, 1310ec8b83dSEd Tanous {EnvironmentalClass::A2, "A2"}, 1320ec8b83dSEd Tanous {EnvironmentalClass::A3, "A3"}, 1330ec8b83dSEd Tanous {EnvironmentalClass::A4, "A4"}, 1340ec8b83dSEd Tanous }); 1350ec8b83dSEd Tanous 1360ec8b83dSEd Tanous NLOHMANN_JSON_SERIALIZE_ENUM(ThermalDirection, { 1370ec8b83dSEd Tanous {ThermalDirection::Invalid, "Invalid"}, 1380ec8b83dSEd Tanous {ThermalDirection::FrontToBack, "FrontToBack"}, 1390ec8b83dSEd Tanous {ThermalDirection::BackToFront, "BackToFront"}, 1400ec8b83dSEd Tanous {ThermalDirection::TopExhaust, "TopExhaust"}, 1410ec8b83dSEd Tanous {ThermalDirection::Sealed, "Sealed"}, 1420ec8b83dSEd Tanous }); 1430ec8b83dSEd Tanous 144*e9cc1bc9SEd Tanous NLOHMANN_JSON_SERIALIZE_ENUM(DoorState, { 145*e9cc1bc9SEd Tanous {DoorState::Invalid, "Invalid"}, 146*e9cc1bc9SEd Tanous {DoorState::Locked, "Locked"}, 147*e9cc1bc9SEd Tanous {DoorState::Closed, "Closed"}, 148*e9cc1bc9SEd Tanous {DoorState::LockedAndOpen, "LockedAndOpen"}, 149*e9cc1bc9SEd Tanous {DoorState::Open, "Open"}, 150*e9cc1bc9SEd Tanous }); 151*e9cc1bc9SEd Tanous 1520ec8b83dSEd Tanous } 1530ec8b83dSEd Tanous // clang-format on 154