using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using FLY.Thick.Base.Common;
using System.ComponentModel;

namespace FLY.Thick.Base.IService
{
    public interface IGetSampleService:INotifyPropertyChanged
    {
        /// <summary>
        /// 参数:使能
        /// </summary>
        bool Enable { get; set; }

        /// <summary>
        /// 参数:间隔
        /// </summary>
        int Interval { get; set; }
        
        /// <summary>
        /// 参数:速度
        /// </summary>
        UInt32 Velocity { get; set; }

        /// <summary>
        /// 参数:样品点范围
        /// </summary>
        int Range { get; set; }

        /// <summary>
        /// 参数:移动滤波 ,窗口值
        /// </summary>
        int Window { get; set; }


        /// <summary>
        /// 参数:样品点参数
        /// </summary>
        ISampleCell[] Samples { get; }
        /// <summary>
        /// 参数:特征查找范围
        /// </summary>
        int Search { get; set; }
        /// <summary>
        /// 参数:特征参数
        /// </summary>
        ISampleFeature[] Features { get; }

        /// <summary>
        /// 状态:从flyad7 得到的。 用于绘制图
        /// </summary>
        int PosOfGrid { get; set;}


        /// <summary>
        /// 应用
        /// </summary>
        void Apply();
    }
    public interface ISampleCell : INotifyPropertyChanged
    {
        /// <summary>
        /// 参数:使能
        /// </summary>
        bool Enable { get; set; }

        /// <summary>
        /// 参数:只检查不标定
        /// </summary>
        bool JustForCheck { get;set;}

        /// <summary>
        /// 参数:原始AD值
        /// </summary>
        int OrgAD { get; set; }

        /// <summary>
        ///参数: 位置
        /// </summary>
        int Position{ get;set;}

        /// <summary>
        /// 状态:当前测量的AD值
        /// </summary>
        int AD { get; set;}

        /// <summary>
        /// 状态:当前测量的AD值 对应的 样品值
        /// </summary>
        int SampleValue  { get; set; }
    }
    public interface ISampleFeature : INotifyPropertyChanged
    {
        /// <summary>
        /// 参数:使能
        /// </summary>
        bool Enable{get;set;}
        /// <summary>
        /// 参数:开始位置
        /// </summary>
        int StartPos{get;set;}
        /// <summary>
        /// 参数:结束位置
        /// </summary>
         int EndPos{get;set;}

        /// <summary>
         /// 状态:相似度必须高于0.8,失败-1
        /// </summary>
         double MaxRelevancy { get; set; }

        /// <summary>
        /// 状态:最大相似度对应的偏移
        /// </summary>
        int MaxOffset { get; set; }

        /// <summary>
        /// 状态:扫描数据,从扫描数据提取的相似的一段
        /// 它的单位是 grid, 需要 posOfGrid, 转换为 pos
        /// 开始位置是 StartPos - Search
        /// </summary>
        int[] ScanData { get; set; }
    }
}