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

namespace FLY.Thick.Base.OBJ_INTERFACE
{
    public class DYNAREA_OBJ_INTERFACE
    {

        #region Pack
        public class Pack_GetADPos
        {
            public int Thick;
            public int Position;
            public int BoltIndex;
            public int AD;
        }
        public class Pack_Position2
        {

            public int Position2;
        }
        public class Pack_GetScanInfo
        {
            /// <summary>
            /// 最新样品AD
            /// </summary>
            public int[] SampleAD;
            /// <summary>
            /// 动态温修
            /// </summary>
            public bool TempState;
            /// <summary>
            /// 数据有效
            /// </summary>
            public bool DataValid;
            /// <summary>
            /// 扫描方向
            /// </summary>
            public Misc.DIRECTION direction;
            /// <summary>
            /// 膜宽 mm
            /// </summary>
            public double Width;
            /// <summary>
            /// 线速度m/min
            /// </summary>
            public double FilmVelocity;
            /// <summary>
            /// 膜生产位置m
            /// </summary>
            public double FilmPosition;
            /// <summary>
            /// 速度 m/min
            /// </summary>
            public double Velocity;

            public DIRECTION Direction { get; internal set; }
        }
        public class Pack_GetControllerState
        {
            /// <summary>
            /// 运行状态
            /// </summary>
            public CTRL_STATE ControllerState;
            /// <summary>
            /// 自动扫描时间累积
            /// </summary>
            public int AutoScanCounter;
        }
        public class Pack_GetIO
        {
            public UInt16 IStatus;
            public UInt16 OStatus;
        }
        public class Pack_GetSystem
        {
            /// <summary>
            /// FLYAD 连接状态
            /// </summary>
            public bool FLYADIsConnect;
            /// <summary>
            /// 锁
            /// </summary>
            public bool SecuteLock;
            /// <summary>
            /// 系统剩余小时
            /// </summary>
            public int Hrs;
        }
        public class Pack_GetProfile
        {
            /// <summary>
            /// 产品名称
            /// </summary>
            public string ProductName;
            /// <summary>
            /// 目标值
            /// </summary>
            public int Target;
            /// <summary>
            /// 报警值
            /// </summary>
            public int Alarm;
            /// <summary>
            /// 数据开始分区号
            /// </summary>
            public int DataBoltNoBegin;
            /// <summary>
            /// 数据结束分区号
            /// </summary>
            public int DataBoltNoEnd;
            /// <summary>
            /// 扫描范围开始分区号
            /// </summary>
            public int ScanBoltNoBegin;
            /// <summary>
            /// 扫描范围结束分区号
            /// </summary>
            public int ScanBoltNoEnd;
            /// <summary>
            /// 斜率补差
            /// </summary>
            public double Comp;
            /// <summary>
            /// 平移补差
            /// </summary>
            public int Shift;
        }
        public class Pack_GetBoltmap
        {
            /// <summary>
            /// 总分区数
            /// </summary>
            public int NBolts;
            /// <summary>
            /// 开始分区号
            /// </summary>
            public int FirstBoltNo;
        }

        #endregion

        #region GetValue
        /// <summary>
        /// Pack_GetADPos
        /// </summary>
        public const UInt16 GET_ADPOS = 0;


        /// <summary>
        /// Pack_GetScanInfo
        /// </summary>
        public const UInt16 GET_SCANINFO = 1;


        /// <summary>
        /// Pack_GetControllerState
        /// </summary>
        public const UInt16 GET_CONTROLLER_STATE = 2;



        /// <summary>
        /// Pack_GetIO
        /// </summary>
        public const UInt16 GET_IO = 4;


        /// <summary>
        /// Pack_GetSystem
        /// </summary>
        public const UInt16 GET_SYSTEM = 5;

        /// <summary>
        /// Pack_GetProfile
        /// </summary>
        public const UInt16 GET_PROFILE = 6;

        /// <summary>
        /// Pack_GetBoltmap
        /// </summary>
        public const UInt16 GET_BOLTMAP = 7;

        /// <summary>
        /// Pack_Position2
        /// </summary>
        public const UInt16 GET_POSITION2 = 8;

        #endregion

        #region PushMsg
        /// <summary>
        /// Pack_GetADPos
        /// </summary>
        public const UInt16 PUSH_ADPOS = 0;
        /// <summary>
        /// Pack_GetScanInfo 
        /// </summary>
        public const UInt16 PUSH_SCANINFO = 1;
        /// <summary>
        /// Pack_GetControllerState
        /// </summary>
        public const UInt16 PUSH_CONTROLLER_STATE = 2;

        /// <summary>
        /// Pack_GetIO
        /// </summary>
        public const UInt16 PUSH_IO = 4;
        /// <summary>
        /// Pack_GetSystem
        /// </summary>
        public const UInt16 PUSH_SYSTEM = 5;

        /// <summary>
        /// Pack_GetProfile
        /// </summary>
        public const UInt16 PUSH_PROFILE = 6;
        /// <summary>
        /// Pack_GetBoltmap
        /// </summary>
        public const UInt16 PUSH_BOLTMAP = 7;

        /// <summary>
        /// Pack_Position2
        /// </summary>
        public const UInt16 PUSH_POSITION2 = 8;
        #endregion


    }
}
