CommunicationConfig.cs
1.96 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
using Microsoft.EntityFrameworkCore;
using System.ComponentModel.DataAnnotations;
namespace HHECS.RobotTool.Model
{
[Comment("通信配置")]
[Index(nameof(Code), IsUnique = true)]
public class CommunicationConfig
{
public CommunicationConfig()
{
Equipments = new List<Equipment>();
}
[Key]
[Comment("主键")]
public int Id { get; set; }
[Comment("编号")]
public string Code { get; set; } = null!;
[Comment("名称")]
public string Name { get; set; } = null!;
[Comment("类型")]
public CommunicationTypeConst CommunicationType { get; set; } = CommunicationTypeConst.None;
[Comment("IP地址")]
public string IpAddress { get; set; } = null!;
[Comment("端口号")]
public int Port { get; set; }
[Comment("是否启用")]
public bool Enable { get; set; }
[Comment("备注")]
public string? Remark { get; set; }
[Comment("创建时间")]
public DateTime? CreateTime { get; set; }
[Comment("修改时间")]
public DateTime? UpdateTime { get; set; }
public virtual IList<Equipment> Equipments { get; set; }
}
/// <summary>
/// 通讯方式
/// </summary>
public enum CommunicationTypeConst
{
/// <summary>
/// 无
/// </summary>
[Display(Name = "")]
None = 0,
/// <summary>
/// Kuka 机器人代理
/// </summary>
[Display(Name = "Kuka 机器人代理")]
KukaVarProxy,
/// <summary>
/// Tcp 客户端
/// </summary>
[Display(Name = "Tcp 客户端")]
TcpClient,
/// <summary>
/// Fanuc 机器人
/// </summary>
[Display(Name = "Fanuc")]
Fanuc,
[Display(Name = "Siemens S1500")]
Siemens_S1500,
[Display(Name = "Siemens S1200")]
Siemens_S1200
}
}