ConfigIO.cs
1.8 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
using log4net;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace TSA_V.DeviceLibrary
{
/// <summary>
/// io配置
/// </summary>
public class ConfigIO
{
public ConfigIO()
{
}
public ConfigIO(string type, string ip,byte slaveId,ushort index, string name, string explain)
{
this.SlaveID = slaveId;
this.ProType = type;
this.DeviceName = ip;
this.IOIndex = index;
this.ProName = name;
this.Explain = explain;
}
public byte SlaveID { get; set; }
/// <summary>
/// DI=输入IO,DO=输出IO,PRO=属性,AXIS=轴
/// </summary>
public string ProType { get; set; }
/// <summary>
/// 说明
/// </summary>
public string Explain { get; set; }
/// <summary>
/// 名称
/// </summary>
public string ProName { get; set; }
/// <summary>
/// 属性值
/// </summary>
public ushort IOIndex { get; set; }
/// <summary>
/// 设备名称
/// </summary>
public string DeviceName { get; set; }
public string DisplayStr
{
get
{
if (ResourceControl.GetLanguage().Equals(ResourceControl.China))
{
return Explain + "_" + ProName;
}
else
{
return Explain.Substring(0, 3) + "_" + ProName;
}
}
}
public override string ToString()
{
return "ConfigIO。" + ProType + "," + Explain + "," + ProName + ",属性值:" + IOIndex ;
}
}
}