using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel;

using FObjBase;
using FLY.Thick.Base.IService;
using FLY.Thick.Base.OBJ_INTERFACE;
using FLY.Thick.Base.Common;

namespace FLY.Thick.Base.Client
{
    public class GageInfoServiceClient : FObjBase.Reflect.Reflect_SeviceClient, IGageInfoService
    {
        protected override Type InterfaceType => typeof(IGageInfoService);
        public GageInfoServiceClient(UInt32 serviceId) : base(serviceId) { }

        public GageInfoServiceClient(UInt32 serviceId, string connName) : base(serviceId, connName) { }

        /// <summary>
        /// 数据好了！！！！
        /// 当 flyad7 的poslen, posOfGrid 发生变化时，DataOK = false, 需要重新记录。
        /// </summary>
        public bool DataOK { get; protected set; }


        /// <summary>
        /// 机架总长，脉冲
        /// </summary>
        public int PosLen { get; protected set; } = 8900;

        /// <summary>
        /// 1个grid = N个pos
        /// </summary>
        public int PosOfGrid { get; protected set; } = 10;

        public int[] ForwData { get; protected set; }

        public int[] BackwData { get; protected set; }

        /// <summary>
        /// 0~100
        /// </summary>
        public int Progress { get; protected set; }

        /// <summary>
        /// 正在机架修正中
        /// </summary>
        public bool IsRunning { get; protected set; }


        /// <summary>
        /// 数据录制，记下来回扫描的AD值数组
        /// </summary>
        public void StartMeasure()
        {
            Call("StartMeasure");
        }
        public void Stop()
        {
            Call("Stop");
        }

    }
}
