| | |
| | | using Bro.Common.Helper; |
| | | using Newtonsoft.Json; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.ComponentModel; |
| | |
| | | /// </summary> |
| | | public class WarningSet : IComplexDisplay |
| | | { |
| | | [Category("警报设置")] |
| | | [Description("警报位索引")] |
| | | public int WaringIndex { get; set; } |
| | | [Category("索引设置")] |
| | | [Description("警报索引——字索引")] |
| | | public int WarningIndex_Word { get; set; } |
| | | |
| | | [Category("警报设置")] |
| | | [Category("索引设置")] |
| | | [Description("警报索引——位索引")] |
| | | public int WarningIndex_Bit { get; set; } |
| | | |
| | | [Category("触发设置")] |
| | | [Description("true:高电平触发报警 false:低电平触发报警")] |
| | | public bool TriggerValue { get; set; } = true; |
| | | |
| | | [Category("警报内容")] |
| | | [Description("警报代码")] |
| | | public string WarningCode { get; set; } |
| | | |
| | | [Category("警报设置")] |
| | | [Category("警报内容")] |
| | | [Description("警报描述")] |
| | | public string WarningDescription { get; set; } |
| | | |
| | | [Category("警报设置")] |
| | | [Category("级别设置")] |
| | | [Description("警报级别")] |
| | | public int WarningLvl { get; set; } = 0; |
| | | |
| | | [Description("报警工位")] |
| | | public int WorkPosition { get; set; } = 0; |
| | | [Browsable(false)] |
| | | [JsonIgnore] |
| | | public bool CurrentStatus { get; set; } = false; |
| | | |
| | | public string GetDisplayText() |
| | | { |
| | | return WaringIndex + "-" + WarningCode + "-" + WarningDescription + "-" + WorkPosition; |
| | | return $"{WarningIndex_Word}:{WarningIndex_Bit}-{WarningCode}-{WarningDescription}"; |
| | | } |
| | | } |
| | | } |