HYEquip_Config.cs
2.9 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
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
104
using log4net;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Threading.Tasks;
namespace OnlineStore.LoadCSVLibrary
{
public class HYEquip_Config : DeviceConfig
{
public HYEquip_Config()
: base()
{
}
public HYEquip_Config(int id, string cid, string type, string filepath)
: base(id, cid, type, filepath)
{
IsDebug = 0;
}
public void LoadParam()
{
if (Id.Equals(202))
{
WorkDeviceId = 101;
}
else if (Id.Equals(203))
{
WorkDeviceId = 101;
}
int[] sideIns = new int[] { 201, 203 };
int[] sideOuts = new int[] { 202, 204};
int[] lineIns = new int[] { 202, 204};
int[] lineOuts = new int[] { 209, 211 };
if (sideIns.Contains(Id))
{
IsSideWayIn = true ;
}
else if (sideOuts.Contains(Id))
{
IsSideWayOut = true ;
}
if (lineIns.Contains(Id))
{
AtLineIn = true ;
}
else if (lineOuts.Contains(Id))
{
AtLineOut = true ;
}
LineName = "LineA";
if (Id.Equals(201)|| Id.Equals(204))
{
LineName = "LineA";
}
else if (Id.Equals(205))
{
LineName = "LineB";
}
}
/// <summary>
/// 设备是否处于调试状态(1=调试,0=正常)
/// </summary>
[ConfigProAttribute("IsDebug", false)]
public int IsDebug { get; set; }
/// <summary>
/// PRO,0,HY所在流水线,LineName,C1,,
/// </summary>
[ConfigProAttribute("LineName", false)]
public string LineName { get; set; }
/// <summary>
/// PRO,0,HY工位对应的设备,WorkDevice,105,,
/// </summary>
[ConfigProAttribute("WorkDeviceId", false)]
public int WorkDeviceId { get; set; }
/// <summary>
/// PRO,0,HY是否是托盘横移入口,IsSideWayIn,0,,
/// </summary>
[ConfigProAttribute("IsSideWayIn", false)]
public bool IsSideWayIn { get; set; }
/// <summary>
/// PRO,0,HY是否是托盘横移出口,IsSideWayOut,1,,
/// </summary>
[ConfigProAttribute("IsSideWayOut", false)]
public bool IsSideWayOut { get; set; }
/// <summary>
/// HY是否在线体入口
/// </summary>
[ConfigProAttribute("AtLineIn", false)]
public bool AtLineIn { get; set; }
/// <summary>
/// PRO,0,HY是否在线体出口
/// </summary>
[ConfigProAttribute("AtLineOut", false)]
public bool AtLineOut { get; set; }
}
}