using BPA.Model;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace BPA.SingleDevice.Interface
{
    public interface IDeviceAbs
    {
        void Start();
        void Stop();

        /// <summary>
        /// 输入控制参数
        /// </summary>
        /// <param name="value"></param>
        void WriteControl(ushort[] value);

        /// <summary>
        /// 输送带控制
        /// </summary>
        /// <param name="value"></param>
        void ConveyorControl(bool value);

        /// <summary>
        /// 味魔方配料完成通知
        /// </summary>
        Action<EDeviceType> Complete { get; set; }

        /// <summary>
        /// 设备通讯参数设置
        /// </summary>
        /// <param name="ip"></param>
        /// <param name="deviceType"></param>
        /// <param name="port">端口号</param>
        void SetPar(string ip, EDeviceType deviceType, int port = 502);

        /// <summary>
        /// 定位完成通知
        /// </summary>
        Action<int> ArrivalFingerPos { get; set; }

        /// <summary>
        /// 允许配料
        /// </summary>
        bool AllowBatching { get; set; }

        /// <summary>
        /// 设备工位检测
        /// </summary>
        bool[] DeviceStationDetection { get; set; }
    }
}
