using BPA.Message.Enum;
using BPASmartClient.Peripheral;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace BPASmartClient.Device
{
    /// <summary>
    /// 设备接口
    /// </summary>
    public interface IDevice
    {
        /// <summary>
        /// 设备ID
        /// </summary>
        int DeviceId { get; set; }
        /// <summary>
        /// 设备名称
        /// </summary>
        string Name { get; set; }
        /// <summary>
        /// 设备类型
        /// </summary>
        DeviceClientType DeviceType { get; }
        /// <summary>
        /// 设备所有状态
        /// </summary>
        DeviceStatus Status { get; set; }
        /// <summary>
        /// 是否忙碌
        /// </summary>
        bool IsBusy { get; }
        /// <summary>
        /// 是否健康
        /// </summary>
        bool IsHealth { get; }
        /// <summary>
        /// 初始化设备加载
        /// </summary>
        void Initliaze(List<IPeripheral> peripherals);
        /// <summary>
        /// 开启设备主任务
        /// </summary>
        void StartMain();
        /// <summary>
        /// 设备停止
        /// </summary>
        void Stop();

    }
}
