1 #pragma once
2 #include <nlohmann/json.hpp>
3 
4 namespace outlet
5 {
6 // clang-format off
7 
8 enum class PowerState{
9     Invalid,
10     On,
11     Off,
12     PowerCycle,
13 };
14 
15 enum class ReceptacleType{
16     Invalid,
17     NEMA_5_15R,
18     NEMA_5_20R,
19     NEMA_L5_20R,
20     NEMA_L5_30R,
21     NEMA_L6_20R,
22     NEMA_L6_30R,
23     IEC_60320_C13,
24     IEC_60320_C19,
25     CEE_7_Type_E,
26     CEE_7_Type_F,
27     SEV_1011_TYPE_12,
28     SEV_1011_TYPE_23,
29     BS_1363_Type_G,
30     BusConnection,
31 };
32 
33 enum class VoltageType{
34     Invalid,
35     AC,
36     DC,
37 };
38 
39 NLOHMANN_JSON_SERIALIZE_ENUM(PowerState, {
40     {PowerState::Invalid, "Invalid"},
41     {PowerState::On, "On"},
42     {PowerState::Off, "Off"},
43     {PowerState::PowerCycle, "PowerCycle"},
44 });
45 
46 NLOHMANN_JSON_SERIALIZE_ENUM(ReceptacleType, {
47     {ReceptacleType::Invalid, "Invalid"},
48     {ReceptacleType::NEMA_5_15R, "NEMA_5_15R"},
49     {ReceptacleType::NEMA_5_20R, "NEMA_5_20R"},
50     {ReceptacleType::NEMA_L5_20R, "NEMA_L5_20R"},
51     {ReceptacleType::NEMA_L5_30R, "NEMA_L5_30R"},
52     {ReceptacleType::NEMA_L6_20R, "NEMA_L6_20R"},
53     {ReceptacleType::NEMA_L6_30R, "NEMA_L6_30R"},
54     {ReceptacleType::IEC_60320_C13, "IEC_60320_C13"},
55     {ReceptacleType::IEC_60320_C19, "IEC_60320_C19"},
56     {ReceptacleType::CEE_7_Type_E, "CEE_7_Type_E"},
57     {ReceptacleType::CEE_7_Type_F, "CEE_7_Type_F"},
58     {ReceptacleType::SEV_1011_TYPE_12, "SEV_1011_TYPE_12"},
59     {ReceptacleType::SEV_1011_TYPE_23, "SEV_1011_TYPE_23"},
60     {ReceptacleType::BS_1363_Type_G, "BS_1363_Type_G"},
61     {ReceptacleType::BusConnection, "BusConnection"},
62 });
63 
64 NLOHMANN_JSON_SERIALIZE_ENUM(VoltageType, {
65     {VoltageType::Invalid, "Invalid"},
66     {VoltageType::AC, "AC"},
67     {VoltageType::DC, "DC"},
68 });
69 
70 }
71 // clang-format on
72