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

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 position;
        }
        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 class Pack_GetControllerState
        {
            /// <summary>
            /// 运行状态
            /// </summary>
            public CTRL_STATE controller_state;
            /// <summary>
            /// 自动扫描时间累积
            /// </summary>
            public int autoscan_counter;
        }
        public class Pack_GetIO
        {
            public UInt16 iStatus;
            public UInt16 oStatus;
        }
        public class Pack_GetSystem
        {
            /// <summary>
            /// FLYAD 连接状态
            /// </summary>
            public bool isConnect;
            /// <summary>
            /// 锁
            /// </summary>
            public bool secuteLock;
            /// <summary>
            /// 系统剩余小时
            /// </summary>
            public int hrs;
            /// <summary>
            /// 版本
            /// </summary>
            public string version;
            /// <summary>
            /// 设备类型
            /// </summary>
            public GAGE_TYPE gagetype;
        }
        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


    }
}
