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