xref: /openbmc/bmcweb/redfish-core/include/generated/enums/serial_interface.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 serial_interface
7 {
8 // clang-format off
9 
10 enum class SignalType{
11     Invalid,
12     Rs232,
13     Rs485,
14 };
15 
16 enum class Parity{
17     Invalid,
18     None,
19     Even,
20     Odd,
21     Mark,
22     Space,
23 };
24 
25 enum class FlowControl{
26     Invalid,
27     None,
28     Software,
29     Hardware,
30 };
31 
32 enum class PinOut{
33     Invalid,
34     Cisco,
35     Cyclades,
36     Digi,
37 };
38 
39 NLOHMANN_JSON_SERIALIZE_ENUM(SignalType, {
40     {SignalType::Invalid, "Invalid"},
41     {SignalType::Rs232, "Rs232"},
42     {SignalType::Rs485, "Rs485"},
43 });
44 
45 NLOHMANN_JSON_SERIALIZE_ENUM(Parity, {
46     {Parity::Invalid, "Invalid"},
47     {Parity::None, "None"},
48     {Parity::Even, "Even"},
49     {Parity::Odd, "Odd"},
50     {Parity::Mark, "Mark"},
51     {Parity::Space, "Space"},
52 });
53 
54 NLOHMANN_JSON_SERIALIZE_ENUM(FlowControl, {
55     {FlowControl::Invalid, "Invalid"},
56     {FlowControl::None, "None"},
57     {FlowControl::Software, "Software"},
58     {FlowControl::Hardware, "Hardware"},
59 });
60 
61 NLOHMANN_JSON_SERIALIZE_ENUM(PinOut, {
62     {PinOut::Invalid, "Invalid"},
63     {PinOut::Cisco, "Cisco"},
64     {PinOut::Cyclades, "Cyclades"},
65     {PinOut::Digi, "Digi"},
66 });
67 
68 }
69 // clang-format on
70