333
schangxiang@126.com
2024-11-26 f23e0223221ec2b96543761bc0ab743d9e0a6294
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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
using iWareCommon.Common.EnumType;
using System;
 
namespace iWareCommon
{
    [Serializable]
    public class SrmInfo
    {
        /// <summary>
        /// 堆垛机名称
        /// </summary>
        public string SrmName { get; set; }
 
        /// <summary>
        /// 根据心跳判断堆垛机是否在线
        /// </summary>
        public string IsOnline { get; set; }
 
        public string WHandShake { get; set; }
        public string WSrmNo { get; set; }
        public string WCallBack { get; set; }
        public string WCancelTask { get; set; }
        public string WEstop { get; set; }
        public string WFromCol { get; set; }
        public string WFromLayer { get; set; }
        public string WFromRow { get; set; }
        public string WToCol { get; set; }
        public string WToLayer { get; set; }
        public string WToRow { get; set; }
        public string WTaskId { get; set; }
        public string WNewTask { get; set; }
        public string WAckTaskFinish { get; set; }
 
 
 
       
        /// ///////////////////////////////////////////
       
 
 
        public string RHandShake { get; set; }
        public string RPickFinish { get; set; }
        public string RPutFinish { get; set; }
        public string RAuto { get; set; }
        public string RAlarm { get; set; }
        public string RTaskFinish { get; set; }
        public string RLoaded { get; set; }
        public string RForkIni { get; set; }
        public string RSrmNo { get; set; }
        public string RAlarmCode { get; set; }
        public string RState { get; set; }
        public string RCol { get; set; }
        public string RLayer { get; set; }
        public string RPosX { get; set; }
        public string RPosY { get; set; }
        public string RForkPos { get; set; }
        public string RTaskId { get; set; }
 
 
        public SrmInfo() { }
 
        public SrmInfo(SrmEntity srm)
        {
            this.SrmName = srm.SrmName;
            this.IsOnline = srm.IsOnline ? "在线" : "已离线";
 
            this.WHandShake = srm.WHandShake.ToString();
            this.WSrmNo = srm.WSrmNo.ToString();
            this.WCallBack = srm.WCallBack == (int)EYesOrNo.是 ? "召回" : "";
            this.WCancelTask = srm.WCancelTask == (int)EYesOrNo.是 ? "取消任务" : "";
            this.WEstop = srm.WEstop == (int)EYesOrNo.是 ? "急停" : "";
            this.WFromCol = srm.WFromCol.ToString();
            this.WFromLayer = srm.WFromLayer.ToString();
            this.WFromRow = srm.WFromRow.ToString();
            this.WToCol = srm.WToCol.ToString();
            this.WToRow = srm.WToRow.ToString();
            this.WToLayer = srm.WToLayer.ToString();
            this.WTaskId = srm.WTaskId.ToString();
            this.WNewTask = srm.WNewTask.ToString();
            this.WAckTaskFinish = srm.WAckTaskFinish.ToString();
 
            this.RHandShake = srm.RHandShake.ToString();
            this.RPickFinish = srm.RPickFinish ? "取货完成" : "";
            this.RPutFinish = srm.RPutFinish ? "放货完成" : "";
            this.RAuto = srm.RAuto ? "自动" : "非自动";
            this.RAlarm = srm.RAlarm ? "报警" : "正常";
            this.RTaskFinish = srm.RTaskFinish ? "任务完成" : "";
            this.RLoaded = srm.RLoaded ? "叉齿有货" : "叉齿无货";
            this.RForkIni = srm.RForkIni ? "叉齿在原位" : "叉齿不在原位";
            this.RSrmNo = srm.RSrmNo.ToString();
            this.RAlarmCode = srm.RAlarmCode == 0 ? "" : ((ESrmAlarm)srm.RAlarmCode).ToString();
            this.RState = ((ESrmState)srm.RState).ToString();
            this.RCol = srm.RCol.ToString();
            this.RLayer = srm.RLayer.ToString();
            this.RPosX = srm.RPosX.ToString();
            this.RPosY = srm.RPosY.ToString();
            this.RForkPos = srm.RForkPos.ToString();
            this.RTaskId = srm.RTaskId.ToString();
 
            
        }
    }
}