1*853c0dc5SEd Tanous #pragma once
2*853c0dc5SEd Tanous #include <nlohmann/json.hpp>
3*853c0dc5SEd Tanous 
4*853c0dc5SEd Tanous namespace network_port
5*853c0dc5SEd Tanous {
6*853c0dc5SEd Tanous // clang-format off
7*853c0dc5SEd Tanous 
8*853c0dc5SEd Tanous enum class LinkStatus{
9*853c0dc5SEd Tanous     Invalid,
10*853c0dc5SEd Tanous     Down,
11*853c0dc5SEd Tanous     Up,
12*853c0dc5SEd Tanous     Starting,
13*853c0dc5SEd Tanous     Training,
14*853c0dc5SEd Tanous };
15*853c0dc5SEd Tanous 
16*853c0dc5SEd Tanous enum class LinkNetworkTechnology{
17*853c0dc5SEd Tanous     Invalid,
18*853c0dc5SEd Tanous     Ethernet,
19*853c0dc5SEd Tanous     InfiniBand,
20*853c0dc5SEd Tanous     FibreChannel,
21*853c0dc5SEd Tanous };
22*853c0dc5SEd Tanous 
23*853c0dc5SEd Tanous enum class SupportedEthernetCapabilities{
24*853c0dc5SEd Tanous     Invalid,
25*853c0dc5SEd Tanous     WakeOnLAN,
26*853c0dc5SEd Tanous     EEE,
27*853c0dc5SEd Tanous };
28*853c0dc5SEd Tanous 
29*853c0dc5SEd Tanous enum class FlowControl{
30*853c0dc5SEd Tanous     Invalid,
31*853c0dc5SEd Tanous     None,
32*853c0dc5SEd Tanous     TX,
33*853c0dc5SEd Tanous     RX,
34*853c0dc5SEd Tanous     TX_RX,
35*853c0dc5SEd Tanous };
36*853c0dc5SEd Tanous 
37*853c0dc5SEd Tanous enum class PortConnectionType{
38*853c0dc5SEd Tanous     Invalid,
39*853c0dc5SEd Tanous     NotConnected,
40*853c0dc5SEd Tanous     NPort,
41*853c0dc5SEd Tanous     PointToPoint,
42*853c0dc5SEd Tanous     PrivateLoop,
43*853c0dc5SEd Tanous     PublicLoop,
44*853c0dc5SEd Tanous     Generic,
45*853c0dc5SEd Tanous     ExtenderFabric,
46*853c0dc5SEd Tanous };
47*853c0dc5SEd Tanous 
48*853c0dc5SEd Tanous NLOHMANN_JSON_SERIALIZE_ENUM(LinkStatus, {
49*853c0dc5SEd Tanous     {LinkStatus::Invalid, "Invalid"},
50*853c0dc5SEd Tanous     {LinkStatus::Down, "Down"},
51*853c0dc5SEd Tanous     {LinkStatus::Up, "Up"},
52*853c0dc5SEd Tanous     {LinkStatus::Starting, "Starting"},
53*853c0dc5SEd Tanous     {LinkStatus::Training, "Training"},
54*853c0dc5SEd Tanous });
55*853c0dc5SEd Tanous 
56*853c0dc5SEd Tanous NLOHMANN_JSON_SERIALIZE_ENUM(LinkNetworkTechnology, {
57*853c0dc5SEd Tanous     {LinkNetworkTechnology::Invalid, "Invalid"},
58*853c0dc5SEd Tanous     {LinkNetworkTechnology::Ethernet, "Ethernet"},
59*853c0dc5SEd Tanous     {LinkNetworkTechnology::InfiniBand, "InfiniBand"},
60*853c0dc5SEd Tanous     {LinkNetworkTechnology::FibreChannel, "FibreChannel"},
61*853c0dc5SEd Tanous });
62*853c0dc5SEd Tanous 
63*853c0dc5SEd Tanous NLOHMANN_JSON_SERIALIZE_ENUM(SupportedEthernetCapabilities, {
64*853c0dc5SEd Tanous     {SupportedEthernetCapabilities::Invalid, "Invalid"},
65*853c0dc5SEd Tanous     {SupportedEthernetCapabilities::WakeOnLAN, "WakeOnLAN"},
66*853c0dc5SEd Tanous     {SupportedEthernetCapabilities::EEE, "EEE"},
67*853c0dc5SEd Tanous });
68*853c0dc5SEd Tanous 
69*853c0dc5SEd Tanous NLOHMANN_JSON_SERIALIZE_ENUM(FlowControl, {
70*853c0dc5SEd Tanous     {FlowControl::Invalid, "Invalid"},
71*853c0dc5SEd Tanous     {FlowControl::None, "None"},
72*853c0dc5SEd Tanous     {FlowControl::TX, "TX"},
73*853c0dc5SEd Tanous     {FlowControl::RX, "RX"},
74*853c0dc5SEd Tanous     {FlowControl::TX_RX, "TX_RX"},
75*853c0dc5SEd Tanous });
76*853c0dc5SEd Tanous 
77*853c0dc5SEd Tanous NLOHMANN_JSON_SERIALIZE_ENUM(PortConnectionType, {
78*853c0dc5SEd Tanous     {PortConnectionType::Invalid, "Invalid"},
79*853c0dc5SEd Tanous     {PortConnectionType::NotConnected, "NotConnected"},
80*853c0dc5SEd Tanous     {PortConnectionType::NPort, "NPort"},
81*853c0dc5SEd Tanous     {PortConnectionType::PointToPoint, "PointToPoint"},
82*853c0dc5SEd Tanous     {PortConnectionType::PrivateLoop, "PrivateLoop"},
83*853c0dc5SEd Tanous     {PortConnectionType::PublicLoop, "PublicLoop"},
84*853c0dc5SEd Tanous     {PortConnectionType::Generic, "Generic"},
85*853c0dc5SEd Tanous     {PortConnectionType::ExtenderFabric, "ExtenderFabric"},
86*853c0dc5SEd Tanous });
87*853c0dc5SEd Tanous 
88*853c0dc5SEd Tanous }
89*853c0dc5SEd Tanous // clang-format on
90