Alexander Hansen | 7ba70c8 | 2024-07-23 13:46:25 +0200 | [diff] [blame] | 1 | #include "grouplayout.hpp" |
Patrick Venture | 91ac8d3 | 2018-11-01 17:03:22 -0700 | [diff] [blame] | 2 | #include "ledlayout.hpp" |
| 3 | |
Patrick Williams | 158b2c1 | 2022-03-17 05:57:44 -0500 | [diff] [blame] | 4 | static const phosphor::led::GroupMap singleLedOn = { |
| 5 | {"/xyz/openbmc_project/ledmanager/groups/SingleLed", |
Alexander Hansen | 7ba70c8 | 2024-07-23 13:46:25 +0200 | [diff] [blame] | 6 | {0, |
| 7 | { |
| 8 | {"One", phosphor::led::Layout::Action::On, 0, 0, |
| 9 | phosphor::led::Layout::Action::Blink}, |
| 10 | }}}, |
Vishwanatha Subbanna | ed49073 | 2016-12-20 15:59:29 +0530 | [diff] [blame] | 11 | }; |
| 12 | |
Patrick Williams | 158b2c1 | 2022-03-17 05:57:44 -0500 | [diff] [blame] | 13 | static const phosphor::led::GroupMap singleLedBlink = { |
| 14 | {"/xyz/openbmc_project/ledmanager/groups/SingleLed", |
Alexander Hansen | 7ba70c8 | 2024-07-23 13:46:25 +0200 | [diff] [blame] | 15 | {0, |
| 16 | { |
| 17 | {"One", phosphor::led::Layout::Action::Blink, 0, 0, |
| 18 | phosphor::led::Layout::Action::Blink}, |
| 19 | }}}, |
Vishwanatha Subbanna | 4b000d8 | 2017-05-03 18:44:16 +0530 | [diff] [blame] | 20 | }; |
| 21 | |
Patrick Williams | 158b2c1 | 2022-03-17 05:57:44 -0500 | [diff] [blame] | 22 | static const phosphor::led::GroupMap singleLedBlinkOverrideOn = { |
| 23 | {"/xyz/openbmc_project/ledmanager/groups/SingleLed", |
Alexander Hansen | 7ba70c8 | 2024-07-23 13:46:25 +0200 | [diff] [blame] | 24 | {0, |
| 25 | { |
| 26 | {"One", phosphor::led::Layout::Action::Blink, 0, 0, |
| 27 | phosphor::led::Layout::Action::On}, |
| 28 | }}}, |
Vishwanatha Subbanna | ed49073 | 2016-12-20 15:59:29 +0530 | [diff] [blame] | 29 | }; |
| 30 | |
Patrick Williams | 158b2c1 | 2022-03-17 05:57:44 -0500 | [diff] [blame] | 31 | static const phosphor::led::GroupMap multipleLedsOn = { |
| 32 | {"/xyz/openbmc_project/ledmanager/groups/MultipleLeds", |
Alexander Hansen | 7ba70c8 | 2024-07-23 13:46:25 +0200 | [diff] [blame] | 33 | {0, |
| 34 | { |
| 35 | {"One", phosphor::led::Layout::Action::On, 0, 0, |
| 36 | phosphor::led::Layout::Action::On}, |
| 37 | {"Two", phosphor::led::Layout::Action::On, 0, 0, |
| 38 | phosphor::led::Layout::Action::On}, |
| 39 | {"Three", phosphor::led::Layout::Action::On, 0, 0, |
| 40 | phosphor::led::Layout::Action::On}, |
| 41 | }}}, |
Vishwanatha Subbanna | ed49073 | 2016-12-20 15:59:29 +0530 | [diff] [blame] | 42 | }; |
| 43 | |
Patrick Williams | 158b2c1 | 2022-03-17 05:57:44 -0500 | [diff] [blame] | 44 | static const phosphor::led::GroupMap multipleLedsBlink = { |
| 45 | {"/xyz/openbmc_project/ledmanager/groups/MultipleLeds", |
Alexander Hansen | 7ba70c8 | 2024-07-23 13:46:25 +0200 | [diff] [blame] | 46 | {0, |
| 47 | { |
| 48 | {"One", phosphor::led::Layout::Action::Blink, 0, 0, |
| 49 | phosphor::led::Layout::Action::Blink}, |
| 50 | {"Two", phosphor::led::Layout::Action::Blink, 0, 0, |
| 51 | phosphor::led::Layout::Action::Blink}, |
| 52 | {"Three", phosphor::led::Layout::Action::Blink, 0, 0, |
| 53 | phosphor::led::Layout::Action::Blink}, |
| 54 | }}}, |
Vishwanatha Subbanna | ed49073 | 2016-12-20 15:59:29 +0530 | [diff] [blame] | 55 | }; |
| 56 | |
Patrick Williams | 158b2c1 | 2022-03-17 05:57:44 -0500 | [diff] [blame] | 57 | static const phosphor::led::GroupMap multipleLedsOnAndBlink = { |
| 58 | {"/xyz/openbmc_project/ledmanager/groups/MultipleLedsMix", |
Alexander Hansen | 7ba70c8 | 2024-07-23 13:46:25 +0200 | [diff] [blame] | 59 | {0, |
| 60 | { |
| 61 | {"One", phosphor::led::Layout::Action::Blink, 0, 0, |
| 62 | phosphor::led::Layout::Action::Blink}, |
| 63 | {"Two", phosphor::led::Layout::Action::On, 0, 0, |
| 64 | phosphor::led::Layout::Action::Blink}, |
| 65 | {"Three", phosphor::led::Layout::Action::Blink, 0, 0, |
| 66 | phosphor::led::Layout::Action::On}, |
| 67 | {"Four", phosphor::led::Layout::Action::On, 0, 0, |
| 68 | phosphor::led::Layout::Action::Blink}, |
| 69 | {"Five", phosphor::led::Layout::Action::On, 0, 0, |
| 70 | phosphor::led::Layout::Action::Blink}, |
| 71 | }}}, |
Vishwanatha Subbanna | ed49073 | 2016-12-20 15:59:29 +0530 | [diff] [blame] | 72 | }; |
| 73 | |
Patrick Williams | 158b2c1 | 2022-03-17 05:57:44 -0500 | [diff] [blame] | 74 | static const phosphor::led::GroupMap twoGroupsWithDistinctLEDsOn = { |
| 75 | {"/xyz/openbmc_project/ledmanager/groups/MultipleLedsASet", |
Alexander Hansen | 7ba70c8 | 2024-07-23 13:46:25 +0200 | [diff] [blame] | 76 | {0, |
| 77 | { |
| 78 | {"One", phosphor::led::Layout::Action::On, 0, 0, |
| 79 | phosphor::led::Layout::Action::Blink}, |
| 80 | {"Two", phosphor::led::Layout::Action::On, 0, 0, |
| 81 | phosphor::led::Layout::Action::On}, |
| 82 | {"Three", phosphor::led::Layout::Action::On, 0, 0, |
| 83 | phosphor::led::Layout::Action::Blink}, |
| 84 | }}}, |
Patrick Williams | 158b2c1 | 2022-03-17 05:57:44 -0500 | [diff] [blame] | 85 | {"/xyz/openbmc_project/ledmanager/groups/MultipleLedsBSet", |
Alexander Hansen | 7ba70c8 | 2024-07-23 13:46:25 +0200 | [diff] [blame] | 86 | {0, |
| 87 | { |
| 88 | {"Four", phosphor::led::Layout::Action::On, 0, 0, |
| 89 | phosphor::led::Layout::Action::Blink}, |
| 90 | {"Five", phosphor::led::Layout::Action::On, 0, 0, |
| 91 | phosphor::led::Layout::Action::Blink}, |
| 92 | {"Six", phosphor::led::Layout::Action::On, 0, 0, |
| 93 | phosphor::led::Layout::Action::On}, |
| 94 | }}}, |
Vishwanatha Subbanna | ed49073 | 2016-12-20 15:59:29 +0530 | [diff] [blame] | 95 | }; |
| 96 | |
Patrick Williams | 158b2c1 | 2022-03-17 05:57:44 -0500 | [diff] [blame] | 97 | static const phosphor::led::GroupMap twoGroupsWithOneComonLEDOn = { |
| 98 | {"/xyz/openbmc_project/ledmanager/groups/MultipleLedsASet", |
Alexander Hansen | 7ba70c8 | 2024-07-23 13:46:25 +0200 | [diff] [blame] | 99 | {0, |
| 100 | { |
| 101 | {"One", phosphor::led::Layout::Action::On, 0, 0, |
| 102 | phosphor::led::Layout::Action::On}, |
| 103 | {"Two", phosphor::led::Layout::Action::On, 0, 0, |
| 104 | phosphor::led::Layout::Action::On}, |
| 105 | {"Three", phosphor::led::Layout::Action::On, 0, 0, |
| 106 | phosphor::led::Layout::Action::On}, |
| 107 | }}}, |
Patrick Williams | 158b2c1 | 2022-03-17 05:57:44 -0500 | [diff] [blame] | 108 | {"/xyz/openbmc_project/ledmanager/groups/MultipleLedsBSet", |
Alexander Hansen | 7ba70c8 | 2024-07-23 13:46:25 +0200 | [diff] [blame] | 109 | {0, |
| 110 | { |
| 111 | {"Four", phosphor::led::Layout::Action::On, 0, 0, |
| 112 | phosphor::led::Layout::Action::On}, |
| 113 | {"Three", phosphor::led::Layout::Action::On, 0, 0, |
| 114 | phosphor::led::Layout::Action::On}, |
| 115 | {"Six", phosphor::led::Layout::Action::On, 0, 0, |
| 116 | phosphor::led::Layout::Action::On}, |
| 117 | }}}, |
Vishwanatha Subbanna | ed49073 | 2016-12-20 15:59:29 +0530 | [diff] [blame] | 118 | }; |
| 119 | |
Patrick Williams | 158b2c1 | 2022-03-17 05:57:44 -0500 | [diff] [blame] | 120 | static const phosphor::led::GroupMap |
Patrick Venture | 91ac8d3 | 2018-11-01 17:03:22 -0700 | [diff] [blame] | 121 | twoGroupsWithOneComonLEDOnOneLEDBlinkPriority = { |
| 122 | {"/xyz/openbmc_project/ledmanager/groups/MultipleLedsASet", |
Alexander Hansen | 7ba70c8 | 2024-07-23 13:46:25 +0200 | [diff] [blame] | 123 | {0, |
| 124 | { |
| 125 | {"One", phosphor::led::Layout::Action::On, 0, 0, |
| 126 | phosphor::led::Layout::Action::On}, |
| 127 | {"Two", phosphor::led::Layout::Action::On, 0, 0, |
| 128 | phosphor::led::Layout::Action::On}, |
| 129 | {"Three", phosphor::led::Layout::Action::Blink, 0, 0, |
| 130 | phosphor::led::Layout::Action::Blink}, |
| 131 | }}}, |
Patrick Venture | 91ac8d3 | 2018-11-01 17:03:22 -0700 | [diff] [blame] | 132 | {"/xyz/openbmc_project/ledmanager/groups/MultipleLedsBSet", |
Alexander Hansen | 7ba70c8 | 2024-07-23 13:46:25 +0200 | [diff] [blame] | 133 | {0, |
| 134 | { |
| 135 | {"Four", phosphor::led::Layout::Action::On, 0, 0, |
| 136 | phosphor::led::Layout::Action::On}, |
| 137 | {"Three", phosphor::led::Layout::Action::On, 0, 0, |
| 138 | phosphor::led::Layout::Action::Blink}, |
| 139 | {"Six", phosphor::led::Layout::Action::On, 0, 0, |
| 140 | phosphor::led::Layout::Action::On}, |
| 141 | }}}, |
Vishwanatha Subbanna | 4b000d8 | 2017-05-03 18:44:16 +0530 | [diff] [blame] | 142 | }; |
| 143 | |
Patrick Williams | 158b2c1 | 2022-03-17 05:57:44 -0500 | [diff] [blame] | 144 | static const phosphor::led::GroupMap twoGroupsWithOneComonLEDOnPriority = { |
| 145 | {"/xyz/openbmc_project/ledmanager/groups/MultipleLedsASet", |
Alexander Hansen | 7ba70c8 | 2024-07-23 13:46:25 +0200 | [diff] [blame] | 146 | {0, |
| 147 | { |
| 148 | {"One", phosphor::led::Layout::Action::On, 0, 0, |
| 149 | phosphor::led::Layout::Action::On}, |
| 150 | {"Two", phosphor::led::Layout::Action::On, 0, 0, |
| 151 | phosphor::led::Layout::Action::On}, |
| 152 | {"Three", phosphor::led::Layout::Action::Blink, 0, 0, |
| 153 | phosphor::led::Layout::Action::On}, |
| 154 | }}}, |
Patrick Williams | 158b2c1 | 2022-03-17 05:57:44 -0500 | [diff] [blame] | 155 | {"/xyz/openbmc_project/ledmanager/groups/MultipleLedsBSet", |
Alexander Hansen | 7ba70c8 | 2024-07-23 13:46:25 +0200 | [diff] [blame] | 156 | {0, |
| 157 | { |
| 158 | {"Four", phosphor::led::Layout::Action::On, 0, 0, |
| 159 | phosphor::led::Layout::Action::On}, |
| 160 | {"Three", phosphor::led::Layout::Action::On, 0, 0, |
| 161 | phosphor::led::Layout::Action::On}, |
| 162 | {"Six", phosphor::led::Layout::Action::On, 0, 0, |
| 163 | phosphor::led::Layout::Action::On}, |
| 164 | }}}, |
Vishwanatha Subbanna | ed49073 | 2016-12-20 15:59:29 +0530 | [diff] [blame] | 165 | }; |
| 166 | |
Patrick Williams | 158b2c1 | 2022-03-17 05:57:44 -0500 | [diff] [blame] | 167 | static const phosphor::led::GroupMap twoGroupsWithMultiplComonLEDOn = { |
| 168 | {"/xyz/openbmc_project/ledmanager/groups/MultipleLedsASet", |
Alexander Hansen | 7ba70c8 | 2024-07-23 13:46:25 +0200 | [diff] [blame] | 169 | {0, |
| 170 | { |
| 171 | {"One", phosphor::led::Layout::Action::On, 0, 0, |
| 172 | phosphor::led::Layout::Action::On}, |
| 173 | {"Two", phosphor::led::Layout::Action::On, 0, 0, |
| 174 | phosphor::led::Layout::Action::On}, |
| 175 | {"Three", phosphor::led::Layout::Action::On, 0, 0, |
| 176 | phosphor::led::Layout::Action::On}, |
| 177 | }}}, |
Patrick Williams | 158b2c1 | 2022-03-17 05:57:44 -0500 | [diff] [blame] | 178 | {"/xyz/openbmc_project/ledmanager/groups/MultipleLedsBSet", |
Alexander Hansen | 7ba70c8 | 2024-07-23 13:46:25 +0200 | [diff] [blame] | 179 | {0, |
| 180 | { |
| 181 | {"Two", phosphor::led::Layout::Action::On, 0, 0, |
| 182 | phosphor::led::Layout::Action::On}, |
| 183 | {"Six", phosphor::led::Layout::Action::On, 0, 0, |
| 184 | phosphor::led::Layout::Action::On}, |
| 185 | {"Three", phosphor::led::Layout::Action::On, 0, 0, |
| 186 | phosphor::led::Layout::Action::On}, |
| 187 | {"Seven", phosphor::led::Layout::Action::On, 0, 0, |
| 188 | phosphor::led::Layout::Action::On}, |
| 189 | }}}, |
Vishwanatha Subbanna | ed49073 | 2016-12-20 15:59:29 +0530 | [diff] [blame] | 190 | }; |
| 191 | |
Patrick Williams | 158b2c1 | 2022-03-17 05:57:44 -0500 | [diff] [blame] | 192 | static const phosphor::led::GroupMap |
Patrick Venture | 91ac8d3 | 2018-11-01 17:03:22 -0700 | [diff] [blame] | 193 | twoGroupsWithMultipleComonLEDInDifferentState = { |
| 194 | {"/xyz/openbmc_project/ledmanager/groups/MultipleLedsASet", |
Alexander Hansen | 7ba70c8 | 2024-07-23 13:46:25 +0200 | [diff] [blame] | 195 | {0, |
| 196 | { |
| 197 | {"One", phosphor::led::Layout::Action::On, 0, 0, |
| 198 | phosphor::led::Layout::Action::On}, |
| 199 | {"Two", phosphor::led::Layout::Action::Blink, 0, 0, |
| 200 | phosphor::led::Layout::Action::On}, |
| 201 | {"Three", phosphor::led::Layout::Action::Blink, 0, 0, |
| 202 | phosphor::led::Layout::Action::On}, |
| 203 | {"Four", phosphor::led::Layout::Action::On, 0, 0, |
| 204 | phosphor::led::Layout::Action::On}, |
| 205 | }}}, |
Patrick Venture | 91ac8d3 | 2018-11-01 17:03:22 -0700 | [diff] [blame] | 206 | {"/xyz/openbmc_project/ledmanager/groups/MultipleLedsBSet", |
Alexander Hansen | 7ba70c8 | 2024-07-23 13:46:25 +0200 | [diff] [blame] | 207 | {0, |
| 208 | { |
| 209 | {"Two", phosphor::led::Layout::Action::On, 0, 0, |
| 210 | phosphor::led::Layout::Action::On}, |
| 211 | {"Three", phosphor::led::Layout::Action::Blink, 0, 0, |
| 212 | phosphor::led::Layout::Action::On}, |
| 213 | {"Five", phosphor::led::Layout::Action::On, 0, 0, |
| 214 | phosphor::led::Layout::Action::On}, |
| 215 | {"Six", phosphor::led::Layout::Action::On, 0, 0, |
| 216 | phosphor::led::Layout::Action::On}, |
| 217 | }}}, |
Vishwanatha Subbanna | ed49073 | 2016-12-20 15:59:29 +0530 | [diff] [blame] | 218 | }; |
Vishwanatha Subbanna | cd569d2 | 2017-05-03 12:46:14 +0530 | [diff] [blame] | 219 | |
Patrick Williams | 158b2c1 | 2022-03-17 05:57:44 -0500 | [diff] [blame] | 220 | static const phosphor::led::GroupMap |
Patrick Venture | 91ac8d3 | 2018-11-01 17:03:22 -0700 | [diff] [blame] | 221 | twoGroupsWithMultipleComonLEDInDifferentStateDiffPriority = { |
| 222 | {"/xyz/openbmc_project/ledmanager/groups/MultipleLedsASet", |
Alexander Hansen | 7ba70c8 | 2024-07-23 13:46:25 +0200 | [diff] [blame] | 223 | {0, |
| 224 | { |
| 225 | {"One", phosphor::led::Layout::Action::On, 0, 0, |
| 226 | phosphor::led::Layout::Action::On}, |
| 227 | {"Two", phosphor::led::Layout::Action::Blink, 0, 0, |
| 228 | phosphor::led::Layout::Action::On}, |
| 229 | {"Three", phosphor::led::Layout::Action::On, 0, 0, |
| 230 | phosphor::led::Layout::Action::Blink}, |
| 231 | {"Four", phosphor::led::Layout::Action::On, 0, 0, |
| 232 | phosphor::led::Layout::Action::On}, |
| 233 | {"Ten", phosphor::led::Layout::Action::Blink, 0, 0, |
| 234 | phosphor::led::Layout::Action::Blink}, |
| 235 | }}}, |
Patrick Venture | 91ac8d3 | 2018-11-01 17:03:22 -0700 | [diff] [blame] | 236 | {"/xyz/openbmc_project/ledmanager/groups/MultipleLedsBSet", |
Alexander Hansen | 7ba70c8 | 2024-07-23 13:46:25 +0200 | [diff] [blame] | 237 | {0, |
| 238 | { |
| 239 | {"Two", phosphor::led::Layout::Action::On, 0, 0, |
| 240 | phosphor::led::Layout::Action::On}, |
| 241 | {"Three", phosphor::led::Layout::Action::On, 0, 0, |
| 242 | phosphor::led::Layout::Action::Blink}, |
| 243 | {"Five", phosphor::led::Layout::Action::On, 0, 0, |
| 244 | phosphor::led::Layout::Action::On}, |
| 245 | {"Six", phosphor::led::Layout::Action::On, 0, 0, |
| 246 | phosphor::led::Layout::Action::On}, |
| 247 | {"Ten", phosphor::led::Layout::Action::On, 0, 0, |
| 248 | phosphor::led::Layout::Action::Blink}, |
| 249 | }}}, |
Vishwanatha Subbanna | cd569d2 | 2017-05-03 12:46:14 +0530 | [diff] [blame] | 250 | }; |