BoxInfo.cs 2.8 KB
using System;
using System.Collections.Generic;

namespace OnlineStore.DeviceLibrary
{
    public  class BoxInfo
    {
        public BoxInfo()
        {
            ID = 0;
            CId = "";
            Seq = 0;
            SStatus = (int)LineStatus.None;
            SRunStatus = (int)LineRunStatus.Wait;
            SAlarmType = LineAlarmType.None;
            HasTray = 0;
            WaitInStoreList = new List<string>();
            CurrPosId = "";
        }
       
        public BoxInfo(int id,string cid,int seq,int ss,int runs,int hasTray,int  alarmType,List<string> inList,string currPosId,string rfids)
        {
            this.ID = id;
            CId = cid;
            Seq = seq;
            SStatus = (int)ss;
            SRunStatus = (int)runs;
            SAlarmType = (LineAlarmType)alarmType;
            LastMsgTime = DateTime.Now;
            this.HasTray = hasTray;
            this.WaitInStoreList = inList;
            this.CurrPosId = currPosId;
            this.rfids = rfids;
        }

        public string ToShowStr()
        {
            return KTK_Store.GetRunStr((LineRunStatus)SRunStatus, (LineStatus)SStatus);
        }
        /// <summary>
        /// 编号,1-4
        /// </summary>
        public int ID { get; set; }
        /// <summary>
        /// 料仓CID
        /// </summary>
        public string CId { get; set; }
         
        /// <summary>
        /// 请求序列号
        /// </summary>
        public int Seq { get; set; }
        /// <summary>
        /// 与LineStatus枚举值对应
        ///1=设备联机(正常就绪)(入库后,BOX恢复原始状态)(出库后,移载装置恢复原始状态),
        ///2=急停,3=故障,4=警告,5=调试
        ///  6=入库执行中,7=入仓完成,8=入仓失败
        /// 9=出库执行,10=出仓完成,11=出库失败
        /// </summary>
        public int SStatus { get; set; }
        /// <summary>
        /// 与LineRunStatus枚举值对应
        /// 0= 等待启动/已经停止,1=初始化完成, 2=正常运行中,3=可以进行新的处理,4=忙碌,重置
        /// </summary>
        public int SRunStatus { get; set; }
        /// <summary>
        /// 报警信息
        /// </summary>
        public LineAlarmType SAlarmType { get; set; }

        public DateTime LastMsgTime { get; set; }
        /// <summary>
        /// 料门口是否有料盘信号
        /// </summary>
        public int HasTray { get; set; }

        public List<string> WaitInStoreList = new List<string>();

        /// <summary>
        /// 当前出入库的库位号
        /// </summary>
        public string CurrPosId = "";
        /// <summary>
        /// 出料机构料架号
        /// </summary>
        public string rfids = "";

    }
}