using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Collections.Concurrent;
using BPA.Model.Recipe;
using BPA.Model.Enums;
using BPA.SingleDevice.Interface;
using BPA.Model.Attributes;

namespace BPA.Model
{
    public  class GlobalData: IStatus
    {
        /// <summary>
        /// 需要执行的配方队列。
        /// </summary>
        public  ConcurrentQueue<RecipeData> RecipeQueue { get; set; } = new();

        #region 配料机
        /// <summary>
        /// 是否配料完成。
        /// </summary>
        [VariableMonitor("配料机完成状态")]
        public bool[] IsCompleted { get; set; } = new bool[4];

        #endregion

        #region 传送带
        [VariableMonitor("传送带移动状态步")]
        public MoveConveyerStep MoveConveyerStep { get; set; }

        [VariableMonitor("传送带移动完成")]
        public bool ConveyerMoveComplete { get; set; }

        [VariableMonitor("工站容器到位检测")]
        public bool[] HaveVessel { get; set; } = new bool[5];
        #endregion

        #region 全局流程相关
        [VariableMonitor("待制作配方数量")]
        public int WaitMakeRecipeCount { get=>RecipeQueue.Count; }

        [VariableMonitor("开机目前完成配方数量")]
        public int CompletedCount { get; set; }
        #endregion
    }
}
