140e9b92eSEd Tanous // SPDX-License-Identifier: Apache-2.0 240e9b92eSEd Tanous // SPDX-FileCopyrightText: Copyright OpenBMC Authors 3853c0dc5SEd Tanous #pragma once 4853c0dc5SEd Tanous #include <nlohmann/json.hpp> 5853c0dc5SEd Tanous 6853c0dc5SEd Tanous namespace control 7853c0dc5SEd Tanous { 8853c0dc5SEd Tanous // clang-format off 9853c0dc5SEd Tanous 10853c0dc5SEd Tanous enum class ControlType{ 11853c0dc5SEd Tanous Invalid, 12853c0dc5SEd Tanous Temperature, 13853c0dc5SEd Tanous Power, 14853c0dc5SEd Tanous Frequency, 15853c0dc5SEd Tanous FrequencyMHz, 16853c0dc5SEd Tanous Pressure, 17f263e09cSEd Tanous PressurekPa, 18f263e09cSEd Tanous Valve, 192ae81db9SGunnar Mills Percent, 202ae81db9SGunnar Mills DutyCycle, 21*9b46bc0bSMyung Bae LiquidFlowLPM, 22853c0dc5SEd Tanous }; 23853c0dc5SEd Tanous 24853c0dc5SEd Tanous enum class SetPointType{ 25853c0dc5SEd Tanous Invalid, 26853c0dc5SEd Tanous Single, 27853c0dc5SEd Tanous Range, 28853c0dc5SEd Tanous }; 29853c0dc5SEd Tanous 30853c0dc5SEd Tanous enum class ControlMode{ 31853c0dc5SEd Tanous Invalid, 32853c0dc5SEd Tanous Automatic, 33853c0dc5SEd Tanous Override, 34853c0dc5SEd Tanous Manual, 35853c0dc5SEd Tanous Disabled, 36853c0dc5SEd Tanous }; 37853c0dc5SEd Tanous 38853c0dc5SEd Tanous enum class ImplementationType{ 39853c0dc5SEd Tanous Invalid, 40853c0dc5SEd Tanous Programmable, 41853c0dc5SEd Tanous Direct, 42853c0dc5SEd Tanous Monitored, 43853c0dc5SEd Tanous }; 44853c0dc5SEd Tanous 45853c0dc5SEd Tanous NLOHMANN_JSON_SERIALIZE_ENUM(ControlType, { 46853c0dc5SEd Tanous {ControlType::Invalid, "Invalid"}, 47853c0dc5SEd Tanous {ControlType::Temperature, "Temperature"}, 48853c0dc5SEd Tanous {ControlType::Power, "Power"}, 49853c0dc5SEd Tanous {ControlType::Frequency, "Frequency"}, 50853c0dc5SEd Tanous {ControlType::FrequencyMHz, "FrequencyMHz"}, 51853c0dc5SEd Tanous {ControlType::Pressure, "Pressure"}, 52f263e09cSEd Tanous {ControlType::PressurekPa, "PressurekPa"}, 53f263e09cSEd Tanous {ControlType::Valve, "Valve"}, 542ae81db9SGunnar Mills {ControlType::Percent, "Percent"}, 552ae81db9SGunnar Mills {ControlType::DutyCycle, "DutyCycle"}, 56*9b46bc0bSMyung Bae {ControlType::LiquidFlowLPM, "LiquidFlowLPM"}, 57853c0dc5SEd Tanous }); 58853c0dc5SEd Tanous 59853c0dc5SEd Tanous NLOHMANN_JSON_SERIALIZE_ENUM(SetPointType, { 60853c0dc5SEd Tanous {SetPointType::Invalid, "Invalid"}, 61853c0dc5SEd Tanous {SetPointType::Single, "Single"}, 62853c0dc5SEd Tanous {SetPointType::Range, "Range"}, 63853c0dc5SEd Tanous }); 64853c0dc5SEd Tanous 65853c0dc5SEd Tanous NLOHMANN_JSON_SERIALIZE_ENUM(ControlMode, { 66853c0dc5SEd Tanous {ControlMode::Invalid, "Invalid"}, 67853c0dc5SEd Tanous {ControlMode::Automatic, "Automatic"}, 68853c0dc5SEd Tanous {ControlMode::Override, "Override"}, 69853c0dc5SEd Tanous {ControlMode::Manual, "Manual"}, 70853c0dc5SEd Tanous {ControlMode::Disabled, "Disabled"}, 71853c0dc5SEd Tanous }); 72853c0dc5SEd Tanous 73853c0dc5SEd Tanous NLOHMANN_JSON_SERIALIZE_ENUM(ImplementationType, { 74853c0dc5SEd Tanous {ImplementationType::Invalid, "Invalid"}, 75853c0dc5SEd Tanous {ImplementationType::Programmable, "Programmable"}, 76853c0dc5SEd Tanous {ImplementationType::Direct, "Direct"}, 77853c0dc5SEd Tanous {ImplementationType::Monitored, "Monitored"}, 78853c0dc5SEd Tanous }); 79853c0dc5SEd Tanous 80853c0dc5SEd Tanous } 81853c0dc5SEd Tanous // clang-format on 82