xref: /openbmc/bmcweb/redfish-core/include/generated/enums/pcie_device.hpp (revision 40e9b92ec19acffb46f83a6e55b18974da5d708e)
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 };
40 
41 enum class LaneSplittingType{
42     Invalid,
43     None,
44     Bridged,
45     Bifurcated,
46 };
47 
48 enum class CXLDeviceType{
49     Invalid,
50     Type1,
51     Type2,
52     Type3,
53 };
54 
55 enum class CXLDynamicCapacityPolicies{
56     Invalid,
57     Free,
58     Contiguous,
59     Prescriptive,
60     TagBased,
61 };
62 
63 NLOHMANN_JSON_SERIALIZE_ENUM(PCIeTypes, {
64     {PCIeTypes::Invalid, "Invalid"},
65     {PCIeTypes::Gen1, "Gen1"},
66     {PCIeTypes::Gen2, "Gen2"},
67     {PCIeTypes::Gen3, "Gen3"},
68     {PCIeTypes::Gen4, "Gen4"},
69     {PCIeTypes::Gen5, "Gen5"},
70     {PCIeTypes::Gen6, "Gen6"},
71 });
72 
73 NLOHMANN_JSON_SERIALIZE_ENUM(DeviceType, {
74     {DeviceType::Invalid, "Invalid"},
75     {DeviceType::SingleFunction, "SingleFunction"},
76     {DeviceType::MultiFunction, "MultiFunction"},
77     {DeviceType::Simulated, "Simulated"},
78     {DeviceType::Retimer, "Retimer"},
79 });
80 
81 NLOHMANN_JSON_SERIALIZE_ENUM(SlotType, {
82     {SlotType::Invalid, "Invalid"},
83     {SlotType::FullLength, "FullLength"},
84     {SlotType::HalfLength, "HalfLength"},
85     {SlotType::LowProfile, "LowProfile"},
86     {SlotType::Mini, "Mini"},
87     {SlotType::M2, "M2"},
88     {SlotType::OEM, "OEM"},
89     {SlotType::OCP3Small, "OCP3Small"},
90     {SlotType::OCP3Large, "OCP3Large"},
91     {SlotType::U2, "U2"},
92 });
93 
94 NLOHMANN_JSON_SERIALIZE_ENUM(LaneSplittingType, {
95     {LaneSplittingType::Invalid, "Invalid"},
96     {LaneSplittingType::None, "None"},
97     {LaneSplittingType::Bridged, "Bridged"},
98     {LaneSplittingType::Bifurcated, "Bifurcated"},
99 });
100 
101 NLOHMANN_JSON_SERIALIZE_ENUM(CXLDeviceType, {
102     {CXLDeviceType::Invalid, "Invalid"},
103     {CXLDeviceType::Type1, "Type1"},
104     {CXLDeviceType::Type2, "Type2"},
105     {CXLDeviceType::Type3, "Type3"},
106 });
107 
108 NLOHMANN_JSON_SERIALIZE_ENUM(CXLDynamicCapacityPolicies, {
109     {CXLDynamicCapacityPolicies::Invalid, "Invalid"},
110     {CXLDynamicCapacityPolicies::Free, "Free"},
111     {CXLDynamicCapacityPolicies::Contiguous, "Contiguous"},
112     {CXLDynamicCapacityPolicies::Prescriptive, "Prescriptive"},
113     {CXLDynamicCapacityPolicies::TagBased, "TagBased"},
114 });
115 
116 }
117 // clang-format on
118