2025-07-26 10:05:43 +08:00
|
|
|
|
using DMS.Core.Enums;
|
|
|
|
|
|
|
2025-07-21 14:35:17 +08:00
|
|
|
|
namespace DMS.Application.DTOs;
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 用于在UI上显示设备基本信息的DTO。
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
public class DeviceDto
|
|
|
|
|
|
{
|
2025-09-05 13:35:20 +08:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 设备唯一标识符
|
|
|
|
|
|
/// </summary>
|
2025-07-21 14:35:17 +08:00
|
|
|
|
public int Id { get; set; }
|
2025-09-05 13:35:20 +08:00
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 设备名称
|
|
|
|
|
|
/// </summary>
|
2025-07-21 14:35:17 +08:00
|
|
|
|
public string Name { get; set; }
|
2025-09-05 13:35:20 +08:00
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 设备描述信息
|
|
|
|
|
|
/// </summary>
|
2025-07-27 21:08:58 +08:00
|
|
|
|
public string Description { get; set; }
|
2025-09-05 13:35:20 +08:00
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 通信协议类型
|
|
|
|
|
|
/// </summary>
|
2025-07-24 15:07:03 +08:00
|
|
|
|
public ProtocolType Protocol { get; set; }
|
2025-09-05 13:35:20 +08:00
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 设备IP地址
|
|
|
|
|
|
/// </summary>
|
2025-07-21 14:35:17 +08:00
|
|
|
|
public string IpAddress { get; set; }
|
2025-09-05 13:35:20 +08:00
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 设备端口号
|
|
|
|
|
|
/// </summary>
|
2025-07-21 14:35:17 +08:00
|
|
|
|
public int Port { get; set; }
|
2025-09-05 13:35:20 +08:00
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// PLC机架号(用于PLC连接)
|
|
|
|
|
|
/// </summary>
|
2025-07-21 14:35:17 +08:00
|
|
|
|
public int Rack { get; set; }
|
2025-09-05 13:35:20 +08:00
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// PLC插槽号(用于PLC连接)
|
|
|
|
|
|
/// </summary>
|
2025-07-21 14:35:17 +08:00
|
|
|
|
public int Slot { get; set; }
|
2025-09-05 13:35:20 +08:00
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// CPU类型
|
|
|
|
|
|
/// </summary>
|
2025-07-27 21:58:50 +08:00
|
|
|
|
public CpuType CpuType { get; set; }
|
2025-09-05 13:35:20 +08:00
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 设备类型
|
|
|
|
|
|
/// </summary>
|
2025-07-27 21:08:58 +08:00
|
|
|
|
public DeviceType DeviceType { get; set; }
|
2025-09-05 13:35:20 +08:00
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// OPC UA服务器URL
|
|
|
|
|
|
/// </summary>
|
2025-07-21 14:35:17 +08:00
|
|
|
|
public string OpcUaServerUrl { get; set; }
|
2025-09-05 13:35:20 +08:00
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 设备是否处于激活状态
|
|
|
|
|
|
/// </summary>
|
2025-07-21 14:35:17 +08:00
|
|
|
|
public bool IsActive { get; set; }
|
2025-09-05 13:35:20 +08:00
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 设备是否正在运行
|
|
|
|
|
|
/// </summary>
|
2025-07-27 21:08:58 +08:00
|
|
|
|
public bool IsRunning { get; set; }
|
2025-09-05 13:35:20 +08:00
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 设备当前状态("在线", "离线", "连接中...")
|
|
|
|
|
|
/// </summary>
|
2025-07-21 14:35:17 +08:00
|
|
|
|
public string Status { get; set; } // "在线", "离线", "连接中..."
|
2025-07-27 21:08:58 +08:00
|
|
|
|
|
2025-09-05 13:35:20 +08:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 设备关联的变量表集合
|
|
|
|
|
|
/// </summary>
|
2025-07-27 21:08:58 +08:00
|
|
|
|
public List<VariableTableDto> VariableTables { get; set; }
|
2025-07-21 14:35:17 +08:00
|
|
|
|
}
|