summaryrefslogtreecommitdiff
path: root/redfish-core/include/generated/enums/pcie_device.hpp
blob: 209d0030fe67b15592de50fb9eace5f1f5d0bc4a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
#pragma once
#include <nlohmann/json.hpp>

namespace pcie_device
{
// clang-format off

enum class PCIeTypes{
    Invalid,
    Gen1,
    Gen2,
    Gen3,
    Gen4,
    Gen5,
};

enum class DeviceType{
    Invalid,
    SingleFunction,
    MultiFunction,
    Simulated,
    Retimer,
};

enum class SlotType{
    Invalid,
    FullLength,
    HalfLength,
    LowProfile,
    Mini,
    M2,
    OEM,
    OCP3Small,
    OCP3Large,
    U2,
};

enum class LaneSplittingType{
    Invalid,
    None,
    Bridged,
    Bifurcated,
};

enum class CXLDeviceType{
    Invalid,
    Type1,
    Type2,
    Type3,
};

enum class CXLDynamicCapacityPolicies{
    Invalid,
    Free,
    Contiguous,
    Prescriptive,
    TagBased,
};

NLOHMANN_JSON_SERIALIZE_ENUM(PCIeTypes, {
    {PCIeTypes::Invalid, "Invalid"},
    {PCIeTypes::Gen1, "Gen1"},
    {PCIeTypes::Gen2, "Gen2"},
    {PCIeTypes::Gen3, "Gen3"},
    {PCIeTypes::Gen4, "Gen4"},
    {PCIeTypes::Gen5, "Gen5"},
});

NLOHMANN_JSON_SERIALIZE_ENUM(DeviceType, {
    {DeviceType::Invalid, "Invalid"},
    {DeviceType::SingleFunction, "SingleFunction"},
    {DeviceType::MultiFunction, "MultiFunction"},
    {DeviceType::Simulated, "Simulated"},
    {DeviceType::Retimer, "Retimer"},
});

NLOHMANN_JSON_SERIALIZE_ENUM(SlotType, {
    {SlotType::Invalid, "Invalid"},
    {SlotType::FullLength, "FullLength"},
    {SlotType::HalfLength, "HalfLength"},
    {SlotType::LowProfile, "LowProfile"},
    {SlotType::Mini, "Mini"},
    {SlotType::M2, "M2"},
    {SlotType::OEM, "OEM"},
    {SlotType::OCP3Small, "OCP3Small"},
    {SlotType::OCP3Large, "OCP3Large"},
    {SlotType::U2, "U2"},
});

NLOHMANN_JSON_SERIALIZE_ENUM(LaneSplittingType, {
    {LaneSplittingType::Invalid, "Invalid"},
    {LaneSplittingType::None, "None"},
    {LaneSplittingType::Bridged, "Bridged"},
    {LaneSplittingType::Bifurcated, "Bifurcated"},
});

NLOHMANN_JSON_SERIALIZE_ENUM(CXLDeviceType, {
    {CXLDeviceType::Invalid, "Invalid"},
    {CXLDeviceType::Type1, "Type1"},
    {CXLDeviceType::Type2, "Type2"},
    {CXLDeviceType::Type3, "Type3"},
});

NLOHMANN_JSON_SERIALIZE_ENUM(CXLDynamicCapacityPolicies, {
    {CXLDynamicCapacityPolicies::Invalid, "Invalid"},
    {CXLDynamicCapacityPolicies::Free, "Free"},
    {CXLDynamicCapacityPolicies::Contiguous, "Contiguous"},
    {CXLDynamicCapacityPolicies::Prescriptive, "Prescriptive"},
    {CXLDynamicCapacityPolicies::TagBased, "TagBased"},
});

}
// clang-format on