using FObjBase;
using FObjBase.Reflect;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace FLY.Thick.Base.IService
{
    /// <summary>
    /// AD盒输入输出口描述服务
    /// </summary>
    public interface IFlyAdIoDefineService
    {
        /// <summary>
        /// 获取输入输出口描述列表
        /// </summary>
        /// <param name="asyncDelegate"></param>
        /// <param name="asyncContext"></param>
        [Call(typeof(IODefineCollection))]
        void GetIODefine(AsyncCBHandler asyncDelegate, object asyncContext);
    }

    public class IODefineCollection 
    {
        /// <summary>
        /// 输入口数量
        /// </summary>
        public int InCount;
        /// <summary>
        /// 输出口数量
        /// </summary>
        public int OutCount;
        /// <summary>
        /// 列表
        /// </summary>
        public List<IODefine> List;
    }
    /// <summary>
    /// 输入输出口描述
    /// </summary>
    public class IODefine 
    {
        /// <summary>
        /// 输入口？输出口？
        /// </summary>
        public enum IOTYPE { 

            /// <summary>
            /// 输入口
            /// </summary>
            Input,
            /// <summary>
            /// 输出口
            /// </summary>
            Output
        };

        /// <summary>
        /// 输入口？输出口？
        /// </summary>
        public IOTYPE IoType;
        /// <summary>
        /// 序号，从0开始排列
        /// </summary>
        public int Index;
        /// <summary>
        /// 功能表述
        /// </summary>
        public string Description;

    }
}
