using FLY.FilmCasting.AutoDie.Server.Model;

namespace FLY.FilmCasting.AutoDie.Common
{

    public class FlyData_FeedbackHeat
    {
        public Lc_ThickHeat thickHeat;

        /// <summary>
        /// 稳定状态
        /// </summary>
        public STABILITY Stability = STABILITY.IDLE;

        /// <summary>
        /// 厚度均值
        /// </summary>
        public double ThickAvg;

        /// <summary>
        /// 大小 ChannelCnt, 均值为0
        /// </summary>
        public double[] ThickPercents;

        /// <summary>
        /// 大小 ChannelCnt, 均值为0
        /// </summary>
        public double[] HeatPercents;
    }


    /// <summary>
    /// 稳定性
    /// </summary>
    public enum STABILITY
    {
        /// <summary>
        /// 待定，不知道！！
        /// </summary>
        IDLE = 0,
        /// <summary>
        /// 加热点，还没到达测厚仪。  其它状态都是加热已经起效了，顶多不稳定而已。
        /// </summary>
        ERROR_NO_ARRIVE = -1,
        /// <summary>
        /// 旋转次数太少，位置不能确定
        /// </summary>
        ERROR_POSITION_NOTSURE = -2,
        /// <summary>
        /// 一副数据，Sigma > 15% ： 不稳定，变化太大，超出控制范围 
        /// </summary>
        ERROR_SIGMA_OVERSIZE = -3,
        /// <summary>
        /// 连续两幅图旋转时间变化 > 10%：不稳定，旋转速度波动大，测量不准确
        /// </summary>
        ERROR_ROTATE_CHANGED = -4,
        /// <summary>
        /// 连续两幅图厚度均值变化 > 10%: 不稳定，厚度波动大
        /// </summary>
        ERROR_THICK_CHANGED = -5,
        /// <summary>
        /// 膜距离，旋转角度被改变，无法判断
        /// </summary>
        ERROR_PARAM_CHANGED = -7,



        /// <summary>
        /// 不稳定，不相关
        /// </summary>
        ERROR_CORREL = -6,

        /// <summary>
        /// 加热与厚度差，相关性很高
        /// </summary>
        OK_HEAT_AND_THICK_CORREL = 3,
        /// <summary>
        /// 加热为0，加热与厚度差，相关性很高
        /// </summary>
        OK_CORREL = 2,
    }






}
