using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using FObjBase;
using FLY.Thick.Base.Common;
using Misc;
using AutoMapper;
using FLY.Thick.Base.IService;

namespace FLY.Thick.Base.OBJ_INTERFACE
{
    public class BORDERSEARCH_OBJ_INTERFACE
    {
        public static Mapper Mapper { get; } = new AutoMapper.Mapper(new MapperConfiguration(c =>
        {
            c.CreateMap<IBorderSearchService, Pack_Params>();
            c.CreateMap<IBorderSearchService, Pack_State>();
        }));
        #region Pack
        public class Pack_Params
        {
            public bool Enable;
            public Range Valid;
            public bool TempADBySet;
            public int TempAD;
            public int TempRange;
            public int N;
            public int SensorWidth;
            public int N2;
            public int N3;
            public bool IsBreakDetect;
            public bool IsTempRangeByPercent;
            public double TempRangePercent;
        }
        public class Pack_State 
        {
            public Range Border_Forw;
            public Range Border_Backw;
            public Range Border;
            public int Width;
            public int Mid;
            public DateTime UpdateTime;
            public int ProductWidth;
        }
        #endregion
        #region GetValue
        /// <summary>
        /// Pack_Params
        /// </summary>
        public const UInt16 GET_PARAMS = 0;
        /// <summary>
        /// Pack_State
        /// </summary>
        public const UInt16 GET_STATE = 1;
        #endregion
        #region SetValue
        /// <summary>
        /// Pack_Params
        /// </summary>
        public const UInt16 SET_PARAMS = 0;
        #endregion
        #region PushMsg
        /// <summary>
        /// Pack_Params
        /// </summary>
        public const UInt16 PUSH_PARAMS = 0;
        /// <summary>
        /// Pack_State
        /// </summary>
        public const UInt16 PUSH_STATE = 1;
        #endregion
        #region Call
        /// <summary>
        /// 
        /// </summary>
        public const UInt16 CALL_GETVIEW = 0;
        #endregion
    }
}
