1 #pragma once 2 #include <nlohmann/json.hpp> 3 4 namespace memory_chunks 5 { 6 // clang-format off 7 8 enum class AddressRangeType{ 9 Invalid, 10 Volatile, 11 PMEM, 12 Block, 13 }; 14 15 enum class MediaLocation{ 16 Invalid, 17 Local, 18 Remote, 19 Mixed, 20 }; 21 22 enum class OperationalState{ 23 Invalid, 24 Online, 25 Offline, 26 }; 27 28 NLOHMANN_JSON_SERIALIZE_ENUM(AddressRangeType, { 29 {AddressRangeType::Invalid, "Invalid"}, 30 {AddressRangeType::Volatile, "Volatile"}, 31 {AddressRangeType::PMEM, "PMEM"}, 32 {AddressRangeType::Block, "Block"}, 33 }); 34 35 NLOHMANN_JSON_SERIALIZE_ENUM(MediaLocation, { 36 {MediaLocation::Invalid, "Invalid"}, 37 {MediaLocation::Local, "Local"}, 38 {MediaLocation::Remote, "Remote"}, 39 {MediaLocation::Mixed, "Mixed"}, 40 }); 41 42 NLOHMANN_JSON_SERIALIZE_ENUM(OperationalState, { 43 {OperationalState::Invalid, "Invalid"}, 44 {OperationalState::Online, "Online"}, 45 {OperationalState::Offline, "Offline"}, 46 }); 47 48 } 49 // clang-format on 50