CommunicationConfig.cs
2 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
using FreeSql.DataAnnotations;
using HHECS.DataContract;
using System.ComponentModel.DataAnnotations;
namespace HHECS.RobotTool.Model
{
[Table(Name = nameof(CommunicationConfig))]
[Index($"idx_{nameof(CommunicationConfig)}_{nameof(Code)}", $"{nameof(Code)}", true)]
public class CommunicationConfig : BaseEntityCU<int>
{
/// <summary>
/// 编号
/// </summary>
public string Code { get; set; } = null!;
/// <summary>
/// 名称
/// </summary>
public string Name { get; set; } = null!;
/// <summary>
/// 类型
/// </summary>
[Column(DbType = "varchar(50)", MapType = typeof(string))]
public CommunicationTypeConst CommunicationType { get; set; } = CommunicationTypeConst.None;
/// <summary>
/// IP地址
/// </summary>
/// <remarks><see cref="Equipment"/> 使用IpAddress匹配通讯配置</remarks>
public string IpAddress { get; set; } = null!;
/// <summary>
/// 端口号
/// </summary>
public int Port { get; set; }
/// <summary>
/// 是否启用
/// </summary>
public bool IsEnable { get; set; }
/// <summary>
/// 备注
/// </summary>
public string? Remark { get; set; }
}
/// <summary>
/// 通讯方式
/// </summary>
public enum CommunicationTypeConst
{
/// <summary>
/// 无
/// </summary>
[Display(Name = "未配置")]
None,
/// <summary>
/// Kuka 机器人代理
/// </summary>
//[Display(Name = "Kuka 机器人代理")]
//KukaVarProxy,
/// <summary>
/// Fanuc 机器人
/// </summary>
[Display(Name = "Fanuc")]
Fanuc,
//[Display(Name = "Siemens S1500")]
//Siemens_S1500,
//[Display(Name = "Siemens S1200")]
//Siemens_S1200,
[Display(Name ="ModbusTcp")]
ModbusTcp,
}
}