xref: /openbmc/bmcweb/features/redfish/include/generated/enums/pcie_function.hpp (revision 40e9b92ec19acffb46f83a6e55b18974da5d708e)
1*40e9b92eSEd Tanous // SPDX-License-Identifier: Apache-2.0
2*40e9b92eSEd Tanous // SPDX-FileCopyrightText: Copyright OpenBMC Authors
30ec8b83dSEd Tanous #pragma once
40ec8b83dSEd Tanous #include <nlohmann/json.hpp>
50ec8b83dSEd Tanous 
60ec8b83dSEd Tanous namespace pcie_function
70ec8b83dSEd Tanous {
80ec8b83dSEd Tanous // clang-format off
90ec8b83dSEd Tanous 
100ec8b83dSEd Tanous enum class DeviceClass{
110ec8b83dSEd Tanous     Invalid,
120ec8b83dSEd Tanous     UnclassifiedDevice,
130ec8b83dSEd Tanous     MassStorageController,
140ec8b83dSEd Tanous     NetworkController,
150ec8b83dSEd Tanous     DisplayController,
160ec8b83dSEd Tanous     MultimediaController,
170ec8b83dSEd Tanous     MemoryController,
180ec8b83dSEd Tanous     Bridge,
190ec8b83dSEd Tanous     CommunicationController,
200ec8b83dSEd Tanous     GenericSystemPeripheral,
210ec8b83dSEd Tanous     InputDeviceController,
220ec8b83dSEd Tanous     DockingStation,
230ec8b83dSEd Tanous     Processor,
240ec8b83dSEd Tanous     SerialBusController,
250ec8b83dSEd Tanous     WirelessController,
260ec8b83dSEd Tanous     IntelligentController,
270ec8b83dSEd Tanous     SatelliteCommunicationsController,
280ec8b83dSEd Tanous     EncryptionController,
290ec8b83dSEd Tanous     SignalProcessingController,
300ec8b83dSEd Tanous     ProcessingAccelerators,
310ec8b83dSEd Tanous     NonEssentialInstrumentation,
320ec8b83dSEd Tanous     Coprocessor,
330ec8b83dSEd Tanous     UnassignedClass,
340ec8b83dSEd Tanous     Other,
350ec8b83dSEd Tanous };
360ec8b83dSEd Tanous 
370ec8b83dSEd Tanous enum class FunctionType{
380ec8b83dSEd Tanous     Invalid,
390ec8b83dSEd Tanous     Physical,
400ec8b83dSEd Tanous     Virtual,
410ec8b83dSEd Tanous };
420ec8b83dSEd Tanous 
43a8d8f9d8SEd Tanous enum class FunctionProtocol{
44a8d8f9d8SEd Tanous     Invalid,
45a8d8f9d8SEd Tanous     PCIe,
46a8d8f9d8SEd Tanous     CXL,
47a8d8f9d8SEd Tanous };
48a8d8f9d8SEd Tanous 
490ec8b83dSEd Tanous NLOHMANN_JSON_SERIALIZE_ENUM(DeviceClass, {
500ec8b83dSEd Tanous     {DeviceClass::Invalid, "Invalid"},
510ec8b83dSEd Tanous     {DeviceClass::UnclassifiedDevice, "UnclassifiedDevice"},
520ec8b83dSEd Tanous     {DeviceClass::MassStorageController, "MassStorageController"},
530ec8b83dSEd Tanous     {DeviceClass::NetworkController, "NetworkController"},
540ec8b83dSEd Tanous     {DeviceClass::DisplayController, "DisplayController"},
550ec8b83dSEd Tanous     {DeviceClass::MultimediaController, "MultimediaController"},
560ec8b83dSEd Tanous     {DeviceClass::MemoryController, "MemoryController"},
570ec8b83dSEd Tanous     {DeviceClass::Bridge, "Bridge"},
580ec8b83dSEd Tanous     {DeviceClass::CommunicationController, "CommunicationController"},
590ec8b83dSEd Tanous     {DeviceClass::GenericSystemPeripheral, "GenericSystemPeripheral"},
600ec8b83dSEd Tanous     {DeviceClass::InputDeviceController, "InputDeviceController"},
610ec8b83dSEd Tanous     {DeviceClass::DockingStation, "DockingStation"},
620ec8b83dSEd Tanous     {DeviceClass::Processor, "Processor"},
630ec8b83dSEd Tanous     {DeviceClass::SerialBusController, "SerialBusController"},
640ec8b83dSEd Tanous     {DeviceClass::WirelessController, "WirelessController"},
650ec8b83dSEd Tanous     {DeviceClass::IntelligentController, "IntelligentController"},
660ec8b83dSEd Tanous     {DeviceClass::SatelliteCommunicationsController, "SatelliteCommunicationsController"},
670ec8b83dSEd Tanous     {DeviceClass::EncryptionController, "EncryptionController"},
680ec8b83dSEd Tanous     {DeviceClass::SignalProcessingController, "SignalProcessingController"},
690ec8b83dSEd Tanous     {DeviceClass::ProcessingAccelerators, "ProcessingAccelerators"},
700ec8b83dSEd Tanous     {DeviceClass::NonEssentialInstrumentation, "NonEssentialInstrumentation"},
710ec8b83dSEd Tanous     {DeviceClass::Coprocessor, "Coprocessor"},
720ec8b83dSEd Tanous     {DeviceClass::UnassignedClass, "UnassignedClass"},
730ec8b83dSEd Tanous     {DeviceClass::Other, "Other"},
740ec8b83dSEd Tanous });
750ec8b83dSEd Tanous 
760ec8b83dSEd Tanous NLOHMANN_JSON_SERIALIZE_ENUM(FunctionType, {
770ec8b83dSEd Tanous     {FunctionType::Invalid, "Invalid"},
780ec8b83dSEd Tanous     {FunctionType::Physical, "Physical"},
790ec8b83dSEd Tanous     {FunctionType::Virtual, "Virtual"},
800ec8b83dSEd Tanous });
810ec8b83dSEd Tanous 
82a8d8f9d8SEd Tanous NLOHMANN_JSON_SERIALIZE_ENUM(FunctionProtocol, {
83a8d8f9d8SEd Tanous     {FunctionProtocol::Invalid, "Invalid"},
84a8d8f9d8SEd Tanous     {FunctionProtocol::PCIe, "PCIe"},
85a8d8f9d8SEd Tanous     {FunctionProtocol::CXL, "CXL"},
86a8d8f9d8SEd Tanous });
87a8d8f9d8SEd Tanous 
880ec8b83dSEd Tanous }
890ec8b83dSEd Tanous // clang-format on
90