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;
using FObjBase.Reflect;

namespace FLY.Thick.Base.IService
{

    public interface IFlyADService : INotifyPropertyChanged
    {
        #region 参数
        bool HasCRC { get; set; }
        string Addr { get; set; }
        UInt16 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; }
        
        int ADLag { get; set; }
        bool HasPosMaxMin { get; set; }
        int PosMin { get; set; }
        int PosMax { get; set; }

        int Verson { get; }
        int HardwareVersion { get; set; }
        /// <summary>
        /// 获取序列码
        /// </summary>
        /// <param name="asyncDelegate"></param>
        /// <param name="asyncContext"></param>
        [Call(typeof(AccessInfo))]
        void GetAccessInfo(AsyncCBHandler asyncDelegate, object asyncContext);

        /// <summary>
        /// 设置授权码
        /// </summary>
        /// <param name="access"></param>
        /// <param name="asyncDelegate"></param>
        /// <param name="asyncContext"></param>
        [Call(typeof(AccessInfo))]
        void SetAccess(byte[] access, AsyncCBHandler asyncDelegate, object asyncContext);
        #endregion

        /// <summary>
        /// 获取grid
        /// </summary>
        /// <param name="direction"></param>
        /// <param name="asyncDelegate"></param>
        /// <param name="asyncContext"></param>
        [Call(typeof(GridInfo))]
        void GetGrid(Misc.DIRECTION direction, AsyncCBHandler asyncDelegate, object asyncContext);
    }
}
