| // NOLINTBEGIN | |
| #pragma once | |
| #include <cstdint> | |
| #include <nlohmann/json.hpp> | |
| namespace battery | |
| { | |
| // clang-format off | |
| enum class ChargeState : std::uint8_t{ | |
| Invalid, | |
| Idle, | |
| Charging, | |
| Discharging, | |
| }; | |
| NLOHMANN_JSON_SERIALIZE_ENUM(ChargeState, { | |
| {ChargeState::Invalid, "Invalid"}, | |
| {ChargeState::Idle, "Idle"}, | |
| {ChargeState::Charging, "Charging"}, | |
| {ChargeState::Discharging, "Discharging"}, | |
| }); | |
| } // namespace battery | |
| // clang-format on | |
| // NOLINTEND |