blob: f76d00e9772de3de31108576cad3a390ccb2523d [file] [log] [blame]
Patrick Venture91ac8d32018-11-01 17:03:22 -07001#include "ledlayout.hpp"
2
3#include <map>
4#include <set>
5#include <string>
6
7static const std::map<std::string, std::set<phosphor::led::Layout::LedAction>>
8 singleLedOn = {
9 {"/xyz/openbmc_project/ledmanager/groups/SingleLed",
10 {
11 {"One", phosphor::led::Layout::On, 0, 0,
12 phosphor::led::Layout::Blink},
13 }},
Vishwanatha Subbannaed490732016-12-20 15:59:29 +053014};
15
Patrick Venture91ac8d32018-11-01 17:03:22 -070016static const std::map<std::string, std::set<phosphor::led::Layout::LedAction>>
17 singleLedBlink = {
18 {"/xyz/openbmc_project/ledmanager/groups/SingleLed",
19 {
20 {"One", phosphor::led::Layout::Blink, 0, 0,
21 phosphor::led::Layout::Blink},
22 }},
Vishwanatha Subbanna4b000d82017-05-03 18:44:16 +053023};
24
Patrick Venture91ac8d32018-11-01 17:03:22 -070025static const std::map<std::string, std::set<phosphor::led::Layout::LedAction>>
26 singleLedBlinkOverrideOn = {
27 {"/xyz/openbmc_project/ledmanager/groups/SingleLed",
28 {
29 {"One", phosphor::led::Layout::Blink, 0, 0,
30 phosphor::led::Layout::On},
31 }},
Vishwanatha Subbannaed490732016-12-20 15:59:29 +053032};
33
Patrick Venture91ac8d32018-11-01 17:03:22 -070034static const std::map<std::string, std::set<phosphor::led::Layout::LedAction>>
35 multipleLedsOn = {
36 {"/xyz/openbmc_project/ledmanager/groups/MultipleLeds",
37 {
38 {"One", phosphor::led::Layout::On, 0, 0,
39 phosphor::led::Layout::On},
40 {"Two", phosphor::led::Layout::On, 0, 0,
41 phosphor::led::Layout::On},
42 {"Three", phosphor::led::Layout::On, 0, 0,
43 phosphor::led::Layout::On},
44 }},
Vishwanatha Subbannaed490732016-12-20 15:59:29 +053045};
46
Patrick Venture91ac8d32018-11-01 17:03:22 -070047static const std::map<std::string, std::set<phosphor::led::Layout::LedAction>>
48 multipleLedsBlink = {
49 {"/xyz/openbmc_project/ledmanager/groups/MultipleLeds",
50 {
51 {"One", phosphor::led::Layout::Blink, 0, 0,
52 phosphor::led::Layout::Blink},
53 {"Two", phosphor::led::Layout::Blink, 0, 0,
54 phosphor::led::Layout::Blink},
55 {"Three", phosphor::led::Layout::Blink, 0, 0,
56 phosphor::led::Layout::Blink},
57 }},
Vishwanatha Subbannaed490732016-12-20 15:59:29 +053058};
59
Patrick Venture91ac8d32018-11-01 17:03:22 -070060static const std::map<std::string, std::set<phosphor::led::Layout::LedAction>>
61 multipleLedsOnAndBlink = {
62 {"/xyz/openbmc_project/ledmanager/groups/MultipleLedsMix",
63 {
64 {"One", phosphor::led::Layout::Blink, 0, 0,
65 phosphor::led::Layout::Blink},
66 {"Two", phosphor::led::Layout::On, 0,
67 phosphor::led::Layout::Blink},
68 {"Three", phosphor::led::Layout::Blink, 0,
69 phosphor::led::Layout::On},
70 {"Four", phosphor::led::Layout::On, 0,
71 phosphor::led::Layout::Blink},
72 {"Five", phosphor::led::Layout::On, 0,
73 phosphor::led::Layout::Blink},
74 }},
Vishwanatha Subbannaed490732016-12-20 15:59:29 +053075};
76
Patrick Venture91ac8d32018-11-01 17:03:22 -070077static const std::map<std::string, std::set<phosphor::led::Layout::LedAction>>
78 twoGroupsWithDistinctLEDsOn = {
79 {"/xyz/openbmc_project/ledmanager/groups/MultipleLedsASet",
80 {
81 {"One", phosphor::led::Layout::On, 0, 0,
82 phosphor::led::Layout::Blink},
83 {"Two", phosphor::led::Layout::On, 0, 0,
84 phosphor::led::Layout::On},
85 {"Three", phosphor::led::Layout::On, 0, 0,
86 phosphor::led::Layout::Blink},
87 }},
88 {"/xyz/openbmc_project/ledmanager/groups/MultipleLedsBSet",
89 {
90 {"Four", phosphor::led::Layout::On, 0, 0,
91 phosphor::led::Layout::Blink},
92 {"Five", phosphor::led::Layout::On, 0, 0,
93 phosphor::led::Layout::Blink},
94 {"Six", phosphor::led::Layout::On, 0, 0,
95 phosphor::led::Layout::On},
96 }},
Vishwanatha Subbannaed490732016-12-20 15:59:29 +053097};
98
Patrick Venture91ac8d32018-11-01 17:03:22 -070099static const std::map<std::string, std::set<phosphor::led::Layout::LedAction>>
100 twoGroupsWithOneComonLEDOn = {
101 {"/xyz/openbmc_project/ledmanager/groups/MultipleLedsASet",
102 {
103 {"One", phosphor::led::Layout::On, 0, 0,
104 phosphor::led::Layout::On},
105 {"Two", phosphor::led::Layout::On, 0, 0,
106 phosphor::led::Layout::On},
107 {"Three", phosphor::led::Layout::On, 0, 0,
108 phosphor::led::Layout::On},
109 }},
110 {"/xyz/openbmc_project/ledmanager/groups/MultipleLedsBSet",
111 {
112 {"Four", phosphor::led::Layout::On, 0, 0,
113 phosphor::led::Layout::On},
114 {"Three", phosphor::led::Layout::On, 0, 0,
115 phosphor::led::Layout::On},
116 {"Six", phosphor::led::Layout::On, 0, 0,
117 phosphor::led::Layout::On},
118 }},
Vishwanatha Subbannaed490732016-12-20 15:59:29 +0530119};
120
Patrick Venture91ac8d32018-11-01 17:03:22 -0700121static const std::map<std::string, std::set<phosphor::led::Layout::LedAction>>
122 twoGroupsWithOneComonLEDOnOneLEDBlinkPriority = {
123 {"/xyz/openbmc_project/ledmanager/groups/MultipleLedsASet",
124 {
125 {"One", phosphor::led::Layout::On, 0, 0,
126 phosphor::led::Layout::On},
127 {"Two", phosphor::led::Layout::On, 0, 0,
128 phosphor::led::Layout::On},
129 {"Three", phosphor::led::Layout::Blink, 0, 0,
130 phosphor::led::Layout::Blink},
131 }},
132 {"/xyz/openbmc_project/ledmanager/groups/MultipleLedsBSet",
133 {
134 {"Four", phosphor::led::Layout::On, 0, 0,
135 phosphor::led::Layout::On},
136 {"Three", phosphor::led::Layout::On, 0, 0,
137 phosphor::led::Layout::Blink},
138 {"Six", phosphor::led::Layout::On, 0, 0,
139 phosphor::led::Layout::On},
140 }},
Vishwanatha Subbanna4b000d82017-05-03 18:44:16 +0530141};
142
Patrick Venture91ac8d32018-11-01 17:03:22 -0700143static const std::map<std::string, std::set<phosphor::led::Layout::LedAction>>
144 twoGroupsWithOneComonLEDOnPriority = {
145 {"/xyz/openbmc_project/ledmanager/groups/MultipleLedsASet",
146 {
147 {"One", phosphor::led::Layout::On, 0, 0,
148 phosphor::led::Layout::On},
149 {"Two", phosphor::led::Layout::On, 0, 0,
150 phosphor::led::Layout::On},
151 {"Three", phosphor::led::Layout::Blink, 0, 0,
152 phosphor::led::Layout::On},
153 }},
154 {"/xyz/openbmc_project/ledmanager/groups/MultipleLedsBSet",
155 {
156 {"Four", phosphor::led::Layout::On, 0, 0,
157 phosphor::led::Layout::On},
158 {"Three", phosphor::led::Layout::On, 0, 0,
159 phosphor::led::Layout::On},
160 {"Six", phosphor::led::Layout::On, 0, 0,
161 phosphor::led::Layout::On},
162 }},
Vishwanatha Subbannaed490732016-12-20 15:59:29 +0530163};
164
Patrick Venture91ac8d32018-11-01 17:03:22 -0700165static const std::map<std::string, std::set<phosphor::led::Layout::LedAction>>
166 twoGroupsWithMultiplComonLEDOn = {
167 {"/xyz/openbmc_project/ledmanager/groups/MultipleLedsASet",
168 {
169 {"One", phosphor::led::Layout::On, 0, 0,
170 phosphor::led::Layout::On},
171 {"Two", phosphor::led::Layout::On, 0, 0,
172 phosphor::led::Layout::On},
173 {"Three", phosphor::led::Layout::On, 0, 0,
174 phosphor::led::Layout::On},
175 }},
176 {"/xyz/openbmc_project/ledmanager/groups/MultipleLedsBSet",
177 {
178 {"Two", phosphor::led::Layout::On, 0, 0,
179 phosphor::led::Layout::On},
180 {"Six", phosphor::led::Layout::On, 0, 0,
181 phosphor::led::Layout::On},
182 {"Three", phosphor::led::Layout::On, 0, 0,
183 phosphor::led::Layout::On},
184 {"Seven", phosphor::led::Layout::On, 0, 0,
185 phosphor::led::Layout::On},
186 }},
Vishwanatha Subbannaed490732016-12-20 15:59:29 +0530187};
188
Patrick Venture91ac8d32018-11-01 17:03:22 -0700189static const std::map<std::string, std::set<phosphor::led::Layout::LedAction>>
190 twoGroupsWithMultipleComonLEDInDifferentState = {
191 {"/xyz/openbmc_project/ledmanager/groups/MultipleLedsASet",
192 {
193 {"One", phosphor::led::Layout::On, 0, 0,
194 phosphor::led::Layout::On},
195 {"Two", phosphor::led::Layout::Blink, 0, 0,
196 phosphor::led::Layout::On},
197 {"Three", phosphor::led::Layout::Blink, 0, 0,
198 phosphor::led::Layout::On},
199 {"Four", phosphor::led::Layout::On, 0, 0,
200 phosphor::led::Layout::On},
201 }},
202 {"/xyz/openbmc_project/ledmanager/groups/MultipleLedsBSet",
203 {
204 {"Two", phosphor::led::Layout::On, 0, 0,
205 phosphor::led::Layout::On},
206 {"Three", phosphor::led::Layout::Blink, 0, 0,
207 phosphor::led::Layout::On},
208 {"Five", phosphor::led::Layout::On, 0, 0,
209 phosphor::led::Layout::On},
210 {"Six", phosphor::led::Layout::On, 0, 0,
211 phosphor::led::Layout::On},
212 }},
Vishwanatha Subbannaed490732016-12-20 15:59:29 +0530213};
Vishwanatha Subbannacd569d22017-05-03 12:46:14 +0530214
Patrick Venture91ac8d32018-11-01 17:03:22 -0700215static const std::map<std::string, std::set<phosphor::led::Layout::LedAction>>
216 twoGroupsWithMultipleComonLEDInDifferentStateDiffPriority = {
217 {"/xyz/openbmc_project/ledmanager/groups/MultipleLedsASet",
218 {
219 {"One", phosphor::led::Layout::On, 0, 0,
220 phosphor::led::Layout::On},
221 {"Two", phosphor::led::Layout::Blink, 0, 0,
222 phosphor::led::Layout::On},
223 {"Three", phosphor::led::Layout::On, 0, 0,
224 phosphor::led::Layout::Blink},
225 {"Four", phosphor::led::Layout::On, 0, 0,
226 phosphor::led::Layout::On},
227 {"Ten", phosphor::led::Layout::Blink, 0, 0,
228 phosphor::led::Layout::Blink},
229 }},
230 {"/xyz/openbmc_project/ledmanager/groups/MultipleLedsBSet",
231 {
232 {"Two", phosphor::led::Layout::On, 0, 0,
233 phosphor::led::Layout::On},
234 {"Three", phosphor::led::Layout::On, 0, 0,
235 phosphor::led::Layout::Blink},
236 {"Five", phosphor::led::Layout::On, 0, 0,
237 phosphor::led::Layout::On},
238 {"Six", phosphor::led::Layout::On, 0, 0,
239 phosphor::led::Layout::On},
240 {"Ten", phosphor::led::Layout::On, 0, 0,
241 phosphor::led::Layout::Blink},
242 }},
Vishwanatha Subbannacd569d22017-05-03 12:46:14 +0530243};