xref: /openbmc/bmcweb/features/redfish/include/generated/enums/network_port.hpp (revision 40e9b92ec19acffb46f83a6e55b18974da5d708e)
1*40e9b92eSEd Tanous // SPDX-License-Identifier: Apache-2.0
2*40e9b92eSEd Tanous // SPDX-FileCopyrightText: Copyright OpenBMC Authors
3853c0dc5SEd Tanous #pragma once
4853c0dc5SEd Tanous #include <nlohmann/json.hpp>
5853c0dc5SEd Tanous 
6853c0dc5SEd Tanous namespace network_port
7853c0dc5SEd Tanous {
8853c0dc5SEd Tanous // clang-format off
9853c0dc5SEd Tanous 
10853c0dc5SEd Tanous enum class LinkStatus{
11853c0dc5SEd Tanous     Invalid,
12853c0dc5SEd Tanous     Down,
13853c0dc5SEd Tanous     Up,
14853c0dc5SEd Tanous     Starting,
15853c0dc5SEd Tanous     Training,
16853c0dc5SEd Tanous };
17853c0dc5SEd Tanous 
18853c0dc5SEd Tanous enum class LinkNetworkTechnology{
19853c0dc5SEd Tanous     Invalid,
20853c0dc5SEd Tanous     Ethernet,
21853c0dc5SEd Tanous     InfiniBand,
22853c0dc5SEd Tanous     FibreChannel,
23853c0dc5SEd Tanous };
24853c0dc5SEd Tanous 
25853c0dc5SEd Tanous enum class SupportedEthernetCapabilities{
26853c0dc5SEd Tanous     Invalid,
27853c0dc5SEd Tanous     WakeOnLAN,
28853c0dc5SEd Tanous     EEE,
29853c0dc5SEd Tanous };
30853c0dc5SEd Tanous 
31853c0dc5SEd Tanous enum class FlowControl{
32853c0dc5SEd Tanous     Invalid,
33853c0dc5SEd Tanous     None,
34853c0dc5SEd Tanous     TX,
35853c0dc5SEd Tanous     RX,
36853c0dc5SEd Tanous     TX_RX,
37853c0dc5SEd Tanous };
38853c0dc5SEd Tanous 
39853c0dc5SEd Tanous enum class PortConnectionType{
40853c0dc5SEd Tanous     Invalid,
41853c0dc5SEd Tanous     NotConnected,
42853c0dc5SEd Tanous     NPort,
43853c0dc5SEd Tanous     PointToPoint,
44853c0dc5SEd Tanous     PrivateLoop,
45853c0dc5SEd Tanous     PublicLoop,
46853c0dc5SEd Tanous     Generic,
47853c0dc5SEd Tanous     ExtenderFabric,
48853c0dc5SEd Tanous };
49853c0dc5SEd Tanous 
50853c0dc5SEd Tanous NLOHMANN_JSON_SERIALIZE_ENUM(LinkStatus, {
51853c0dc5SEd Tanous     {LinkStatus::Invalid, "Invalid"},
52853c0dc5SEd Tanous     {LinkStatus::Down, "Down"},
53853c0dc5SEd Tanous     {LinkStatus::Up, "Up"},
54853c0dc5SEd Tanous     {LinkStatus::Starting, "Starting"},
55853c0dc5SEd Tanous     {LinkStatus::Training, "Training"},
56853c0dc5SEd Tanous });
57853c0dc5SEd Tanous 
58853c0dc5SEd Tanous NLOHMANN_JSON_SERIALIZE_ENUM(LinkNetworkTechnology, {
59853c0dc5SEd Tanous     {LinkNetworkTechnology::Invalid, "Invalid"},
60853c0dc5SEd Tanous     {LinkNetworkTechnology::Ethernet, "Ethernet"},
61853c0dc5SEd Tanous     {LinkNetworkTechnology::InfiniBand, "InfiniBand"},
62853c0dc5SEd Tanous     {LinkNetworkTechnology::FibreChannel, "FibreChannel"},
63853c0dc5SEd Tanous });
64853c0dc5SEd Tanous 
65853c0dc5SEd Tanous NLOHMANN_JSON_SERIALIZE_ENUM(SupportedEthernetCapabilities, {
66853c0dc5SEd Tanous     {SupportedEthernetCapabilities::Invalid, "Invalid"},
67853c0dc5SEd Tanous     {SupportedEthernetCapabilities::WakeOnLAN, "WakeOnLAN"},
68853c0dc5SEd Tanous     {SupportedEthernetCapabilities::EEE, "EEE"},
69853c0dc5SEd Tanous });
70853c0dc5SEd Tanous 
71853c0dc5SEd Tanous NLOHMANN_JSON_SERIALIZE_ENUM(FlowControl, {
72853c0dc5SEd Tanous     {FlowControl::Invalid, "Invalid"},
73853c0dc5SEd Tanous     {FlowControl::None, "None"},
74853c0dc5SEd Tanous     {FlowControl::TX, "TX"},
75853c0dc5SEd Tanous     {FlowControl::RX, "RX"},
76853c0dc5SEd Tanous     {FlowControl::TX_RX, "TX_RX"},
77853c0dc5SEd Tanous });
78853c0dc5SEd Tanous 
79853c0dc5SEd Tanous NLOHMANN_JSON_SERIALIZE_ENUM(PortConnectionType, {
80853c0dc5SEd Tanous     {PortConnectionType::Invalid, "Invalid"},
81853c0dc5SEd Tanous     {PortConnectionType::NotConnected, "NotConnected"},
82853c0dc5SEd Tanous     {PortConnectionType::NPort, "NPort"},
83853c0dc5SEd Tanous     {PortConnectionType::PointToPoint, "PointToPoint"},
84853c0dc5SEd Tanous     {PortConnectionType::PrivateLoop, "PrivateLoop"},
85853c0dc5SEd Tanous     {PortConnectionType::PublicLoop, "PublicLoop"},
86853c0dc5SEd Tanous     {PortConnectionType::Generic, "Generic"},
87853c0dc5SEd Tanous     {PortConnectionType::ExtenderFabric, "ExtenderFabric"},
88853c0dc5SEd Tanous });
89853c0dc5SEd Tanous 
90853c0dc5SEd Tanous }
91853c0dc5SEd Tanous // clang-format on
92