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
{
    /// <summary>
    /// 硬件配置参数
    /// </summary>
    public interface IInitParamService : INotifyPropertyChanged
    {
        /// <summary>
        /// 扫描架长
        /// </summary>
        int PosLength { get; set; }

        /// <summary>
        /// timeGridAdv 使能
        /// </summary>
        bool IsTimeGridAdvEnabled { get; set; }

        /// <summary>
        /// 从 flyad7 获取的
        /// </summary>
        int PosOfGrid { get; }

        /// <summary>
        /// 自动归原点间距,次数
        /// </summary>
        int AutoOrgInterval { get; set; }


        /// <summary>
        /// 编码器1 mm/pulse
        /// </summary>
        double Encoder1_mmpp { get; set; }

        /// <summary>
        /// 设置的速度,与 实际速度比例 Speed1 = VScan*Speed1Scale
        /// </summary>
        double Speed1Scale { get; set; }

        /// <summary>
        /// 线速度来源
        /// </summary>
        FilmVSRC FilmVSrc { get; set; }

        /// <summary>
        /// 最小线速度 m/min
        /// </summary>
        int FilmVThreshold { get; set; }
        /// <summary>
        /// 线速度:编码器2 mm/pulse
        /// </summary>
        double Encoder2_mmpp { get; set; }

        /// <summary>
        /// 线速度:1圈多少mm
        /// </summary>
        double MmOfR { get; set; }



        /// <summary>
        /// 数据有效源
        /// </summary>
        DATAVALIDSRC DataValidSrc { get; set; }



        /// <summary>
        /// 当数据有效状态改变,自动按F1,F3
        /// </summary>
        bool AutoF1F3 { get; set; }

        /// <summary>
        /// 当数据有效状态  无效->有效 ,等待多久重新扫描 ,单位s
        /// </summary>
        int ReStartDelay { get; set; }

        /// <summary>
        /// 有按样标定硬件
        /// </summary>
        bool HasProfileSample { get; set; }

        /// <summary>
        /// 有小托辊
        /// </summary>
        bool HasHold { get; set; }

        /// <summary>
        /// 有打孔设备
        /// </summary>
        bool HasPunch { get; set; }

        /// <summary>
        /// 打孔设备与探头中心偏移,单位mm
        /// </summary>
        int PunchOffset { get; set; }

        /// <summary>
        /// 有纵向光纤传感器
        /// </summary>
        bool HasVSign { get; set; }

        /// <summary>
        /// 纵向光纤传感器 与 X光的纵向偏移量, 在X光的前面为 正,后面为 负
        /// </summary>
        int VSignOffset { get; set; }

        /// <summary>
        /// 有横向光纤传感器
        /// </summary>
        bool HasHSign { get; set; }

        /// <summary>
        /// 有机架修正功能
        /// </summary>
        bool HasScanCorr { get; set; }

        #region 速度

        /// <summary>
        /// 扫描时速度 Velocity Of Scan 
        /// </summary>
        UInt32 VScan { get; set; }
        /// <summary>
        /// 调试时速度,向前走,向后走 Velocity Of JOG
        /// </summary>
        UInt32 VJOG { get; set; }
        /// <summary>
        /// 精确速度 Velocity Of Accuracy  如: 机架修正, 样品取样, 机架信息获取
        /// </summary>
        UInt32 VAccuracy { set; get; }
        /// <summary>
        /// 开始速度 Start Velocity
        /// </summary>
        UInt32 SVelocity { set; get; }
        /// <summary>
        /// 加速时间
        /// </summary>
        UInt32 ATime { set; get; }
        /// <summary>
        /// 减速时间
        /// </summary>
        UInt32 DTime { set; get; }
        /// <summary>
        /// 归0速度1
        /// </summary>
        UInt32 HVelocity1 { set; get; }
        /// <summary>
        /// 归0速度2
        /// </summary>
        UInt32 HVelocity2 { set; get; }

        #endregion

        /// <summary>
        /// 数据库保存的月数
        /// </summary>
        int DBKeepMonth { get; set; }

        /// <summary>
        /// 数据库路径
        /// </summary>
        string DbDirPath { get; set; }

        /// <summary>
        /// 参数应用
        /// </summary>
        void Apply();

    }
}