添加S7后台服务和添加PLC所需要的属性

This commit is contained in:
2025-07-05 01:31:44 +08:00
parent 69b75ef228
commit 404501cc17
8 changed files with 295 additions and 1 deletions

View File

@@ -2,6 +2,7 @@ using PMSWPF.Enums;
using SqlSugar;
using SqlSugar.DbConvert;
using ProtocolType = PMSWPF.Enums.ProtocolType;
using S7.Net; // Add this using directive
namespace PMSWPF.Data.Entities;
@@ -54,6 +55,24 @@ public class DbDevice
/// </summary>
public int Prot { get; set; }
/// <summary>
/// PLC的CPU类型。
/// </summary>
[SugarColumn(ColumnDataType = "varchar(20)", IsNullable = true, SqlParameterDbType = typeof(EnumToStringConvert))]
public CpuType CpuType { get; set; }
/// <summary>
/// PLC的机架号。
/// </summary>
[SugarColumn(IsNullable = true)]
public short Rack { get; set; }
/// <summary>
/// PLC的槽号。
/// </summary>
/// [SugarColumn(IsNullable = true)]
public short Slot { get; set; }
/// <summary>
/// 设备的通信协议类型。
/// </summary>