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

namespace DataCollection
{
    internal class ServiceConfig
    {
        private static ServiceConfig defaultconfig = new ServiceConfig();
        static ServiceConfig()
        {
            defaultconfig.Coefficients.AddRange(Enumerable.Range(0, ServiceConstant.ChannelCount).Select(x => new SensorCoefficient()));
        }
        public List<SensorCoefficient> Coefficients { get; } = new List<SensorCoefficient>();
        public static ServiceConfig Default => defaultconfig;
        public double[] Values => Coefficients.SelectMany(x => x.Values).ToArray();
     }
    internal class SensorCoefficient
    {
        public double K { get; set; } = 1;
        public double B { get; set; } = 0;
        public double[] Values => new double[] { K, B };
    }
}
