BoxInfo.cs
2.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
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>();
}
public BoxInfo(int id,string cid,int seq,int ss,int runs,int hasTray,int alarmType,List<string> inList)
{
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;
}
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>();
}
}