xref: /openbmc/phosphor-led-manager/test/led-test-map.hpp (revision ed80e885f8acbe565098177f844a42e038b90035)
191ac8d3aSPatrick Venture #include "ledlayout.hpp"
291ac8d3aSPatrick Venture 
391ac8d3aSPatrick Venture #include <map>
491ac8d3aSPatrick Venture #include <set>
591ac8d3aSPatrick Venture #include <string>
691ac8d3aSPatrick Venture 
791ac8d3aSPatrick Venture static const std::map<std::string, std::set<phosphor::led::Layout::LedAction>>
891ac8d3aSPatrick Venture     singleLedOn = {
991ac8d3aSPatrick Venture         {"/xyz/openbmc_project/ledmanager/groups/SingleLed",
1091ac8d3aSPatrick Venture          {
11*ed80e885SPatrick Williams              {"One", phosphor::led::Layout::Action::On, 0, 0,
12*ed80e885SPatrick Williams               phosphor::led::Layout::Action::Blink},
1391ac8d3aSPatrick Venture          }},
14ed490734SVishwanatha Subbanna };
15ed490734SVishwanatha Subbanna 
1691ac8d3aSPatrick Venture static const std::map<std::string, std::set<phosphor::led::Layout::LedAction>>
1791ac8d3aSPatrick Venture     singleLedBlink = {
1891ac8d3aSPatrick Venture         {"/xyz/openbmc_project/ledmanager/groups/SingleLed",
1991ac8d3aSPatrick Venture          {
20*ed80e885SPatrick Williams              {"One", phosphor::led::Layout::Action::Blink, 0, 0,
21*ed80e885SPatrick Williams               phosphor::led::Layout::Action::Blink},
2291ac8d3aSPatrick Venture          }},
234b000d8dSVishwanatha Subbanna };
244b000d8dSVishwanatha Subbanna 
2591ac8d3aSPatrick Venture static const std::map<std::string, std::set<phosphor::led::Layout::LedAction>>
2691ac8d3aSPatrick Venture     singleLedBlinkOverrideOn = {
2791ac8d3aSPatrick Venture         {"/xyz/openbmc_project/ledmanager/groups/SingleLed",
2891ac8d3aSPatrick Venture          {
29*ed80e885SPatrick Williams              {"One", phosphor::led::Layout::Action::Blink, 0, 0,
30*ed80e885SPatrick Williams               phosphor::led::Layout::Action::On},
3191ac8d3aSPatrick Venture          }},
32ed490734SVishwanatha Subbanna };
33ed490734SVishwanatha Subbanna 
3491ac8d3aSPatrick Venture static const std::map<std::string, std::set<phosphor::led::Layout::LedAction>>
3591ac8d3aSPatrick Venture     multipleLedsOn = {
3691ac8d3aSPatrick Venture         {"/xyz/openbmc_project/ledmanager/groups/MultipleLeds",
3791ac8d3aSPatrick Venture          {
38*ed80e885SPatrick Williams              {"One", phosphor::led::Layout::Action::On, 0, 0,
39*ed80e885SPatrick Williams               phosphor::led::Layout::Action::On},
40*ed80e885SPatrick Williams              {"Two", phosphor::led::Layout::Action::On, 0, 0,
41*ed80e885SPatrick Williams               phosphor::led::Layout::Action::On},
42*ed80e885SPatrick Williams              {"Three", phosphor::led::Layout::Action::On, 0, 0,
43*ed80e885SPatrick Williams               phosphor::led::Layout::Action::On},
4491ac8d3aSPatrick Venture          }},
4591ac8d3aSPatrick Venture };
4691ac8d3aSPatrick Venture 
4791ac8d3aSPatrick Venture static const std::map<std::string, std::set<phosphor::led::Layout::LedAction>>
4891ac8d3aSPatrick Venture     multipleLedsBlink = {
4991ac8d3aSPatrick Venture         {"/xyz/openbmc_project/ledmanager/groups/MultipleLeds",
5091ac8d3aSPatrick Venture          {
51*ed80e885SPatrick Williams              {"One", phosphor::led::Layout::Action::Blink, 0, 0,
52*ed80e885SPatrick Williams               phosphor::led::Layout::Action::Blink},
53*ed80e885SPatrick Williams              {"Two", phosphor::led::Layout::Action::Blink, 0, 0,
54*ed80e885SPatrick Williams               phosphor::led::Layout::Action::Blink},
55*ed80e885SPatrick Williams              {"Three", phosphor::led::Layout::Action::Blink, 0, 0,
56*ed80e885SPatrick Williams               phosphor::led::Layout::Action::Blink},
5791ac8d3aSPatrick Venture          }},
5891ac8d3aSPatrick Venture };
5991ac8d3aSPatrick Venture 
6091ac8d3aSPatrick Venture static const std::map<std::string, std::set<phosphor::led::Layout::LedAction>>
6191ac8d3aSPatrick Venture     multipleLedsOnAndBlink = {
6291ac8d3aSPatrick Venture         {"/xyz/openbmc_project/ledmanager/groups/MultipleLedsMix",
6391ac8d3aSPatrick Venture          {
64*ed80e885SPatrick Williams              {"One", phosphor::led::Layout::Action::Blink, 0, 0,
65*ed80e885SPatrick Williams               phosphor::led::Layout::Action::Blink},
66*ed80e885SPatrick Williams              {"Two", phosphor::led::Layout::Action::On, 0, 0,
67*ed80e885SPatrick Williams               phosphor::led::Layout::Action::Blink},
68*ed80e885SPatrick Williams              {"Three", phosphor::led::Layout::Action::Blink, 0, 0,
69*ed80e885SPatrick Williams               phosphor::led::Layout::Action::On},
70*ed80e885SPatrick Williams              {"Four", phosphor::led::Layout::Action::On, 0, 0,
71*ed80e885SPatrick Williams               phosphor::led::Layout::Action::Blink},
72*ed80e885SPatrick Williams              {"Five", phosphor::led::Layout::Action::On, 0, 0,
73*ed80e885SPatrick Williams               phosphor::led::Layout::Action::Blink},
7491ac8d3aSPatrick Venture          }},
75ed490734SVishwanatha Subbanna };
76ed490734SVishwanatha Subbanna 
7791ac8d3aSPatrick Venture static const std::map<std::string, std::set<phosphor::led::Layout::LedAction>>
7891ac8d3aSPatrick Venture     twoGroupsWithDistinctLEDsOn = {
7991ac8d3aSPatrick Venture         {"/xyz/openbmc_project/ledmanager/groups/MultipleLedsASet",
8091ac8d3aSPatrick Venture          {
81*ed80e885SPatrick Williams              {"One", phosphor::led::Layout::Action::On, 0, 0,
82*ed80e885SPatrick Williams               phosphor::led::Layout::Action::Blink},
83*ed80e885SPatrick Williams              {"Two", phosphor::led::Layout::Action::On, 0, 0,
84*ed80e885SPatrick Williams               phosphor::led::Layout::Action::On},
85*ed80e885SPatrick Williams              {"Three", phosphor::led::Layout::Action::On, 0, 0,
86*ed80e885SPatrick Williams               phosphor::led::Layout::Action::Blink},
8791ac8d3aSPatrick Venture          }},
8891ac8d3aSPatrick Venture         {"/xyz/openbmc_project/ledmanager/groups/MultipleLedsBSet",
8991ac8d3aSPatrick Venture          {
90*ed80e885SPatrick Williams              {"Four", phosphor::led::Layout::Action::On, 0, 0,
91*ed80e885SPatrick Williams               phosphor::led::Layout::Action::Blink},
92*ed80e885SPatrick Williams              {"Five", phosphor::led::Layout::Action::On, 0, 0,
93*ed80e885SPatrick Williams               phosphor::led::Layout::Action::Blink},
94*ed80e885SPatrick Williams              {"Six", phosphor::led::Layout::Action::On, 0, 0,
95*ed80e885SPatrick Williams               phosphor::led::Layout::Action::On},
9691ac8d3aSPatrick Venture          }},
97ed490734SVishwanatha Subbanna };
98ed490734SVishwanatha Subbanna 
9991ac8d3aSPatrick Venture static const std::map<std::string, std::set<phosphor::led::Layout::LedAction>>
10091ac8d3aSPatrick Venture     twoGroupsWithOneComonLEDOn = {
10191ac8d3aSPatrick Venture         {"/xyz/openbmc_project/ledmanager/groups/MultipleLedsASet",
10291ac8d3aSPatrick Venture          {
103*ed80e885SPatrick Williams              {"One", phosphor::led::Layout::Action::On, 0, 0,
104*ed80e885SPatrick Williams               phosphor::led::Layout::Action::On},
105*ed80e885SPatrick Williams              {"Two", phosphor::led::Layout::Action::On, 0, 0,
106*ed80e885SPatrick Williams               phosphor::led::Layout::Action::On},
107*ed80e885SPatrick Williams              {"Three", phosphor::led::Layout::Action::On, 0, 0,
108*ed80e885SPatrick Williams               phosphor::led::Layout::Action::On},
10991ac8d3aSPatrick Venture          }},
11091ac8d3aSPatrick Venture         {"/xyz/openbmc_project/ledmanager/groups/MultipleLedsBSet",
11191ac8d3aSPatrick Venture          {
112*ed80e885SPatrick Williams              {"Four", phosphor::led::Layout::Action::On, 0, 0,
113*ed80e885SPatrick Williams               phosphor::led::Layout::Action::On},
114*ed80e885SPatrick Williams              {"Three", phosphor::led::Layout::Action::On, 0, 0,
115*ed80e885SPatrick Williams               phosphor::led::Layout::Action::On},
116*ed80e885SPatrick Williams              {"Six", phosphor::led::Layout::Action::On, 0, 0,
117*ed80e885SPatrick Williams               phosphor::led::Layout::Action::On},
11891ac8d3aSPatrick Venture          }},
1194b000d8dSVishwanatha Subbanna };
1204b000d8dSVishwanatha Subbanna 
12191ac8d3aSPatrick Venture static const std::map<std::string, std::set<phosphor::led::Layout::LedAction>>
12291ac8d3aSPatrick Venture     twoGroupsWithOneComonLEDOnOneLEDBlinkPriority = {
12391ac8d3aSPatrick Venture         {"/xyz/openbmc_project/ledmanager/groups/MultipleLedsASet",
12491ac8d3aSPatrick Venture          {
125*ed80e885SPatrick Williams              {"One", phosphor::led::Layout::Action::On, 0, 0,
126*ed80e885SPatrick Williams               phosphor::led::Layout::Action::On},
127*ed80e885SPatrick Williams              {"Two", phosphor::led::Layout::Action::On, 0, 0,
128*ed80e885SPatrick Williams               phosphor::led::Layout::Action::On},
129*ed80e885SPatrick Williams              {"Three", phosphor::led::Layout::Action::Blink, 0, 0,
130*ed80e885SPatrick Williams               phosphor::led::Layout::Action::Blink},
13191ac8d3aSPatrick Venture          }},
13291ac8d3aSPatrick Venture         {"/xyz/openbmc_project/ledmanager/groups/MultipleLedsBSet",
13391ac8d3aSPatrick Venture          {
134*ed80e885SPatrick Williams              {"Four", phosphor::led::Layout::Action::On, 0, 0,
135*ed80e885SPatrick Williams               phosphor::led::Layout::Action::On},
136*ed80e885SPatrick Williams              {"Three", phosphor::led::Layout::Action::On, 0, 0,
137*ed80e885SPatrick Williams               phosphor::led::Layout::Action::Blink},
138*ed80e885SPatrick Williams              {"Six", phosphor::led::Layout::Action::On, 0, 0,
139*ed80e885SPatrick Williams               phosphor::led::Layout::Action::On},
14091ac8d3aSPatrick Venture          }},
141ed490734SVishwanatha Subbanna };
142ed490734SVishwanatha Subbanna 
14391ac8d3aSPatrick Venture static const std::map<std::string, std::set<phosphor::led::Layout::LedAction>>
14491ac8d3aSPatrick Venture     twoGroupsWithOneComonLEDOnPriority = {
14591ac8d3aSPatrick Venture         {"/xyz/openbmc_project/ledmanager/groups/MultipleLedsASet",
14691ac8d3aSPatrick Venture          {
147*ed80e885SPatrick Williams              {"One", phosphor::led::Layout::Action::On, 0, 0,
148*ed80e885SPatrick Williams               phosphor::led::Layout::Action::On},
149*ed80e885SPatrick Williams              {"Two", phosphor::led::Layout::Action::On, 0, 0,
150*ed80e885SPatrick Williams               phosphor::led::Layout::Action::On},
151*ed80e885SPatrick Williams              {"Three", phosphor::led::Layout::Action::Blink, 0, 0,
152*ed80e885SPatrick Williams               phosphor::led::Layout::Action::On},
15391ac8d3aSPatrick Venture          }},
15491ac8d3aSPatrick Venture         {"/xyz/openbmc_project/ledmanager/groups/MultipleLedsBSet",
15591ac8d3aSPatrick Venture          {
156*ed80e885SPatrick Williams              {"Four", phosphor::led::Layout::Action::On, 0, 0,
157*ed80e885SPatrick Williams               phosphor::led::Layout::Action::On},
158*ed80e885SPatrick Williams              {"Three", phosphor::led::Layout::Action::On, 0, 0,
159*ed80e885SPatrick Williams               phosphor::led::Layout::Action::On},
160*ed80e885SPatrick Williams              {"Six", phosphor::led::Layout::Action::On, 0, 0,
161*ed80e885SPatrick Williams               phosphor::led::Layout::Action::On},
16291ac8d3aSPatrick Venture          }},
16391ac8d3aSPatrick Venture };
16491ac8d3aSPatrick Venture 
16591ac8d3aSPatrick Venture static const std::map<std::string, std::set<phosphor::led::Layout::LedAction>>
166ed490734SVishwanatha Subbanna     twoGroupsWithMultiplComonLEDOn = {
16791ac8d3aSPatrick Venture         {"/xyz/openbmc_project/ledmanager/groups/MultipleLedsASet",
16891ac8d3aSPatrick Venture          {
169*ed80e885SPatrick Williams              {"One", phosphor::led::Layout::Action::On, 0, 0,
170*ed80e885SPatrick Williams               phosphor::led::Layout::Action::On},
171*ed80e885SPatrick Williams              {"Two", phosphor::led::Layout::Action::On, 0, 0,
172*ed80e885SPatrick Williams               phosphor::led::Layout::Action::On},
173*ed80e885SPatrick Williams              {"Three", phosphor::led::Layout::Action::On, 0, 0,
174*ed80e885SPatrick Williams               phosphor::led::Layout::Action::On},
17591ac8d3aSPatrick Venture          }},
17691ac8d3aSPatrick Venture         {"/xyz/openbmc_project/ledmanager/groups/MultipleLedsBSet",
17791ac8d3aSPatrick Venture          {
178*ed80e885SPatrick Williams              {"Two", phosphor::led::Layout::Action::On, 0, 0,
179*ed80e885SPatrick Williams               phosphor::led::Layout::Action::On},
180*ed80e885SPatrick Williams              {"Six", phosphor::led::Layout::Action::On, 0, 0,
181*ed80e885SPatrick Williams               phosphor::led::Layout::Action::On},
182*ed80e885SPatrick Williams              {"Three", phosphor::led::Layout::Action::On, 0, 0,
183*ed80e885SPatrick Williams               phosphor::led::Layout::Action::On},
184*ed80e885SPatrick Williams              {"Seven", phosphor::led::Layout::Action::On, 0, 0,
185*ed80e885SPatrick Williams               phosphor::led::Layout::Action::On},
18691ac8d3aSPatrick Venture          }},
187ed490734SVishwanatha Subbanna };
188ed490734SVishwanatha Subbanna 
18991ac8d3aSPatrick Venture static const std::map<std::string, std::set<phosphor::led::Layout::LedAction>>
190ed490734SVishwanatha Subbanna     twoGroupsWithMultipleComonLEDInDifferentState = {
19191ac8d3aSPatrick Venture         {"/xyz/openbmc_project/ledmanager/groups/MultipleLedsASet",
19291ac8d3aSPatrick Venture          {
193*ed80e885SPatrick Williams              {"One", phosphor::led::Layout::Action::On, 0, 0,
194*ed80e885SPatrick Williams               phosphor::led::Layout::Action::On},
195*ed80e885SPatrick Williams              {"Two", phosphor::led::Layout::Action::Blink, 0, 0,
196*ed80e885SPatrick Williams               phosphor::led::Layout::Action::On},
197*ed80e885SPatrick Williams              {"Three", phosphor::led::Layout::Action::Blink, 0, 0,
198*ed80e885SPatrick Williams               phosphor::led::Layout::Action::On},
199*ed80e885SPatrick Williams              {"Four", phosphor::led::Layout::Action::On, 0, 0,
200*ed80e885SPatrick Williams               phosphor::led::Layout::Action::On},
20191ac8d3aSPatrick Venture          }},
20291ac8d3aSPatrick Venture         {"/xyz/openbmc_project/ledmanager/groups/MultipleLedsBSet",
20391ac8d3aSPatrick Venture          {
204*ed80e885SPatrick Williams              {"Two", phosphor::led::Layout::Action::On, 0, 0,
205*ed80e885SPatrick Williams               phosphor::led::Layout::Action::On},
206*ed80e885SPatrick Williams              {"Three", phosphor::led::Layout::Action::Blink, 0, 0,
207*ed80e885SPatrick Williams               phosphor::led::Layout::Action::On},
208*ed80e885SPatrick Williams              {"Five", phosphor::led::Layout::Action::On, 0, 0,
209*ed80e885SPatrick Williams               phosphor::led::Layout::Action::On},
210*ed80e885SPatrick Williams              {"Six", phosphor::led::Layout::Action::On, 0, 0,
211*ed80e885SPatrick Williams               phosphor::led::Layout::Action::On},
21291ac8d3aSPatrick Venture          }},
213ed490734SVishwanatha Subbanna };
214cd569d24SVishwanatha Subbanna 
21591ac8d3aSPatrick Venture static const std::map<std::string, std::set<phosphor::led::Layout::LedAction>>
2164b000d8dSVishwanatha Subbanna     twoGroupsWithMultipleComonLEDInDifferentStateDiffPriority = {
21791ac8d3aSPatrick Venture         {"/xyz/openbmc_project/ledmanager/groups/MultipleLedsASet",
21891ac8d3aSPatrick Venture          {
219*ed80e885SPatrick Williams              {"One", phosphor::led::Layout::Action::On, 0, 0,
220*ed80e885SPatrick Williams               phosphor::led::Layout::Action::On},
221*ed80e885SPatrick Williams              {"Two", phosphor::led::Layout::Action::Blink, 0, 0,
222*ed80e885SPatrick Williams               phosphor::led::Layout::Action::On},
223*ed80e885SPatrick Williams              {"Three", phosphor::led::Layout::Action::On, 0, 0,
224*ed80e885SPatrick Williams               phosphor::led::Layout::Action::Blink},
225*ed80e885SPatrick Williams              {"Four", phosphor::led::Layout::Action::On, 0, 0,
226*ed80e885SPatrick Williams               phosphor::led::Layout::Action::On},
227*ed80e885SPatrick Williams              {"Ten", phosphor::led::Layout::Action::Blink, 0, 0,
228*ed80e885SPatrick Williams               phosphor::led::Layout::Action::Blink},
22991ac8d3aSPatrick Venture          }},
23091ac8d3aSPatrick Venture         {"/xyz/openbmc_project/ledmanager/groups/MultipleLedsBSet",
23191ac8d3aSPatrick Venture          {
232*ed80e885SPatrick Williams              {"Two", phosphor::led::Layout::Action::On, 0, 0,
233*ed80e885SPatrick Williams               phosphor::led::Layout::Action::On},
234*ed80e885SPatrick Williams              {"Three", phosphor::led::Layout::Action::On, 0, 0,
235*ed80e885SPatrick Williams               phosphor::led::Layout::Action::Blink},
236*ed80e885SPatrick Williams              {"Five", phosphor::led::Layout::Action::On, 0, 0,
237*ed80e885SPatrick Williams               phosphor::led::Layout::Action::On},
238*ed80e885SPatrick Williams              {"Six", phosphor::led::Layout::Action::On, 0, 0,
239*ed80e885SPatrick Williams               phosphor::led::Layout::Action::On},
240*ed80e885SPatrick Williams              {"Ten", phosphor::led::Layout::Action::On, 0, 0,
241*ed80e885SPatrick Williams               phosphor::led::Layout::Action::Blink},
24291ac8d3aSPatrick Venture          }},
243cd569d24SVishwanatha Subbanna };
244