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