xref: /openbmc/phosphor-led-manager/test/led-test-map.hpp (revision 91ac8d3aade91fb99f496c05114291fcb6bf1856)
1*91ac8d3aSPatrick Venture #include "ledlayout.hpp"
2*91ac8d3aSPatrick Venture 
3*91ac8d3aSPatrick Venture #include <map>
4*91ac8d3aSPatrick Venture #include <set>
5*91ac8d3aSPatrick Venture #include <string>
6*91ac8d3aSPatrick Venture 
7*91ac8d3aSPatrick Venture static const std::map<std::string, std::set<phosphor::led::Layout::LedAction>>
8*91ac8d3aSPatrick Venture     singleLedOn = {
9*91ac8d3aSPatrick Venture         {"/xyz/openbmc_project/ledmanager/groups/SingleLed",
10*91ac8d3aSPatrick Venture          {
11*91ac8d3aSPatrick Venture              {"One", phosphor::led::Layout::On, 0, 0,
12*91ac8d3aSPatrick Venture               phosphor::led::Layout::Blink},
13*91ac8d3aSPatrick Venture          }},
14ed490734SVishwanatha Subbanna };
15ed490734SVishwanatha Subbanna 
16*91ac8d3aSPatrick Venture static const std::map<std::string, std::set<phosphor::led::Layout::LedAction>>
17*91ac8d3aSPatrick Venture     singleLedBlink = {
18*91ac8d3aSPatrick Venture         {"/xyz/openbmc_project/ledmanager/groups/SingleLed",
19*91ac8d3aSPatrick Venture          {
20*91ac8d3aSPatrick Venture              {"One", phosphor::led::Layout::Blink, 0, 0,
21*91ac8d3aSPatrick Venture               phosphor::led::Layout::Blink},
22*91ac8d3aSPatrick Venture          }},
234b000d8dSVishwanatha Subbanna };
244b000d8dSVishwanatha Subbanna 
25*91ac8d3aSPatrick Venture static const std::map<std::string, std::set<phosphor::led::Layout::LedAction>>
26*91ac8d3aSPatrick Venture     singleLedBlinkOverrideOn = {
27*91ac8d3aSPatrick Venture         {"/xyz/openbmc_project/ledmanager/groups/SingleLed",
28*91ac8d3aSPatrick Venture          {
29*91ac8d3aSPatrick Venture              {"One", phosphor::led::Layout::Blink, 0, 0,
30*91ac8d3aSPatrick Venture               phosphor::led::Layout::On},
31*91ac8d3aSPatrick Venture          }},
32ed490734SVishwanatha Subbanna };
33ed490734SVishwanatha Subbanna 
34*91ac8d3aSPatrick Venture static const std::map<std::string, std::set<phosphor::led::Layout::LedAction>>
35*91ac8d3aSPatrick Venture     multipleLedsOn = {
36*91ac8d3aSPatrick Venture         {"/xyz/openbmc_project/ledmanager/groups/MultipleLeds",
37*91ac8d3aSPatrick Venture          {
38*91ac8d3aSPatrick Venture              {"One", phosphor::led::Layout::On, 0, 0,
39*91ac8d3aSPatrick Venture               phosphor::led::Layout::On},
40*91ac8d3aSPatrick Venture              {"Two", phosphor::led::Layout::On, 0, 0,
41*91ac8d3aSPatrick Venture               phosphor::led::Layout::On},
42*91ac8d3aSPatrick Venture              {"Three", phosphor::led::Layout::On, 0, 0,
43*91ac8d3aSPatrick Venture               phosphor::led::Layout::On},
44*91ac8d3aSPatrick Venture          }},
45*91ac8d3aSPatrick Venture };
46*91ac8d3aSPatrick Venture 
47*91ac8d3aSPatrick Venture static const std::map<std::string, std::set<phosphor::led::Layout::LedAction>>
48*91ac8d3aSPatrick Venture     multipleLedsBlink = {
49*91ac8d3aSPatrick Venture         {"/xyz/openbmc_project/ledmanager/groups/MultipleLeds",
50*91ac8d3aSPatrick Venture          {
51*91ac8d3aSPatrick Venture              {"One", phosphor::led::Layout::Blink, 0, 0,
52*91ac8d3aSPatrick Venture               phosphor::led::Layout::Blink},
53*91ac8d3aSPatrick Venture              {"Two", phosphor::led::Layout::Blink, 0, 0,
54*91ac8d3aSPatrick Venture               phosphor::led::Layout::Blink},
55*91ac8d3aSPatrick Venture              {"Three", phosphor::led::Layout::Blink, 0, 0,
56*91ac8d3aSPatrick Venture               phosphor::led::Layout::Blink},
57*91ac8d3aSPatrick Venture          }},
58*91ac8d3aSPatrick Venture };
59*91ac8d3aSPatrick Venture 
60*91ac8d3aSPatrick Venture static const std::map<std::string, std::set<phosphor::led::Layout::LedAction>>
61*91ac8d3aSPatrick Venture     multipleLedsOnAndBlink = {
62*91ac8d3aSPatrick Venture         {"/xyz/openbmc_project/ledmanager/groups/MultipleLedsMix",
63*91ac8d3aSPatrick Venture          {
64*91ac8d3aSPatrick Venture              {"One", phosphor::led::Layout::Blink, 0, 0,
65*91ac8d3aSPatrick Venture               phosphor::led::Layout::Blink},
664b000d8dSVishwanatha Subbanna              {"Two", phosphor::led::Layout::On, 0,
67*91ac8d3aSPatrick Venture               phosphor::led::Layout::Blink},
684b000d8dSVishwanatha Subbanna              {"Three", phosphor::led::Layout::Blink, 0,
69*91ac8d3aSPatrick Venture               phosphor::led::Layout::On},
704b000d8dSVishwanatha Subbanna              {"Four", phosphor::led::Layout::On, 0,
71*91ac8d3aSPatrick Venture               phosphor::led::Layout::Blink},
724b000d8dSVishwanatha Subbanna              {"Five", phosphor::led::Layout::On, 0,
73*91ac8d3aSPatrick Venture               phosphor::led::Layout::Blink},
74*91ac8d3aSPatrick Venture          }},
75ed490734SVishwanatha Subbanna };
76ed490734SVishwanatha Subbanna 
77*91ac8d3aSPatrick Venture static const std::map<std::string, std::set<phosphor::led::Layout::LedAction>>
78*91ac8d3aSPatrick Venture     twoGroupsWithDistinctLEDsOn = {
79*91ac8d3aSPatrick Venture         {"/xyz/openbmc_project/ledmanager/groups/MultipleLedsASet",
80*91ac8d3aSPatrick Venture          {
81*91ac8d3aSPatrick Venture              {"One", phosphor::led::Layout::On, 0, 0,
82*91ac8d3aSPatrick Venture               phosphor::led::Layout::Blink},
83*91ac8d3aSPatrick Venture              {"Two", phosphor::led::Layout::On, 0, 0,
84*91ac8d3aSPatrick Venture               phosphor::led::Layout::On},
85*91ac8d3aSPatrick Venture              {"Three", phosphor::led::Layout::On, 0, 0,
86*91ac8d3aSPatrick Venture               phosphor::led::Layout::Blink},
87*91ac8d3aSPatrick Venture          }},
88*91ac8d3aSPatrick Venture         {"/xyz/openbmc_project/ledmanager/groups/MultipleLedsBSet",
89*91ac8d3aSPatrick Venture          {
90*91ac8d3aSPatrick Venture              {"Four", phosphor::led::Layout::On, 0, 0,
91*91ac8d3aSPatrick Venture               phosphor::led::Layout::Blink},
92*91ac8d3aSPatrick Venture              {"Five", phosphor::led::Layout::On, 0, 0,
93*91ac8d3aSPatrick Venture               phosphor::led::Layout::Blink},
94*91ac8d3aSPatrick Venture              {"Six", phosphor::led::Layout::On, 0, 0,
95*91ac8d3aSPatrick Venture               phosphor::led::Layout::On},
96*91ac8d3aSPatrick Venture          }},
97ed490734SVishwanatha Subbanna };
98ed490734SVishwanatha Subbanna 
99*91ac8d3aSPatrick Venture static const std::map<std::string, std::set<phosphor::led::Layout::LedAction>>
100*91ac8d3aSPatrick Venture     twoGroupsWithOneComonLEDOn = {
101*91ac8d3aSPatrick Venture         {"/xyz/openbmc_project/ledmanager/groups/MultipleLedsASet",
102*91ac8d3aSPatrick Venture          {
103*91ac8d3aSPatrick Venture              {"One", phosphor::led::Layout::On, 0, 0,
104*91ac8d3aSPatrick Venture               phosphor::led::Layout::On},
105*91ac8d3aSPatrick Venture              {"Two", phosphor::led::Layout::On, 0, 0,
106*91ac8d3aSPatrick Venture               phosphor::led::Layout::On},
107*91ac8d3aSPatrick Venture              {"Three", phosphor::led::Layout::On, 0, 0,
108*91ac8d3aSPatrick Venture               phosphor::led::Layout::On},
109*91ac8d3aSPatrick Venture          }},
110*91ac8d3aSPatrick Venture         {"/xyz/openbmc_project/ledmanager/groups/MultipleLedsBSet",
111*91ac8d3aSPatrick Venture          {
112*91ac8d3aSPatrick Venture              {"Four", phosphor::led::Layout::On, 0, 0,
113*91ac8d3aSPatrick Venture               phosphor::led::Layout::On},
114*91ac8d3aSPatrick Venture              {"Three", phosphor::led::Layout::On, 0, 0,
115*91ac8d3aSPatrick Venture               phosphor::led::Layout::On},
116*91ac8d3aSPatrick Venture              {"Six", phosphor::led::Layout::On, 0, 0,
117*91ac8d3aSPatrick Venture               phosphor::led::Layout::On},
118*91ac8d3aSPatrick Venture          }},
1194b000d8dSVishwanatha Subbanna };
1204b000d8dSVishwanatha Subbanna 
121*91ac8d3aSPatrick Venture static const std::map<std::string, std::set<phosphor::led::Layout::LedAction>>
122*91ac8d3aSPatrick Venture     twoGroupsWithOneComonLEDOnOneLEDBlinkPriority = {
123*91ac8d3aSPatrick Venture         {"/xyz/openbmc_project/ledmanager/groups/MultipleLedsASet",
124*91ac8d3aSPatrick Venture          {
125*91ac8d3aSPatrick Venture              {"One", phosphor::led::Layout::On, 0, 0,
126*91ac8d3aSPatrick Venture               phosphor::led::Layout::On},
127*91ac8d3aSPatrick Venture              {"Two", phosphor::led::Layout::On, 0, 0,
128*91ac8d3aSPatrick Venture               phosphor::led::Layout::On},
129*91ac8d3aSPatrick Venture              {"Three", phosphor::led::Layout::Blink, 0, 0,
130*91ac8d3aSPatrick Venture               phosphor::led::Layout::Blink},
131*91ac8d3aSPatrick Venture          }},
132*91ac8d3aSPatrick Venture         {"/xyz/openbmc_project/ledmanager/groups/MultipleLedsBSet",
133*91ac8d3aSPatrick Venture          {
134*91ac8d3aSPatrick Venture              {"Four", phosphor::led::Layout::On, 0, 0,
135*91ac8d3aSPatrick Venture               phosphor::led::Layout::On},
136*91ac8d3aSPatrick Venture              {"Three", phosphor::led::Layout::On, 0, 0,
137*91ac8d3aSPatrick Venture               phosphor::led::Layout::Blink},
138*91ac8d3aSPatrick Venture              {"Six", phosphor::led::Layout::On, 0, 0,
139*91ac8d3aSPatrick Venture               phosphor::led::Layout::On},
140*91ac8d3aSPatrick Venture          }},
141ed490734SVishwanatha Subbanna };
142ed490734SVishwanatha Subbanna 
143*91ac8d3aSPatrick Venture static const std::map<std::string, std::set<phosphor::led::Layout::LedAction>>
144*91ac8d3aSPatrick Venture     twoGroupsWithOneComonLEDOnPriority = {
145*91ac8d3aSPatrick Venture         {"/xyz/openbmc_project/ledmanager/groups/MultipleLedsASet",
146*91ac8d3aSPatrick Venture          {
147*91ac8d3aSPatrick Venture              {"One", phosphor::led::Layout::On, 0, 0,
148*91ac8d3aSPatrick Venture               phosphor::led::Layout::On},
149*91ac8d3aSPatrick Venture              {"Two", phosphor::led::Layout::On, 0, 0,
150*91ac8d3aSPatrick Venture               phosphor::led::Layout::On},
151*91ac8d3aSPatrick Venture              {"Three", phosphor::led::Layout::Blink, 0, 0,
152*91ac8d3aSPatrick Venture               phosphor::led::Layout::On},
153*91ac8d3aSPatrick Venture          }},
154*91ac8d3aSPatrick Venture         {"/xyz/openbmc_project/ledmanager/groups/MultipleLedsBSet",
155*91ac8d3aSPatrick Venture          {
156*91ac8d3aSPatrick Venture              {"Four", phosphor::led::Layout::On, 0, 0,
157*91ac8d3aSPatrick Venture               phosphor::led::Layout::On},
158*91ac8d3aSPatrick Venture              {"Three", phosphor::led::Layout::On, 0, 0,
159*91ac8d3aSPatrick Venture               phosphor::led::Layout::On},
160*91ac8d3aSPatrick Venture              {"Six", phosphor::led::Layout::On, 0, 0,
161*91ac8d3aSPatrick Venture               phosphor::led::Layout::On},
162*91ac8d3aSPatrick Venture          }},
163*91ac8d3aSPatrick Venture };
164*91ac8d3aSPatrick Venture 
165*91ac8d3aSPatrick Venture static const std::map<std::string, std::set<phosphor::led::Layout::LedAction>>
166ed490734SVishwanatha Subbanna     twoGroupsWithMultiplComonLEDOn = {
167*91ac8d3aSPatrick Venture         {"/xyz/openbmc_project/ledmanager/groups/MultipleLedsASet",
168*91ac8d3aSPatrick Venture          {
169*91ac8d3aSPatrick Venture              {"One", phosphor::led::Layout::On, 0, 0,
170*91ac8d3aSPatrick Venture               phosphor::led::Layout::On},
171*91ac8d3aSPatrick Venture              {"Two", phosphor::led::Layout::On, 0, 0,
172*91ac8d3aSPatrick Venture               phosphor::led::Layout::On},
173*91ac8d3aSPatrick Venture              {"Three", phosphor::led::Layout::On, 0, 0,
174*91ac8d3aSPatrick Venture               phosphor::led::Layout::On},
175*91ac8d3aSPatrick Venture          }},
176*91ac8d3aSPatrick Venture         {"/xyz/openbmc_project/ledmanager/groups/MultipleLedsBSet",
177*91ac8d3aSPatrick Venture          {
178*91ac8d3aSPatrick Venture              {"Two", phosphor::led::Layout::On, 0, 0,
179*91ac8d3aSPatrick Venture               phosphor::led::Layout::On},
180*91ac8d3aSPatrick Venture              {"Six", phosphor::led::Layout::On, 0, 0,
181*91ac8d3aSPatrick Venture               phosphor::led::Layout::On},
182*91ac8d3aSPatrick Venture              {"Three", phosphor::led::Layout::On, 0, 0,
183*91ac8d3aSPatrick Venture               phosphor::led::Layout::On},
184*91ac8d3aSPatrick Venture              {"Seven", phosphor::led::Layout::On, 0, 0,
185*91ac8d3aSPatrick Venture               phosphor::led::Layout::On},
186*91ac8d3aSPatrick Venture          }},
187ed490734SVishwanatha Subbanna };
188ed490734SVishwanatha Subbanna 
189*91ac8d3aSPatrick Venture static const std::map<std::string, std::set<phosphor::led::Layout::LedAction>>
190ed490734SVishwanatha Subbanna     twoGroupsWithMultipleComonLEDInDifferentState = {
191*91ac8d3aSPatrick Venture         {"/xyz/openbmc_project/ledmanager/groups/MultipleLedsASet",
192*91ac8d3aSPatrick Venture          {
193*91ac8d3aSPatrick Venture              {"One", phosphor::led::Layout::On, 0, 0,
194*91ac8d3aSPatrick Venture               phosphor::led::Layout::On},
195*91ac8d3aSPatrick Venture              {"Two", phosphor::led::Layout::Blink, 0, 0,
196*91ac8d3aSPatrick Venture               phosphor::led::Layout::On},
197*91ac8d3aSPatrick Venture              {"Three", phosphor::led::Layout::Blink, 0, 0,
198*91ac8d3aSPatrick Venture               phosphor::led::Layout::On},
199*91ac8d3aSPatrick Venture              {"Four", phosphor::led::Layout::On, 0, 0,
200*91ac8d3aSPatrick Venture               phosphor::led::Layout::On},
201*91ac8d3aSPatrick Venture          }},
202*91ac8d3aSPatrick Venture         {"/xyz/openbmc_project/ledmanager/groups/MultipleLedsBSet",
203*91ac8d3aSPatrick Venture          {
204*91ac8d3aSPatrick Venture              {"Two", phosphor::led::Layout::On, 0, 0,
205*91ac8d3aSPatrick Venture               phosphor::led::Layout::On},
206*91ac8d3aSPatrick Venture              {"Three", phosphor::led::Layout::Blink, 0, 0,
207*91ac8d3aSPatrick Venture               phosphor::led::Layout::On},
208*91ac8d3aSPatrick Venture              {"Five", phosphor::led::Layout::On, 0, 0,
209*91ac8d3aSPatrick Venture               phosphor::led::Layout::On},
210*91ac8d3aSPatrick Venture              {"Six", phosphor::led::Layout::On, 0, 0,
211*91ac8d3aSPatrick Venture               phosphor::led::Layout::On},
212*91ac8d3aSPatrick Venture          }},
213ed490734SVishwanatha Subbanna };
214cd569d24SVishwanatha Subbanna 
215*91ac8d3aSPatrick Venture static const std::map<std::string, std::set<phosphor::led::Layout::LedAction>>
2164b000d8dSVishwanatha Subbanna     twoGroupsWithMultipleComonLEDInDifferentStateDiffPriority = {
217*91ac8d3aSPatrick Venture         {"/xyz/openbmc_project/ledmanager/groups/MultipleLedsASet",
218*91ac8d3aSPatrick Venture          {
219*91ac8d3aSPatrick Venture              {"One", phosphor::led::Layout::On, 0, 0,
220*91ac8d3aSPatrick Venture               phosphor::led::Layout::On},
221*91ac8d3aSPatrick Venture              {"Two", phosphor::led::Layout::Blink, 0, 0,
222*91ac8d3aSPatrick Venture               phosphor::led::Layout::On},
223*91ac8d3aSPatrick Venture              {"Three", phosphor::led::Layout::On, 0, 0,
224*91ac8d3aSPatrick Venture               phosphor::led::Layout::Blink},
225*91ac8d3aSPatrick Venture              {"Four", phosphor::led::Layout::On, 0, 0,
226*91ac8d3aSPatrick Venture               phosphor::led::Layout::On},
227*91ac8d3aSPatrick Venture              {"Ten", phosphor::led::Layout::Blink, 0, 0,
228*91ac8d3aSPatrick Venture               phosphor::led::Layout::Blink},
229*91ac8d3aSPatrick Venture          }},
230*91ac8d3aSPatrick Venture         {"/xyz/openbmc_project/ledmanager/groups/MultipleLedsBSet",
231*91ac8d3aSPatrick Venture          {
232*91ac8d3aSPatrick Venture              {"Two", phosphor::led::Layout::On, 0, 0,
233*91ac8d3aSPatrick Venture               phosphor::led::Layout::On},
234*91ac8d3aSPatrick Venture              {"Three", phosphor::led::Layout::On, 0, 0,
235*91ac8d3aSPatrick Venture               phosphor::led::Layout::Blink},
236*91ac8d3aSPatrick Venture              {"Five", phosphor::led::Layout::On, 0, 0,
237*91ac8d3aSPatrick Venture               phosphor::led::Layout::On},
238*91ac8d3aSPatrick Venture              {"Six", phosphor::led::Layout::On, 0, 0,
239*91ac8d3aSPatrick Venture               phosphor::led::Layout::On},
240*91ac8d3aSPatrick Venture              {"Ten", phosphor::led::Layout::On, 0, 0,
241*91ac8d3aSPatrick Venture               phosphor::led::Layout::Blink},
242*91ac8d3aSPatrick Venture          }},
243cd569d24SVishwanatha Subbanna };
244