WarehouseSigManager.cs 2.1 KB
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace DeviceLibrary.manager
{
    public class WarehouseSigManager
    {
        public static bool MayEnter =false;
        public static bool MayLeave =false;
        public static bool StopEnter = false;
        public static TargetWithFix TargetWithFix = new TargetWithFix();
        public static OutStore OutStore = new OutStore();

        public static void Reset()
        {
            MayEnter = false;
            MayLeave = false;
            StopEnter = false;
            TargetWithFix.Reset();
            OutStore.Reset();
        }
    }
    /// <summary>
    /// 运送目的地
    /// </summary>
    public class TargetWithFix
    {
        /// <summary>
        /// 呼叫地
        /// </summary>
        public string Name { get; set; }
        /// <summary>
        /// 目的地
        /// </summary>
        public string Target { get; set; }
        public string CurPlace { get; set; } = "";
        public void Set(string name,string target)
        {
            Name = name;
            Target = target;
        }
        public void Reset()
        {
            Name = "";
            Target = "";
            CurPlace = "";
        }
    }
    public class FixInfoOnAGV
    {
        public FixType Type { get; private set; }
        public bool HasLoad { get;private set; }
        public void Set(FixType fixType,bool hasload)
        {
            Type = fixType;
            HasLoad = hasload;
        }
        public void Reset()
        {
            Type = FixType.None;
            HasLoad = false;
        }
    }
    public class OutStore
    {
        public bool Has { get; set; }
        public FixType Type { get; set; }
        public string Id { get; set; } = "";
        public void Set(bool has,FixType fixType,string id="")
        {
            Has = has;
            Type = fixType;
            Id = id;
        }
        public void Reset()
        {
            Has = false;
            Type = FixType.None;
            Id = "";
        }
       
    }
}
;