1*0ec8b83dSEd Tanous #pragma once 2*0ec8b83dSEd Tanous #include <nlohmann/json.hpp> 3*0ec8b83dSEd Tanous 4*0ec8b83dSEd Tanous namespace pcie_function 5*0ec8b83dSEd Tanous { 6*0ec8b83dSEd Tanous // clang-format off 7*0ec8b83dSEd Tanous 8*0ec8b83dSEd Tanous enum class DeviceClass{ 9*0ec8b83dSEd Tanous Invalid, 10*0ec8b83dSEd Tanous UnclassifiedDevice, 11*0ec8b83dSEd Tanous MassStorageController, 12*0ec8b83dSEd Tanous NetworkController, 13*0ec8b83dSEd Tanous DisplayController, 14*0ec8b83dSEd Tanous MultimediaController, 15*0ec8b83dSEd Tanous MemoryController, 16*0ec8b83dSEd Tanous Bridge, 17*0ec8b83dSEd Tanous CommunicationController, 18*0ec8b83dSEd Tanous GenericSystemPeripheral, 19*0ec8b83dSEd Tanous InputDeviceController, 20*0ec8b83dSEd Tanous DockingStation, 21*0ec8b83dSEd Tanous Processor, 22*0ec8b83dSEd Tanous SerialBusController, 23*0ec8b83dSEd Tanous WirelessController, 24*0ec8b83dSEd Tanous IntelligentController, 25*0ec8b83dSEd Tanous SatelliteCommunicationsController, 26*0ec8b83dSEd Tanous EncryptionController, 27*0ec8b83dSEd Tanous SignalProcessingController, 28*0ec8b83dSEd Tanous ProcessingAccelerators, 29*0ec8b83dSEd Tanous NonEssentialInstrumentation, 30*0ec8b83dSEd Tanous Coprocessor, 31*0ec8b83dSEd Tanous UnassignedClass, 32*0ec8b83dSEd Tanous Other, 33*0ec8b83dSEd Tanous }; 34*0ec8b83dSEd Tanous 35*0ec8b83dSEd Tanous enum class FunctionType{ 36*0ec8b83dSEd Tanous Invalid, 37*0ec8b83dSEd Tanous Physical, 38*0ec8b83dSEd Tanous Virtual, 39*0ec8b83dSEd Tanous }; 40*0ec8b83dSEd Tanous 41*0ec8b83dSEd Tanous NLOHMANN_JSON_SERIALIZE_ENUM(DeviceClass, { 42*0ec8b83dSEd Tanous {DeviceClass::Invalid, "Invalid"}, 43*0ec8b83dSEd Tanous {DeviceClass::UnclassifiedDevice, "UnclassifiedDevice"}, 44*0ec8b83dSEd Tanous {DeviceClass::MassStorageController, "MassStorageController"}, 45*0ec8b83dSEd Tanous {DeviceClass::NetworkController, "NetworkController"}, 46*0ec8b83dSEd Tanous {DeviceClass::DisplayController, "DisplayController"}, 47*0ec8b83dSEd Tanous {DeviceClass::MultimediaController, "MultimediaController"}, 48*0ec8b83dSEd Tanous {DeviceClass::MemoryController, "MemoryController"}, 49*0ec8b83dSEd Tanous {DeviceClass::Bridge, "Bridge"}, 50*0ec8b83dSEd Tanous {DeviceClass::CommunicationController, "CommunicationController"}, 51*0ec8b83dSEd Tanous {DeviceClass::GenericSystemPeripheral, "GenericSystemPeripheral"}, 52*0ec8b83dSEd Tanous {DeviceClass::InputDeviceController, "InputDeviceController"}, 53*0ec8b83dSEd Tanous {DeviceClass::DockingStation, "DockingStation"}, 54*0ec8b83dSEd Tanous {DeviceClass::Processor, "Processor"}, 55*0ec8b83dSEd Tanous {DeviceClass::SerialBusController, "SerialBusController"}, 56*0ec8b83dSEd Tanous {DeviceClass::WirelessController, "WirelessController"}, 57*0ec8b83dSEd Tanous {DeviceClass::IntelligentController, "IntelligentController"}, 58*0ec8b83dSEd Tanous {DeviceClass::SatelliteCommunicationsController, "SatelliteCommunicationsController"}, 59*0ec8b83dSEd Tanous {DeviceClass::EncryptionController, "EncryptionController"}, 60*0ec8b83dSEd Tanous {DeviceClass::SignalProcessingController, "SignalProcessingController"}, 61*0ec8b83dSEd Tanous {DeviceClass::ProcessingAccelerators, "ProcessingAccelerators"}, 62*0ec8b83dSEd Tanous {DeviceClass::NonEssentialInstrumentation, "NonEssentialInstrumentation"}, 63*0ec8b83dSEd Tanous {DeviceClass::Coprocessor, "Coprocessor"}, 64*0ec8b83dSEd Tanous {DeviceClass::UnassignedClass, "UnassignedClass"}, 65*0ec8b83dSEd Tanous {DeviceClass::Other, "Other"}, 66*0ec8b83dSEd Tanous }); 67*0ec8b83dSEd Tanous 68*0ec8b83dSEd Tanous NLOHMANN_JSON_SERIALIZE_ENUM(FunctionType, { 69*0ec8b83dSEd Tanous {FunctionType::Invalid, "Invalid"}, 70*0ec8b83dSEd Tanous {FunctionType::Physical, "Physical"}, 71*0ec8b83dSEd Tanous {FunctionType::Virtual, "Virtual"}, 72*0ec8b83dSEd Tanous }); 73*0ec8b83dSEd Tanous 74*0ec8b83dSEd Tanous } 75*0ec8b83dSEd Tanous // clang-format on 76