Files
DMS/DMS.Application/DTOs/DeviceDto.cs
2025-09-14 09:03:07 +08:00

84 lines
1.9 KiB
C#
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

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