1 #pragma once 2 #include <nlohmann/json.hpp> 3 4 namespace physical_context 5 { 6 // clang-format off 7 8 enum class PhysicalContext{ 9 Invalid, 10 Room, 11 Intake, 12 Exhaust, 13 LiquidInlet, 14 LiquidOutlet, 15 Front, 16 Back, 17 Upper, 18 Lower, 19 CPU, 20 CPUSubsystem, 21 GPU, 22 GPUSubsystem, 23 FPGA, 24 Accelerator, 25 ASIC, 26 Backplane, 27 SystemBoard, 28 PowerSupply, 29 PowerSubsystem, 30 VoltageRegulator, 31 Rectifier, 32 StorageDevice, 33 NetworkingDevice, 34 ComputeBay, 35 StorageBay, 36 NetworkBay, 37 ExpansionBay, 38 PowerSupplyBay, 39 Memory, 40 MemorySubsystem, 41 Chassis, 42 Fan, 43 CoolingSubsystem, 44 Motor, 45 Transformer, 46 ACUtilityInput, 47 ACStaticBypassInput, 48 ACMaintenanceBypassInput, 49 DCBus, 50 ACOutput, 51 ACInput, 52 TrustedModule, 53 Board, 54 Transceiver, 55 Battery, 56 Pump, 57 Filter, 58 Reservoir, 59 Switch, 60 Manager, 61 }; 62 63 enum class PhysicalSubContext{ 64 Invalid, 65 Input, 66 Output, 67 }; 68 69 enum class LogicalContext{ 70 Invalid, 71 Capacity, 72 Environment, 73 Network, 74 Performance, 75 Security, 76 Storage, 77 }; 78 79 NLOHMANN_JSON_SERIALIZE_ENUM(PhysicalContext, { 80 {PhysicalContext::Invalid, "Invalid"}, 81 {PhysicalContext::Room, "Room"}, 82 {PhysicalContext::Intake, "Intake"}, 83 {PhysicalContext::Exhaust, "Exhaust"}, 84 {PhysicalContext::LiquidInlet, "LiquidInlet"}, 85 {PhysicalContext::LiquidOutlet, "LiquidOutlet"}, 86 {PhysicalContext::Front, "Front"}, 87 {PhysicalContext::Back, "Back"}, 88 {PhysicalContext::Upper, "Upper"}, 89 {PhysicalContext::Lower, "Lower"}, 90 {PhysicalContext::CPU, "CPU"}, 91 {PhysicalContext::CPUSubsystem, "CPUSubsystem"}, 92 {PhysicalContext::GPU, "GPU"}, 93 {PhysicalContext::GPUSubsystem, "GPUSubsystem"}, 94 {PhysicalContext::FPGA, "FPGA"}, 95 {PhysicalContext::Accelerator, "Accelerator"}, 96 {PhysicalContext::ASIC, "ASIC"}, 97 {PhysicalContext::Backplane, "Backplane"}, 98 {PhysicalContext::SystemBoard, "SystemBoard"}, 99 {PhysicalContext::PowerSupply, "PowerSupply"}, 100 {PhysicalContext::PowerSubsystem, "PowerSubsystem"}, 101 {PhysicalContext::VoltageRegulator, "VoltageRegulator"}, 102 {PhysicalContext::Rectifier, "Rectifier"}, 103 {PhysicalContext::StorageDevice, "StorageDevice"}, 104 {PhysicalContext::NetworkingDevice, "NetworkingDevice"}, 105 {PhysicalContext::ComputeBay, "ComputeBay"}, 106 {PhysicalContext::StorageBay, "StorageBay"}, 107 {PhysicalContext::NetworkBay, "NetworkBay"}, 108 {PhysicalContext::ExpansionBay, "ExpansionBay"}, 109 {PhysicalContext::PowerSupplyBay, "PowerSupplyBay"}, 110 {PhysicalContext::Memory, "Memory"}, 111 {PhysicalContext::MemorySubsystem, "MemorySubsystem"}, 112 {PhysicalContext::Chassis, "Chassis"}, 113 {PhysicalContext::Fan, "Fan"}, 114 {PhysicalContext::CoolingSubsystem, "CoolingSubsystem"}, 115 {PhysicalContext::Motor, "Motor"}, 116 {PhysicalContext::Transformer, "Transformer"}, 117 {PhysicalContext::ACUtilityInput, "ACUtilityInput"}, 118 {PhysicalContext::ACStaticBypassInput, "ACStaticBypassInput"}, 119 {PhysicalContext::ACMaintenanceBypassInput, "ACMaintenanceBypassInput"}, 120 {PhysicalContext::DCBus, "DCBus"}, 121 {PhysicalContext::ACOutput, "ACOutput"}, 122 {PhysicalContext::ACInput, "ACInput"}, 123 {PhysicalContext::TrustedModule, "TrustedModule"}, 124 {PhysicalContext::Board, "Board"}, 125 {PhysicalContext::Transceiver, "Transceiver"}, 126 {PhysicalContext::Battery, "Battery"}, 127 {PhysicalContext::Pump, "Pump"}, 128 {PhysicalContext::Filter, "Filter"}, 129 {PhysicalContext::Reservoir, "Reservoir"}, 130 {PhysicalContext::Switch, "Switch"}, 131 {PhysicalContext::Manager, "Manager"}, 132 }); 133 134 NLOHMANN_JSON_SERIALIZE_ENUM(PhysicalSubContext, { 135 {PhysicalSubContext::Invalid, "Invalid"}, 136 {PhysicalSubContext::Input, "Input"}, 137 {PhysicalSubContext::Output, "Output"}, 138 }); 139 140 NLOHMANN_JSON_SERIALIZE_ENUM(LogicalContext, { 141 {LogicalContext::Invalid, "Invalid"}, 142 {LogicalContext::Capacity, "Capacity"}, 143 {LogicalContext::Environment, "Environment"}, 144 {LogicalContext::Network, "Network"}, 145 {LogicalContext::Performance, "Performance"}, 146 {LogicalContext::Security, "Security"}, 147 {LogicalContext::Storage, "Storage"}, 148 }); 149 150 } 151 // clang-format on 152