1 #pragma once
2 #include <nlohmann/json.hpp>
3 
4 namespace control
5 {
6 // clang-format off
7 
8 enum class ControlType{
9     Invalid,
10     Temperature,
11     Power,
12     Frequency,
13     FrequencyMHz,
14     Pressure,
15     PressurekPa,
16     Valve,
17     Percent,
18     DutyCycle,
19 };
20 
21 enum class SetPointType{
22     Invalid,
23     Single,
24     Range,
25 };
26 
27 enum class ControlMode{
28     Invalid,
29     Automatic,
30     Override,
31     Manual,
32     Disabled,
33 };
34 
35 enum class ImplementationType{
36     Invalid,
37     Programmable,
38     Direct,
39     Monitored,
40 };
41 
42 NLOHMANN_JSON_SERIALIZE_ENUM(ControlType, {
43     {ControlType::Invalid, "Invalid"},
44     {ControlType::Temperature, "Temperature"},
45     {ControlType::Power, "Power"},
46     {ControlType::Frequency, "Frequency"},
47     {ControlType::FrequencyMHz, "FrequencyMHz"},
48     {ControlType::Pressure, "Pressure"},
49     {ControlType::PressurekPa, "PressurekPa"},
50     {ControlType::Valve, "Valve"},
51     {ControlType::Percent, "Percent"},
52     {ControlType::DutyCycle, "DutyCycle"},
53 });
54 
55 NLOHMANN_JSON_SERIALIZE_ENUM(SetPointType, {
56     {SetPointType::Invalid, "Invalid"},
57     {SetPointType::Single, "Single"},
58     {SetPointType::Range, "Range"},
59 });
60 
61 NLOHMANN_JSON_SERIALIZE_ENUM(ControlMode, {
62     {ControlMode::Invalid, "Invalid"},
63     {ControlMode::Automatic, "Automatic"},
64     {ControlMode::Override, "Override"},
65     {ControlMode::Manual, "Manual"},
66     {ControlMode::Disabled, "Disabled"},
67 });
68 
69 NLOHMANN_JSON_SERIALIZE_ENUM(ImplementationType, {
70     {ImplementationType::Invalid, "Invalid"},
71     {ImplementationType::Programmable, "Programmable"},
72     {ImplementationType::Direct, "Direct"},
73     {ImplementationType::Monitored, "Monitored"},
74 });
75 
76 }
77 // clang-format on
78