using System; using System.Collections.Generic; using System.ComponentModel; public enum PLCOpType { [Description("读取")] Read = 1, [Description("写入")] Write = 2, [Description("监控")] Monitor = 4, /// /// 报警监控 1+8 /// [Description("报警监控")] WarningMonitor = 9, /// /// CT监控 1+16 /// [Description("CT监控")] CTMonitor = 17, } public class PLCItem { /// /// 读写地址 /// public string Address { get; set; } = ""; /// /// 读写地址长度 /// public int ItemLength { get; set; } = 1; /// /// PLC项目值 /// public List ItemValues { get; set; } = new List(); /// /// 是否写数据 1:读数据 2:写数据 4:监控 参见枚举PLCOpType /// public PLCOpType PLCOpType { get; set; } = PLCOpType.Read; public DateTime OpTimeStamp { get; set; } = DateTime.Now; }