My Project
Loading...
Searching...
No Matches
enums.h
Go to the documentation of this file.
1
#pragma once
2
3
#include <map>
4
5
enum
ChannelType
{
6
EspPinChannel
= 0,
7
BleHubChannel
8
};
9
10
// String switch paridgam
11
struct
channelTypeMap
:
public
std::map<std::string, ChannelType> {
12
channelTypeMap
()
13
{
14
this->operator[](
"espPin"
) =
ChannelType::EspPinChannel
;
15
this->operator[](
"bleHub"
) =
ChannelType::BleHubChannel
;
16
};
17
~channelTypeMap
() {}
18
};
19
20
enum
DeviceType
{
21
Nothing
,
22
Motor
,
23
Light
,
24
StatusLight
25
};
26
27
// String switch paridgam
28
struct
deviceTypeMap
:
public
std::map<std::string, DeviceType> {
29
deviceTypeMap
()
30
{
31
this->operator[](
""
) =
DeviceType::Nothing
;
32
this->operator[](
"nothing"
) =
DeviceType::Nothing
;
33
this->operator[](
"motor"
) =
DeviceType::Motor
;
34
this->operator[](
"light"
) =
DeviceType::Light
;
35
this->operator[](
"status"
) =
DeviceType::StatusLight
;
36
};
37
~deviceTypeMap
() {}
38
};
39
40
enum
HubLedColor
{
41
BLACK
= 0,
42
PINK
= 1,
43
PURPLE
= 2,
44
BLUE
= 3,
45
LIGHTBLUE
= 4,
46
CYAN
= 5,
47
GREEN
= 6,
48
YELLOW
= 7,
49
ORANGE
= 8,
50
RED
= 9,
51
WHITE
= 10,
52
NUM_COLORS
,
53
NONE
= 255
54
};
55
56
// String switch paridgam
57
struct
hubLedColorMap
:
public
std::map<std::string, HubLedColor> {
58
hubLedColorMap
()
59
{
60
this->operator[](
""
) =
HubLedColor::NONE
;
61
this->operator[](
"off"
) =
HubLedColor::BLACK
;
62
this->operator[](
"black"
) =
HubLedColor::BLACK
;
63
this->operator[](
"pink"
) =
HubLedColor::PINK
;
64
this->operator[](
"purple"
) =
HubLedColor::PURPLE
;
65
this->operator[](
"blue"
) =
HubLedColor::BLUE
;
66
this->operator[](
"lightblue"
) =
HubLedColor::LIGHTBLUE
;
67
this->operator[](
"cyan"
) =
HubLedColor::CYAN
;
68
this->operator[](
"green"
) =
HubLedColor::GREEN
;
69
this->operator[](
"yellow"
) =
HubLedColor::YELLOW
;
70
this->operator[](
"orange"
) =
HubLedColor::ORANGE
;
71
this->operator[](
"red"
) =
HubLedColor::RED
;
72
this->operator[](
"white"
) =
HubLedColor::WHITE
;
73
};
74
~hubLedColorMap
() {}
75
};
76
77
enum
MCTriggerSource
{
78
// Locomotive.
79
Loco
,
80
81
// RocRail.
82
RocRail
83
};
84
85
// String switch paridgam
86
struct
triggerSourceMap
:
public
std::map<std::string, MCTriggerSource> {
87
triggerSourceMap
()
88
{
89
this->operator[](
""
) =
MCTriggerSource::Loco
;
90
this->operator[](
"loco"
) =
MCTriggerSource::Loco
;
91
this->operator[](
"rr"
) =
MCTriggerSource::RocRail
;
92
};
93
~triggerSourceMap
() {}
94
};
95
96
// Function supported by the generic controller.
97
enum
MCFunction
{
98
Status
,
99
F0
,
100
F1
,
101
F2
,
102
F3
,
103
F4
,
104
F5
,
105
F6
,
106
F7
,
107
F8
,
108
F9
,
109
F10
,
110
F11
,
111
F12
,
112
F13
,
113
F14
,
114
F15
,
115
F16
,
116
F17
,
117
F18
,
118
F19
,
119
F20
,
120
F21
,
121
F22
,
122
F23
,
123
F24
,
124
F25
,
125
F26
,
126
F27
,
127
F28
,
128
F29
,
129
F30
,
130
F31
,
131
F32
132
};
133
134
// String switch paridgam
135
struct
functionMap
:
public
std::map<std::string, MCFunction> {
136
functionMap
()
137
{
138
this->operator[](
"status"
) =
MCFunction::Status
;
139
this->operator[](
"f0"
) =
MCFunction::F0
;
140
this->operator[](
"f1"
) =
MCFunction::F1
;
141
this->operator[](
"f2"
) =
MCFunction::F2
;
142
this->operator[](
"f3"
) =
MCFunction::F3
;
143
this->operator[](
"f4"
) =
MCFunction::F4
;
144
this->operator[](
"f5"
) =
MCFunction::F5
;
145
this->operator[](
"f6"
) =
MCFunction::F6
;
146
this->operator[](
"f7"
) =
MCFunction::F7
;
147
this->operator[](
"f8"
) =
MCFunction::F8
;
148
this->operator[](
"f9"
) =
MCFunction::F9
;
149
this->operator[](
"f10"
) =
MCFunction::F10
;
150
this->operator[](
"f11"
) =
MCFunction::F11
;
151
this->operator[](
"f12"
) =
MCFunction::F12
;
152
this->operator[](
"f13"
) =
MCFunction::F13
;
153
this->operator[](
"f14"
) =
MCFunction::F14
;
154
this->operator[](
"f15"
) =
MCFunction::F15
;
155
this->operator[](
"f16"
) =
MCFunction::F16
;
156
this->operator[](
"f17"
) =
MCFunction::F17
;
157
this->operator[](
"f18"
) =
MCFunction::F18
;
158
this->operator[](
"f19"
) =
MCFunction::F19
;
159
this->operator[](
"f20"
) =
MCFunction::F20
;
160
this->operator[](
"f21"
) =
MCFunction::F21
;
161
this->operator[](
"f22"
) =
MCFunction::F22
;
162
this->operator[](
"f23"
) =
MCFunction::F23
;
163
this->operator[](
"f24"
) =
MCFunction::F24
;
164
this->operator[](
"f25"
) =
MCFunction::F25
;
165
this->operator[](
"f26"
) =
MCFunction::F26
;
166
this->operator[](
"f27"
) =
MCFunction::F27
;
167
this->operator[](
"f28"
) =
MCFunction::F28
;
168
this->operator[](
"f29"
) =
MCFunction::F29
;
169
this->operator[](
"f30"
) =
MCFunction::F30
;
170
this->operator[](
"f31"
) =
MCFunction::F31
;
171
this->operator[](
"f32"
) =
MCFunction::F32
;
172
};
173
~functionMap
() {}
174
};
ChannelType
ChannelType
Definition
enums.h:5
BleHubChannel
@ BleHubChannel
Definition
enums.h:7
EspPinChannel
@ EspPinChannel
Definition
enums.h:6
HubLedColor
HubLedColor
Definition
enums.h:40
PINK
@ PINK
Definition
enums.h:42
LIGHTBLUE
@ LIGHTBLUE
Definition
enums.h:45
PURPLE
@ PURPLE
Definition
enums.h:43
WHITE
@ WHITE
Definition
enums.h:51
BLUE
@ BLUE
Definition
enums.h:44
GREEN
@ GREEN
Definition
enums.h:47
CYAN
@ CYAN
Definition
enums.h:46
NONE
@ NONE
Definition
enums.h:53
NUM_COLORS
@ NUM_COLORS
Definition
enums.h:52
ORANGE
@ ORANGE
Definition
enums.h:49
YELLOW
@ YELLOW
Definition
enums.h:48
BLACK
@ BLACK
Definition
enums.h:41
RED
@ RED
Definition
enums.h:50
MCFunction
MCFunction
Definition
enums.h:97
F3
@ F3
Definition
enums.h:102
F24
@ F24
Definition
enums.h:123
F0
@ F0
Definition
enums.h:99
F5
@ F5
Definition
enums.h:104
F30
@ F30
Definition
enums.h:129
Status
@ Status
Definition
enums.h:98
F16
@ F16
Definition
enums.h:115
F19
@ F19
Definition
enums.h:118
F17
@ F17
Definition
enums.h:116
F28
@ F28
Definition
enums.h:127
F11
@ F11
Definition
enums.h:110
F26
@ F26
Definition
enums.h:125
F1
@ F1
Definition
enums.h:100
F23
@ F23
Definition
enums.h:122
F18
@ F18
Definition
enums.h:117
F7
@ F7
Definition
enums.h:106
F31
@ F31
Definition
enums.h:130
F12
@ F12
Definition
enums.h:111
F14
@ F14
Definition
enums.h:113
F4
@ F4
Definition
enums.h:103
F32
@ F32
Definition
enums.h:131
F9
@ F9
Definition
enums.h:108
F6
@ F6
Definition
enums.h:105
F2
@ F2
Definition
enums.h:101
F27
@ F27
Definition
enums.h:126
F22
@ F22
Definition
enums.h:121
F13
@ F13
Definition
enums.h:112
F8
@ F8
Definition
enums.h:107
F20
@ F20
Definition
enums.h:119
F21
@ F21
Definition
enums.h:120
F15
@ F15
Definition
enums.h:114
F10
@ F10
Definition
enums.h:109
F25
@ F25
Definition
enums.h:124
F29
@ F29
Definition
enums.h:128
MCTriggerSource
MCTriggerSource
Definition
enums.h:77
Loco
@ Loco
Definition
enums.h:79
RocRail
@ RocRail
Definition
enums.h:82
DeviceType
DeviceType
Definition
enums.h:20
Nothing
@ Nothing
Definition
enums.h:21
Motor
@ Motor
Definition
enums.h:22
Light
@ Light
Definition
enums.h:23
StatusLight
@ StatusLight
Definition
enums.h:24
channelTypeMap
Definition
enums.h:11
channelTypeMap::channelTypeMap
channelTypeMap()
Definition
enums.h:12
channelTypeMap::~channelTypeMap
~channelTypeMap()
Definition
enums.h:17
deviceTypeMap
Definition
enums.h:28
deviceTypeMap::~deviceTypeMap
~deviceTypeMap()
Definition
enums.h:37
deviceTypeMap::deviceTypeMap
deviceTypeMap()
Definition
enums.h:29
functionMap
Definition
enums.h:135
functionMap::~functionMap
~functionMap()
Definition
enums.h:173
functionMap::functionMap
functionMap()
Definition
enums.h:136
hubLedColorMap
Definition
enums.h:57
hubLedColorMap::~hubLedColorMap
~hubLedColorMap()
Definition
enums.h:74
hubLedColorMap::hubLedColorMap
hubLedColorMap()
Definition
enums.h:58
triggerSourceMap
Definition
enums.h:86
triggerSourceMap::triggerSourceMap
triggerSourceMap()
Definition
enums.h:87
triggerSourceMap::~triggerSourceMap
~triggerSourceMap()
Definition
enums.h:93
src
MattzoStuff
MattzoControllers
src
lib
MController
enums.h
Generated by
1.10.0