using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Maser.Feanor.Model
{
    public enum ServerType
    {
        RaspberryPI = 1,
        // Server with sensor ID 0..19

        Yun020208 = 2,
        // Server with sensor ID 0..11
        //      0-1:   Pt100
        //      2-3:   Thermocouple-K
        //      4-11:  -70 to +70 V  
        
        RaspberryDELTA = 3,
        RaspberryHAMEG = 4,
        NONE = 5,
    }


    public static class ServerTypeExtensions
    {
        public static string ToText(this ServerType type)
        {
            string result = type.ToString();
            switch (type)
            {
                case ServerType.Yun020208:
                    return String.Format("Yun server");
                case ServerType.RaspberryPI:
                    return String.Format("Raspberry Pi server");
                case ServerType.RaspberryDELTA:
                    return String.Format("RPI + Delta PS server");
                case ServerType.RaspberryHAMEG:
                    return String.Format("RPI + Hameg PS server");
                case ServerType.NONE:
                    return String.Format("NONE");
            }
            return result;
        }
    }
}
