namespace BPA.SingleDevice.Interface
{
    public interface IBatchcer
    {
        /// <summary>设备ID</summary>
        public int ID { get; set; }

        /// <summary>配料完成</summary>
        public bool BatchComplete { get; set; }

        /// <summary>允许下料。</summary>
        public bool AllowBatching { get; set; }

        /// <summary>是否连接。</summary>
        bool IsConnected { get; }

        /// <summary>设置通讯参数</summary>
        void SetCommParam(int id, string ip, int port = 502);

        /// <summary>写入下料数据。</summary>
        /// <param name="value"></param>
        /// <returns></returns>
        bool WriteBatchData(ushort[] value);

        /// <summary>开始配料</summary>
        /// <returns></returns>
        bool StartBatching();

        /// <summary>复位配料信号</summary>
        /// <returns></returns>
        bool ResetCompleted();

        /// <summary>设备初始化</summary>
        Task InitialAsync();
    }
}