xref: /openbmc/bmcweb/redfish-core/include/generated/enums/pcie_device.hpp (revision d125652e8a30dfeaad88bbfa5b1e04a80610469c)
1  // SPDX-License-Identifier: Apache-2.0
2  // SPDX-FileCopyrightText: Copyright OpenBMC Authors
3  #pragma once
4  #include <nlohmann/json.hpp>
5  
6  namespace pcie_device
7  {
8  // clang-format off
9  
10  enum class PCIeTypes{
11      Invalid,
12      Gen1,
13      Gen2,
14      Gen3,
15      Gen4,
16      Gen5,
17      Gen6,
18  };
19  
20  enum class DeviceType{
21      Invalid,
22      SingleFunction,
23      MultiFunction,
24      Simulated,
25      Retimer,
26  };
27  
28  enum class SlotType{
29      Invalid,
30      FullLength,
31      HalfLength,
32      LowProfile,
33      Mini,
34      M2,
35      OEM,
36      OCP3Small,
37      OCP3Large,
38      U2,
39      EDSFF,
40  };
41  
42  enum class LaneSplittingType{
43      Invalid,
44      None,
45      Bridged,
46      Bifurcated,
47  };
48  
49  enum class CXLDeviceType{
50      Invalid,
51      Type1,
52      Type2,
53      Type3,
54  };
55  
56  enum class CXLDynamicCapacityPolicies{
57      Invalid,
58      Free,
59      Contiguous,
60      Prescriptive,
61      TagBased,
62  };
63  
64  enum class CXLProtocolVersion{
65      Invalid,
66      CXL1_1,
67      CXL2_0,
68      CXL3_0,
69      CXL3_1,
70      CXL3_2,
71  };
72  
73  NLOHMANN_JSON_SERIALIZE_ENUM(PCIeTypes, {
74      {PCIeTypes::Invalid, "Invalid"},
75      {PCIeTypes::Gen1, "Gen1"},
76      {PCIeTypes::Gen2, "Gen2"},
77      {PCIeTypes::Gen3, "Gen3"},
78      {PCIeTypes::Gen4, "Gen4"},
79      {PCIeTypes::Gen5, "Gen5"},
80      {PCIeTypes::Gen6, "Gen6"},
81  });
82  
83  NLOHMANN_JSON_SERIALIZE_ENUM(DeviceType, {
84      {DeviceType::Invalid, "Invalid"},
85      {DeviceType::SingleFunction, "SingleFunction"},
86      {DeviceType::MultiFunction, "MultiFunction"},
87      {DeviceType::Simulated, "Simulated"},
88      {DeviceType::Retimer, "Retimer"},
89  });
90  
91  NLOHMANN_JSON_SERIALIZE_ENUM(SlotType, {
92      {SlotType::Invalid, "Invalid"},
93      {SlotType::FullLength, "FullLength"},
94      {SlotType::HalfLength, "HalfLength"},
95      {SlotType::LowProfile, "LowProfile"},
96      {SlotType::Mini, "Mini"},
97      {SlotType::M2, "M2"},
98      {SlotType::OEM, "OEM"},
99      {SlotType::OCP3Small, "OCP3Small"},
100      {SlotType::OCP3Large, "OCP3Large"},
101      {SlotType::U2, "U2"},
102      {SlotType::EDSFF, "EDSFF"},
103  });
104  
105  NLOHMANN_JSON_SERIALIZE_ENUM(LaneSplittingType, {
106      {LaneSplittingType::Invalid, "Invalid"},
107      {LaneSplittingType::None, "None"},
108      {LaneSplittingType::Bridged, "Bridged"},
109      {LaneSplittingType::Bifurcated, "Bifurcated"},
110  });
111  
112  NLOHMANN_JSON_SERIALIZE_ENUM(CXLDeviceType, {
113      {CXLDeviceType::Invalid, "Invalid"},
114      {CXLDeviceType::Type1, "Type1"},
115      {CXLDeviceType::Type2, "Type2"},
116      {CXLDeviceType::Type3, "Type3"},
117  });
118  
119  NLOHMANN_JSON_SERIALIZE_ENUM(CXLDynamicCapacityPolicies, {
120      {CXLDynamicCapacityPolicies::Invalid, "Invalid"},
121      {CXLDynamicCapacityPolicies::Free, "Free"},
122      {CXLDynamicCapacityPolicies::Contiguous, "Contiguous"},
123      {CXLDynamicCapacityPolicies::Prescriptive, "Prescriptive"},
124      {CXLDynamicCapacityPolicies::TagBased, "TagBased"},
125  });
126  
127  NLOHMANN_JSON_SERIALIZE_ENUM(CXLProtocolVersion, {
128      {CXLProtocolVersion::Invalid, "Invalid"},
129      {CXLProtocolVersion::CXL1_1, "CXL1_1"},
130      {CXLProtocolVersion::CXL2_0, "CXL2_0"},
131      {CXLProtocolVersion::CXL3_0, "CXL3_0"},
132      {CXLProtocolVersion::CXL3_1, "CXL3_1"},
133      {CXLProtocolVersion::CXL3_2, "CXL3_2"},
134  });
135  
136  }
137  // clang-format on
138