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

namespace FLY.Thick.Base.IService
{

    public interface IFlyADService:INotifyPropertyChanged
    {
        #region 参数
        bool HasCRC { get; set; }
        IPEndPoint EP { get; set; }
        int PosOfGrid { get; set; }
        int PosLen { get; }
        MOTORTYPE MotorType { set; get; }
        UInt16 Ratio01 { get; set; }
        UInt16 Ratio02 { get; set; }
        Int16 PosOffset { set; get; }//脉冲平移
        UInt32 JogVelocity { set; get; }
        int GridSmooth { get; set; }
        /// <summary>
        /// 参数应用
        /// </summary>
        void Apply();
        /// <summary>
        /// 获取序列码
        /// </summary>
        /// <param name="AsyncDelegate">返回类型为 AccessInfo</param>
        /// <param name="AsyncState">可为null</param>
        void GetAccessInfo(AsyncCBHandler AsyncDelegate, object AsyncState);
        /// <summary>
        /// 设置授权码
        /// </summary>
        /// <param name="access">授权码</param>
        /// <param name="AsyncDelegate">返回类型为 AccessInfo</param>
        /// <param name="AsyncState">可为null</param>
        void SetAccess(byte[] access, AsyncCBHandler AsyncDelegate, object AsyncState);
        #endregion
        /// <summary>
        /// 获取grid
        /// </summary>
        /// <param name="direction">方向</param>
        /// <param name="AsyncDelegate">返回类型为 byte[]</param>
        /// <param name="AsyncState">可为null</param>
        void GetGrid(Misc.DIRECTION direction, AsyncCBHandler AsyncDelegate, object AsyncState);

        /// <summary>
        /// 向AD盒获取数据
        /// </summary>
        void UpdateParam();

        //event TimeGridEventHandler TimeGridEvent;
        //event IStatusChangedEventHandler IStatusChangedEvent;
    }
}
