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

namespace CCDCount.MODEL.ConfigModel
{
    public class FormulationConfigClass
    {
        /// <summary>
        /// 配方名称
        /// </summary>
        public string FormulationName { get; set; } = string.Empty;
        /// <summary>
        /// 二值化阈值
        /// </summary>
        public int RegionThreshold { get; set; } = 30;
        /// <summary>
        /// 允许物体中断的最大连续行数
        /// </summary>
        public int MAX_GAP { get; set; } = 2;
        /// <summary>
        /// 合格物体的最长长度
        /// </summary>
        public int MAX_Object_LENGTH { get; set; } = 1000;
        /// <summary>
        /// 合格物体的最短长度
        /// </summary>
        public int MIN_Object_LENGTH { get; set; } = 5;
        /// <summary>
        /// 判定标准识别码
        /// -1  为无效不进行颗粒合格判定
        /// 0 为使用宽高进行合格判定
        /// 1 为使用面积进行合格判定
        /// 2 为使用宽高和面积进行合格判定
        /// </summary>
        public int PandingCode { get; set; } = 0;
        /// <summary>
        /// 合格物体的最大面积
        /// </summary>
        public int MaxArea { get; set; } = 1000000;
        /// <summary>
        /// 合格物体的最小面积
        /// </summary>
        public int MinArea { get; set; } = 0;
        /// <summary>
        /// 噪声过滤阈值
        /// </summary>
        public int NoiseFilter_Threshold { get; set; } = 5;
        /// <summary>
        /// 通道数量
        /// </summary>
        public int Channel { get; set; } = 1;
        /// <summary>
        /// X计算系数
        /// </summary>
        public double ScaleX { get; set; }
        /// <summary>
        /// Y计算系数
        /// </summary>
        public double ScaleY { get; set; }
        /// <summary>
        /// 曝光时间
        /// </summary>
        public float ExposureTimeValue { get; set; } = 100;
        /// <summary>
        /// 采集行频
        /// </summary>
        public int AcquistionLineRateValue { get; set; } = 800;
        /// <summary>
        /// 设备名称
        /// </summary>
        public string DeviceName { get; set; } = string.Empty;

        /// <summary>
        /// 罐装模式
        /// </summary>
        public ushort FillingMode { get; set; }

        /// <summary>
        /// 传送带速度
        /// </summary>
        public ushort BeltsSpeed { get; set; }

        /// <summary>
        /// 罐装料筒震台高速值
        /// </summary>
        public ushort ShakeTable1H_FillingSpeed { get; set; }

        /// <summary>
        /// 罐装过滤震台高速值
        /// </summary>
        public ushort ShakeTable2H_FillingSpeed { get; set; }

        /// <summary>
        /// 罐装计数震台高速值
        /// </summary>
        public ushort ShakeTable3H_FillingSpeed { get; set; }

        /// <summary>
        /// 罐装料筒震台减速值
        /// </summary>
        public ushort ShakeTable1M_FillingSpeed { get; set; }

        /// <summary>
        /// 罐装过滤震台减速值
        /// </summary>
        public ushort ShakeTable2M_FillingSpeed { get; set; }

        /// <summary>
        /// 罐装计数震台减速值
        /// </summary>
        public ushort ShakeTable3M_FillingSpeed { get; set; }

        /// <summary>
        /// 罐装料筒震台低速值
        /// </summary>
        public ushort ShakeTable1L_FillingSpeed { get; set; }

        /// <summary>
        /// 罐装过滤震台低速值
        /// </summary>
        public ushort ShakeTable2L_FillingSpeed { get; set; }

        /// <summary>
        /// 罐装计数震台低速值
        /// </summary>
        public ushort ShakeTable3L_FillingSpeed { get; set; }

        /// <summary>
        /// 缓存料筒震台高速值
        /// </summary>
        public ushort ShakeTable1H_CacheSpeed { get; set; }

        /// <summary>
        /// 缓存过滤震台高速值
        /// </summary>
        public ushort ShakeTable2H_CacheSpeed { get; set; }

        /// <summary>
        /// 缓存计数震台高速值
        /// </summary>
        public ushort ShakeTable3H_CacheSpeed { get; set; }

        /// <summary>
        /// 缓存料筒震台减速值
        /// </summary>
        public ushort ShakeTable1M_CacheSpeed { get; set; }

        /// <summary>
        /// 缓存过滤震台减速值
        /// </summary>
        public ushort ShakeTable2M_CacheSpeed { get; set; }

        /// <summary>
        /// 缓存计数震台减速值
        /// </summary>
        public ushort ShakeTable3M_CacheSpeed { get; set; }

        /// <summary>
        /// 缓存料筒震台低速值
        /// </summary>
        public ushort ShakeTable1L_CacheSpeed { get; set; }

        /// <summary>
        /// 缓存过滤震台低速值
        /// </summary>
        public ushort ShakeTable2L_CacheSpeed { get; set; }

        /// <summary>
        /// 缓存计数震台低速值
        /// </summary>
        public ushort ShakeTable3L_CacheSpeed { get; set; }
        /// <summary>
        /// 罐装高速区间
        /// </summary>
        public ushort FillingH_SpeedRatio { get; set; }
        /// <summary>
        /// 罐装减速区间
        /// </summary>
        public ushort FillingM_SpeedRatio { get; set; }
        /// <summary>
        /// 罐装低速区间
        /// </summary>
        public ushort FillingL_SpeedRatio { get; set; }
        /// <summary>
        /// 罐装高速区间
        /// </summary>
        public ushort CacheH_SpeedRatio { get; set; }
        /// <summary>
        /// 罐装减速区间
        /// </summary>
        public ushort CacheM_SpeedRatio { get; set; }
        /// <summary>
        /// 罐装低速区间
        /// </summary>
        public ushort CacheL_SpeedRatio { get; set; }
        /// <summary>
        /// 传动轴点动速度
        /// </summary>
        public double ScrewJogSpeed { get; set; }
        /// <summary>
        /// 进瓶速度
        /// </summary>
        public double InBottleSpeed { get; set; }
        /// <summary>
        /// 传动轴绝对定位速度
        /// </summary>
        public double BottlePosSpeed { get; set; }
        /// <summary>
        /// 传动轴绝对定位位置
        /// </summary>
        public double BottlePosPosition { get; set; }
        /// <summary>
        /// 中转阀打开速度
        /// </summary>
        public double FillingValveOpenSpeed { get; set; }
        /// <summary>
        /// 中转阀打开位置
        /// </summary>
        public double FillingValveOpenPosition { get; set; }
        /// <summary>
        /// 中转阀关闭速度
        /// </summary>
        public double FillingValveCloseSpeed { get; set; }
        /// <summary>
        /// 中转阀关位置
        /// </summary>
        public double FillingValveClosePosition { get; set; }
        /// <summary>
        /// 中转阀缓存速度
        /// </summary>
        public double FillingValveCacheSpeed { get; set; }
        /// <summary>
        /// 中转阀缓存位置
        /// </summary>
        public double FillingValueCachePosition { get; set; }
        /// <summary>
        /// 中转阀点动速度
        /// </summary>
        public double FillingValueJogSpeed { get; set; }
        /// <summary>
        /// 漏斗下降延时
        /// </summary>
        public ushort MachineDelayFunneDownTime { get; set; }
        /// <summary>
        /// 漏斗上升延时
        /// </summary>
        public ushort MachineDelayFunneUpTime { get; set; }
        /// <summary>
        /// 中转阀打开延时
        /// </summary>
        public ushort MachineDelayFillingValveOpenTime { get; set; }
        /// <summary>
        /// 中转阀关闭延时
        /// </summary>
        public ushort MachineDelayFillingValveCloseTime { get; set; }
        /// <summary>
        /// j进瓶延时
        /// </summary>
        public ushort MachineDelayInBottleTime { get; set; }
        /// <summary>
        /// 气动闸板延时
        /// </summary>
        public ushort ValveDelytime { get; set; }

        /// <summary>
        /// 罐装设定值
        /// </summary>
        public ushort BottValueSet { get; set; }

        /// <summary>
        /// 缓存停机值
        /// </summary>
        public ushort CacheShutdownValue { get; set; }
    }
}
