using DMS.Core.Enums; using System.Collections.Generic; namespace DMS.Core.Models; /// /// 代表一个可管理的物理或逻辑设备。 /// public class Device { /// /// 唯一标识符。 /// public int Id { get; set; } /// /// 设备名称,用于UI显示和识别。 /// public string Name { get; set; } /// /// 设备的描述信息。 /// public string Description { get; set; } /// /// 设备使用的通信协议。 /// public ProtocolType Protocol { get; set; } /// /// 设备的IP地址。 /// public string IpAddress { get; set; } /// /// 设备的通信端口号。 /// public int Port { get; set; } /// /// S7 PLC的机架号。 /// public int Rack { get; set; } /// /// S7 PLC的槽号。 /// public int Slot { get; set; } /// /// OPC UA 服务器地址 (仅当 Protocol 为 OpcUa 时有效)。 /// public string OpcUaServerUrl { get; set; } /// /// 指示此设备是否处于激活状态。只有激活的设备才会被轮询。 /// public bool IsActive { get; set; } /// /// 此设备包含的变量表集合。 /// public List VariableTables { get; set; } = new(); }