1*0ec8b83dSEd Tanous #pragma once 2*0ec8b83dSEd Tanous #include <nlohmann/json.hpp> 3*0ec8b83dSEd Tanous 4*0ec8b83dSEd Tanous namespace power 5*0ec8b83dSEd Tanous { 6*0ec8b83dSEd Tanous // clang-format off 7*0ec8b83dSEd Tanous 8*0ec8b83dSEd Tanous enum class PowerLimitException{ 9*0ec8b83dSEd Tanous Invalid, 10*0ec8b83dSEd Tanous NoAction, 11*0ec8b83dSEd Tanous HardPowerOff, 12*0ec8b83dSEd Tanous LogEventOnly, 13*0ec8b83dSEd Tanous Oem, 14*0ec8b83dSEd Tanous }; 15*0ec8b83dSEd Tanous 16*0ec8b83dSEd Tanous enum class PowerSupplyType{ 17*0ec8b83dSEd Tanous Invalid, 18*0ec8b83dSEd Tanous Unknown, 19*0ec8b83dSEd Tanous AC, 20*0ec8b83dSEd Tanous DC, 21*0ec8b83dSEd Tanous ACorDC, 22*0ec8b83dSEd Tanous }; 23*0ec8b83dSEd Tanous 24*0ec8b83dSEd Tanous enum class LineInputVoltageType{ 25*0ec8b83dSEd Tanous Invalid, 26*0ec8b83dSEd Tanous Unknown, 27*0ec8b83dSEd Tanous ACLowLine, 28*0ec8b83dSEd Tanous ACMidLine, 29*0ec8b83dSEd Tanous ACHighLine, 30*0ec8b83dSEd Tanous DCNeg48V, 31*0ec8b83dSEd Tanous DC380V, 32*0ec8b83dSEd Tanous AC120V, 33*0ec8b83dSEd Tanous AC240V, 34*0ec8b83dSEd Tanous AC277V, 35*0ec8b83dSEd Tanous ACandDCWideRange, 36*0ec8b83dSEd Tanous ACWideRange, 37*0ec8b83dSEd Tanous DC240V, 38*0ec8b83dSEd Tanous }; 39*0ec8b83dSEd Tanous 40*0ec8b83dSEd Tanous enum class InputType{ 41*0ec8b83dSEd Tanous Invalid, 42*0ec8b83dSEd Tanous AC, 43*0ec8b83dSEd Tanous DC, 44*0ec8b83dSEd Tanous }; 45*0ec8b83dSEd Tanous 46*0ec8b83dSEd Tanous NLOHMANN_JSON_SERIALIZE_ENUM(PowerLimitException, { 47*0ec8b83dSEd Tanous {PowerLimitException::Invalid, "Invalid"}, 48*0ec8b83dSEd Tanous {PowerLimitException::NoAction, "NoAction"}, 49*0ec8b83dSEd Tanous {PowerLimitException::HardPowerOff, "HardPowerOff"}, 50*0ec8b83dSEd Tanous {PowerLimitException::LogEventOnly, "LogEventOnly"}, 51*0ec8b83dSEd Tanous {PowerLimitException::Oem, "Oem"}, 52*0ec8b83dSEd Tanous }); 53*0ec8b83dSEd Tanous 54*0ec8b83dSEd Tanous NLOHMANN_JSON_SERIALIZE_ENUM(PowerSupplyType, { 55*0ec8b83dSEd Tanous {PowerSupplyType::Invalid, "Invalid"}, 56*0ec8b83dSEd Tanous {PowerSupplyType::Unknown, "Unknown"}, 57*0ec8b83dSEd Tanous {PowerSupplyType::AC, "AC"}, 58*0ec8b83dSEd Tanous {PowerSupplyType::DC, "DC"}, 59*0ec8b83dSEd Tanous {PowerSupplyType::ACorDC, "ACorDC"}, 60*0ec8b83dSEd Tanous }); 61*0ec8b83dSEd Tanous 62*0ec8b83dSEd Tanous NLOHMANN_JSON_SERIALIZE_ENUM(LineInputVoltageType, { 63*0ec8b83dSEd Tanous {LineInputVoltageType::Invalid, "Invalid"}, 64*0ec8b83dSEd Tanous {LineInputVoltageType::Unknown, "Unknown"}, 65*0ec8b83dSEd Tanous {LineInputVoltageType::ACLowLine, "ACLowLine"}, 66*0ec8b83dSEd Tanous {LineInputVoltageType::ACMidLine, "ACMidLine"}, 67*0ec8b83dSEd Tanous {LineInputVoltageType::ACHighLine, "ACHighLine"}, 68*0ec8b83dSEd Tanous {LineInputVoltageType::DCNeg48V, "DCNeg48V"}, 69*0ec8b83dSEd Tanous {LineInputVoltageType::DC380V, "DC380V"}, 70*0ec8b83dSEd Tanous {LineInputVoltageType::AC120V, "AC120V"}, 71*0ec8b83dSEd Tanous {LineInputVoltageType::AC240V, "AC240V"}, 72*0ec8b83dSEd Tanous {LineInputVoltageType::AC277V, "AC277V"}, 73*0ec8b83dSEd Tanous {LineInputVoltageType::ACandDCWideRange, "ACandDCWideRange"}, 74*0ec8b83dSEd Tanous {LineInputVoltageType::ACWideRange, "ACWideRange"}, 75*0ec8b83dSEd Tanous {LineInputVoltageType::DC240V, "DC240V"}, 76*0ec8b83dSEd Tanous }); 77*0ec8b83dSEd Tanous 78*0ec8b83dSEd Tanous NLOHMANN_JSON_SERIALIZE_ENUM(InputType, { 79*0ec8b83dSEd Tanous {InputType::Invalid, "Invalid"}, 80*0ec8b83dSEd Tanous {InputType::AC, "AC"}, 81*0ec8b83dSEd Tanous {InputType::DC, "DC"}, 82*0ec8b83dSEd Tanous }); 83*0ec8b83dSEd Tanous 84*0ec8b83dSEd Tanous } 85*0ec8b83dSEd Tanous // clang-format on 86