临时提交

This commit is contained in:
2025-07-19 09:25:01 +08:00
parent e1a89e7c70
commit 01fe2e14ef
52 changed files with 499 additions and 370 deletions

View File

@@ -3,7 +3,7 @@ using System.Collections.ObjectModel;
using DMS.Core.Enums;
namespace DMS.Models;
namespace DMS.Core.Models;
/// <summary>
/// 表示设备信息。
@@ -13,7 +13,7 @@ public partial class Device
/// <summary>
/// 设备的描述信息。
/// </summary>
private string description;
public string Description { get; set; }
/// <summary>
/// 设备的类型。
@@ -23,53 +23,53 @@ public partial class Device
/// <summary>
/// 设备的唯一标识符。
/// </summary>
private int id;
public int Id { get; set; }
/// <summary>
/// 设备的IP地址。
/// </summary>
private string ip;
public string Ip { get; set; }
/// <summary>
/// 表示设备是否处于活动状态。
/// </summary>
private bool isActive = true;
public bool IsActive { get; set; } = true;
/// <summary>
/// 表示是否添加默认变量表。
/// </summary>
private bool isAddDefVarTable = true;
public bool IsAddDefVarTable { get; set; } = true;
/// <summary>
/// 表示设备是否正在运行。
/// </summary>
private bool isRuning;
public bool IsRuning { get; set; }
/// <summary>
/// 设备的名称。
/// </summary>
private string name;
public string Name { get; set; }
/// <summary>
/// 设备的端口号。
/// </summary>
private int prot;
public int Prot { get; set; }
/// <summary>
/// PLC的CPU类型。
/// </summary>
//private CpuType cpuType;
//public CpuType cpuType;
/// <summary>
/// PLC的机架号。
/// </summary>
private short rack;
public short Rack { get; set; }
/// <summary>
/// PLC的槽号。
/// </summary>
private short slot;
public short Slot { get; set; }
/// <summary>
/// 设备的通信协议类型。
@@ -79,7 +79,7 @@ public partial class Device
/// <summary>
/// OPC UA Endpoint URL。
/// </summary>
private string? opcUaEndpointUrl;
public string OpcUaEndpointUrl { get; set; }=String.Empty;
/// <summary>
/// 设备关联的变量表列表。

View File

@@ -1,6 +1,6 @@
using DMS.Core.Enums;
namespace DMS.Models;
namespace DMS.Core.Models;
/// <summary>
/// 表示菜单项。

View File

@@ -1,6 +1,6 @@
using DMS.Core.Enums;
namespace DMS.Models;
namespace DMS.Core.Models;
/// <summary>
/// 表示MQTT配置信息。

View File

@@ -1,6 +1,6 @@
using DMS.Core.Enums;
namespace DMS.Models;
namespace DMS.Core.Models;
/// <summary>
/// 表示通知信息。

View File

@@ -1,6 +1,6 @@
using System.Collections.ObjectModel;
namespace DMS.Models;
namespace DMS.Core.Models;
/// <summary>
/// 表示OPC UA节点用于构建节点树。

View File

@@ -1,4 +1,4 @@
namespace DMS.Models;
namespace DMS.Core.Models;
public class User
{

View File

@@ -1,6 +1,6 @@
using DMS.Core.Enums;
namespace DMS.Models;
namespace DMS.Core.Models;
/// <summary>
/// 表示变量数据信息。
@@ -15,7 +15,7 @@ public partial class Variable
/// <summary>
/// 变量名称。
/// </summary>
private string name;
public string Name { get; set; }
/// <summary>
/// 节点ID用于标识变量在设备或系统中的唯一路径。
@@ -41,7 +41,7 @@ public partial class Variable
/// <summary>
/// 变量描述。
/// </summary>
private string description = String.Empty;
public string Description { get; set; } = String.Empty;
/// <summary>
/// 协议类型例如Modbus、OPC UA等。
@@ -61,22 +61,22 @@ public partial class Variable
/// <summary>
/// 变量当前原始数据值。
/// </summary>
private string dataValue = String.Empty;
public string DataValue { get; set; } = String.Empty;
/// <summary>
/// 变量经过转换或格式化后的显示值。
/// </summary>
private string displayValue = String.Empty;
public string DisplayValue { get; set; } = String.Empty;
/// <summary>
/// 指示变量是否处于激活状态。
/// </summary>
public bool isActive;
public bool IsActive { get; set; }
/// <summary>
/// 指示变量是否被选中
/// </summary>
public bool isSelect;
public bool IsSelect { get; set; }
/// <summary>
/// 指示是否需要保存变量数据。
@@ -91,12 +91,12 @@ public partial class Variable
/// <summary>
/// 轮询级别例如1秒、5秒等。
/// </summary>
private PollLevelType pollLevelType = PollLevelType.ThirtySeconds;
public PollLevelType PollLevelType { get; set; } = PollLevelType.ThirtySeconds;
/// <summary>
/// OPC UA更新类型例如轮询或订阅。
/// </summary>
private OpcUaUpdateType opcUaUpdateType = OpcUaUpdateType.OpcUaPoll;
public OpcUaUpdateType OpcUaUpdateType { get; set; } = OpcUaUpdateType.OpcUaPoll;
/// <summary>
/// 最后一次轮询时间。
@@ -111,7 +111,7 @@ public partial class Variable
/// <summary>
/// 指示变量是否已被修改了。
/// </summary>
private bool isModified;
public bool IsModified { get; set; }
/// <summary>
/// 报警的最大值阈值。
@@ -126,7 +126,7 @@ public partial class Variable
/// <summary>
/// 数据转换规则或表达式。
/// </summary>
private string converstion = String.Empty;
public string Converstion { get; set; } = String.Empty;
/// <summary>
/// 数据保存的范围或阈值。
@@ -136,13 +136,13 @@ public partial class Variable
/// <summary>
/// 变量数据创建时间。
/// </summary>
private DateTime createTime;
public DateTime CreateTime { get; set; }
/// <summary>
/// 变量数据最后更新时间。
/// </summary>
private DateTime updateTime = DateTime.Now;
public DateTime UpdateTime { get; set; } = DateTime.Now;
/// <summary>
/// 最后更新变量数据的用户。

View File

@@ -1,6 +1,6 @@
using DMS.Models;
using DMS.Core.Models;
namespace DMS.Models
namespace DMS.Core.Models
{
public class VariableContext
{

View File

@@ -1,7 +1,7 @@
using System;
using DMS.Core.Enums;
namespace DMS.Models;
namespace DMS.Core.Models;
/// <summary>
/// 表示变量数据与MQTT服务器之间的关联模型包含MQTT别名。

View File

@@ -2,7 +2,7 @@
using System.ComponentModel;
using DMS.Core.Enums;
namespace DMS.Models;
namespace DMS.Core.Models;
/// <summary>
/// 表示变量表信息。
@@ -22,7 +22,7 @@ public partial class VariableTable
/// <summary>
/// 变量表描述。
/// </summary>
private string description;
public string Description { get; set; }
/// <summary>
/// 变量表中包含的数据变量列表。
@@ -37,12 +37,12 @@ public partial class VariableTable
/// <summary>
/// 表示变量表是否处于活动状态。
/// </summary>
private bool isActive;
public bool IsActive { get; set; }
/// <summary>
/// 变量表名称。
/// </summary>
private string name;
public string Name { get; set; }
/// <summary>
/// 变量表使用的协议类型。