aboutsummaryrefslogtreecommitdiff
path: root/NucLedController/LEDColour.cs
blob: 68fb22cb96155ca249cbaa694335f0625af2d0a7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
using System.Collections.Immutable;

namespace NucLedController
{
    sealed class LEDColour
    {

        public static readonly ImmutableList<LEDColour> AvailableColours = ImmutableList.Create(
            new LEDColour("CYAN", "Cyan", 0x01),
            new LEDColour("PINK", "Pink", 0x02),
            new LEDColour("YELLOW", "Yellow", 0x03),
            new LEDColour("BLUE", "Blue", 0x04),
            new LEDColour("RED", "Red", 0x05),
            new LEDColour("GREEN", "Green", 0x06),
            new LEDColour("WHITE", "White", 0x07)
        );

        public string Identifier { get; }
        public string DisplayName { get; }
        public byte ByteValue { get; }

        private LEDColour(string identifier, string displayName, byte byteValue)
        {
            Identifier = identifier;
            DisplayName = displayName;
            ByteValue = byteValue;
        }

        public override string ToString()
        {
            return this.Identifier + this.ByteValue;
        }
    }
}