blob: d3d0e40d558ea32eb1a246be99553d6a2c776a39 [file] [log] [blame]
Vishwanatha Subbannaed490732016-12-20 15:59:29 +05301#pragma once
2
3#include <map>
4#include <set>
5namespace phosphor
6{
7namespace led
8{
9/** @namespace Layout
10 * @brief Depicts the LED and their mappings and group actions
11 */
12namespace Layout
13{
14 /** @brief Define possible actions on a given LED.
15 * For the BLINK operation, follow 50-50 duty cycle
16 */
17 enum Action
18 {
19 Off,
20 On,
21 Blink,
22 };
23
24 /** @brief Name of the LED and it's proposed action.
25 * This structure is supplied as configuration at build time
26 */
27 struct LedAction
28 {
29 std::string name;
30 Action action;
31
32 // Needed for inserting elements into sets
33 bool operator<(const LedAction& right) const
34 {
35 if (name == right.name)
36 {
37 return action < right.action;
38 }
39 return name < right.name;
40 }
41 };
42} // namespace Layout
43} // namespace led
44} // namespace phosphor