1 #pragma once
2 #include <nlohmann/json.hpp>
3 
4 namespace power_supply
5 {
6 // clang-format off
7 
8 enum class PowerSupplyType{
9     Invalid,
10     AC,
11     DC,
12     ACorDC,
13     DCRegulator,
14 };
15 
16 enum class LineStatus{
17     Invalid,
18     Normal,
19     LossOfInput,
20     OutOfRange,
21 };
22 
23 NLOHMANN_JSON_SERIALIZE_ENUM(PowerSupplyType, {
24     {PowerSupplyType::Invalid, "Invalid"},
25     {PowerSupplyType::AC, "AC"},
26     {PowerSupplyType::DC, "DC"},
27     {PowerSupplyType::ACorDC, "ACorDC"},
28     {PowerSupplyType::DCRegulator, "DCRegulator"},
29 });
30 
31 NLOHMANN_JSON_SERIALIZE_ENUM(LineStatus, {
32     {LineStatus::Invalid, "Invalid"},
33     {LineStatus::Normal, "Normal"},
34     {LineStatus::LossOfInput, "LossOfInput"},
35     {LineStatus::OutOfRange, "OutOfRange"},
36 });
37 
38 }
39 // clang-format on
40